Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

nodeos_run_test-mongodb (Failed) #2103

Closed
sailei1 opened this issue Apr 4, 2018 · 28 comments
Closed

nodeos_run_test-mongodb (Failed) #2103

sailei1 opened this issue Apr 4, 2018 · 28 comments
Assignees
Milestone

Comments

@sailei1
Copy link

sailei1 commented Apr 4, 2018

2018-04-05 00 00 36

2018-04-05 00 12 15

how to fix
@sailei1
Copy link
Author

sailei1 commented Apr 4, 2018

now
Total Test time (real) = 377.49 sec

The following tests FAILED:
24 - nodeos_run_test (Failed)
26 - nodeos_run_test-mongodb (Failed)
Errors while running CTest
make: *** [test] Error 8

@PaulCalabrese
Copy link
Contributor

This may be related to issue 2096, which is now fixed. Try the following:
Pull the latest code from master.
Delete your build directory
Rebuild and retest

@sailei1
Copy link
Author

sailei1 commented Apr 5, 2018

image
I updated the code, the problem still exists @PaulCalabrese

@GuminTom
Copy link

GuminTom commented Apr 7, 2018

I have the issue too, does anybody solve it?

@gleehokie gleehokie modified the milestones: RC2, RC1 Apr 7, 2018
@PaulCalabrese
Copy link
Contributor

If you are still seeing this failure with the latest master code, can you capture the output of the test and post the results here:

cd eos/build
tests/nodeos_run_test.py --mongodb -v --dump-error-detail >& mongo_test.out

Then send the mongo_test.out file.

@kshpylon
Copy link

kshpylon commented Apr 10, 2018

I also have the same issue.

cd eos/build
tests/nodeos_run_test.py --mongodb -v --dump-error-detail >& mongo_test.out

in mongo_test.out file:


terminate called after throwing an instance of 'fc::eof_exception'
terminate called after throwing an instance of 'fc::eof_exception'
BEGIN
TEST_OUTPUT: test_output_0.txt
SERVER: localhost
PORT: 8888
cmd: programs/eosio-launcher/eosio-launcher -k 15
cmd: pkill nodeos
echo db.dropDatabase() | mongo --host localhost --port 27017 EOStest

== Errors see above ==
Shut down the cluster.
cmd: programs/eosio-launcher/eosio-launcher -k 15
cmd: pkill nodeos
Shut down the wallet.
cmd: pkill keosd
Traceback (most recent call last):
File "tests/nodeos_run_test.py", line 96, in
cluster.cleanup()
File "/home/kshpylon/eos/build/tests/testUtils.py", line 1762, in cleanup
ret,outs,errs=Node.stdinAndCheckOutput(cmd.split(), subcommand)
File "/home/kshpylon/eos/build/tests/testUtils.py", line 210, in stdinAndCheckOutput
popen=subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib/python3.5/subprocess.py", line 947, in init
restore_signals, start_new_session)
cmd: pkill nodeos
Shut down the wallet.
cmd: pkill keosd
Traceback (most recent call last):
File "tests/nodeos_run_test.py", line 96, in
cluster.cleanup()
File "/home/kshpylon/eos/build/tests/testUtils.py", line 1762, in cleanup
ret,outs,errs=Node.stdinAndCheckOutput(cmd.split(), subcommand)
File "/home/kshpylon/eos/build/tests/testUtils.py", line 210, in stdinAndCheckOutput
popen=subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib/python3.5/subprocess.py", line 947, in init
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'mongo'

@stvenyin
Copy link

Uploading image.png…
im appear this problem.

@stvenyin
Copy link

 Start  1: validate_simple.token_abi

1/25 Test #1: validate_simple.token_abi ........... Passed 0.02 sec
Start 2: validate_eosio.token_abi
2/25 Test #2: validate_eosio.token_abi ............ Passed 0.02 sec
Start 3: validate_eosio.msig_abi
3/25 Test #3: validate_eosio.msig_abi ............. Passed 0.02 sec
Start 4: validate_multi_index_test_abi
4/25 Test #4: validate_multi_index_test_abi ....... Passed 0.02 sec
Start 5: validate_eosio.system_abi
5/25 Test #5: validate_eosio.system_abi ........... Passed 0.02 sec
Start 6: validate_identity_abi
6/25 Test #6: validate_identity_abi ............... Passed 0.02 sec
Start 7: validate_identity_test_abi
7/25 Test #7: validate_identity_test_abi .......... Passed 0.02 sec
Start 8: validate_currency_abi
8/25 Test #8: validate_currency_abi ............... Passed 0.02 sec
Start 9: validate_stltest_abi
9/25 Test #9: validate_stltest_abi ................ Passed 0.02 sec
Start 10: validate_exchange_abi
10/25 Test #10: validate_exchange_abi ............... Passed 0.02 sec
Start 11: validate_test.inline_abi
11/25 Test #11: validate_test.inline_abi ............ Passed 0.02 sec
Start 12: validate_asserter_abi
12/25 Test #12: validate_asserter_abi ............... Passed 0.02 sec
Start 13: validate_infinite_abi
13/25 Test #13: validate_infinite_abi ............... Passed 0.02 sec
Start 14: validate_proxy_abi
14/25 Test #14: validate_proxy_abi .................. Passed 0.02 sec
Start 15: validate_test_api_abi
15/25 Test #15: validate_test_api_abi ............... Passed 0.02 sec
Start 16: validate_test_api_mem_abi
16/25 Test #16: validate_test_api_mem_abi ........... Passed 0.02 sec
Start 17: validate_test_api_db_abi
17/25 Test #17: validate_test_api_db_abi ............ Passed 0.02 sec
Start 18: validate_test_api_multi_index_abi
18/25 Test #18: validate_test_api_multi_index_abi ... Passed 0.02 sec
Start 19: validate_eosio.bios_abi
19/25 Test #19: validate_eosio.bios_abi ............. Passed 0.02 sec
Start 20: validate_noop_abi
20/25 Test #20: validate_noop_abi ................... Passed 0.02 sec
Start 21: validate_dice_abi
21/25 Test #21: validate_dice_abi ................... Passed 0.02 sec
Start 22: chain_test_binaryen
wait a long time ...

@PaulCalabrese
Copy link
Contributor

@kshpylon It appears that you may not have mongo db installed. Please try "which mongo" to see if it is available in your path. The eosio_build.sh script should be installing this for you. Please look for errors from the build script about mongo.

@stvenyin How long did you wait for chain_test_binaryen to complete? It takes about 35 seconds on my ubuntu build. If you are having a problem with this test please submit a different issue.

@PaulCalabrese
Copy link
Contributor

I am closing this ticket as it seems that the problem description has drifted. If you determine specific mongo installation issues, please report those as a new issue (and identify OS version).

@stvenyin
Copy link

it total about 500 seconds, i checkout the lasted source code compiled.

@kshpylon
Copy link

I have identified the cause of the failure. Before running the test, run this :

~/opt/mongodb/bin/mongod -f ~/opt/mongodb/mongod.conf &

@sailei1

@sim31
Copy link
Contributor

sim31 commented Apr 12, 2018

These tests fail for me as well. Probably for a different reason, though, since I'm running Arch linux, and as I figured out it seems an OS specific issue. Here's a log from tests/nodeos_run_test.py --mongodb -v --dump-error-detail >& mongo_test.out:

kill: sending signal to 32331 failed: No such process
kill: sending signal to 32335 failed: No such process
launching bios
spawning child, programs/nodeos/nodeos   --resync   --config-dir etc/eosio/node_bios --data-dir var/lib/node_bios
launching testnet_00
spawning child, programs/nodeos/nodeos  --plugin eosio::mongo_db_plugin --resync --mongodb-uri mongodb://localhost:27017/EOStest  --config-dir etc/eosio/node_00 --data-dir var/lib/node_00
**********************************************************************
run 'bash bios_boot.sh' to kick off delegated block production
**********************************************************************
BEGIN
TEST_OUTPUT: test_output_0.txt
SERVER: localhost
PORT: 8888
Stand up cluster
  ERROR: Failed to find nodeos pid. Pattern [
]?(\d+) (.* --data-dir var/lib/node_00)
 ERROR: Unable to validate nodeos instances, expected: 1, actual: 0
 FAILURE - launcher
 ERROR: Failed to stand up eos cluster.
Traceback (most recent call last):
  File "tests/nodeos_run_test.py", line 95, in <module>
    errorExit("Failed to stand up eos cluster.")
  File "/home/tadas/Programming/sources/eos/build/Debug/tests/testUtils.py", line 92, in errorExit
    exit(errorCode)
  File "/usr/lib/python3.6/_sitebuiltins.py", line 26, in __call__
    raise SystemExit(code)
SystemExit: 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "tests/nodeos_run_test.py", line 627, in <module>
    cluster.dumpErrorDetails()
  File "/home/tadas/Programming/sources/eos/build/Debug/tests/testUtils.py", line 1874, in dumpErrorDetails
    fileName="etc/eosio/node_$02d/config.ini" % (i)
TypeError: not all arguments converted during string formatting

I was able to make it pass with this commit. But there might be a better solution, so you don't need to check for every linux platform.

@heifner
Copy link
Contributor

heifner commented Apr 12, 2018

@sim31 Could you submit a pull request with that commit.

@BenHigh5
Copy link

BenHigh5 commented Apr 12, 2018

First off, I am running from Docker.

So what worked for me was a few steps to get it running. First, I ran what @kshpylon specified (not sure this did what I needed for my setup, but did run it, so including in instructions) , then I ran in terminal "mongod", and found the error that /data/db hadn't been created, so I created those folders.

My test command was -> /root/opt/mongodb/bin/mongod -f /root/opt/mongodb/mongod.conf & cd /root/eos/build; make test

So first thing I noticed is that my binary lived at /usr/bin/mongod, and I had no /opt/mongodb/mongod.conf file. I created /mongodb/mongod.conf by executing "touch mongod.conf" in the mongodb directory I had created, and so my test command became as follows -

/usr/bin/mongod -f /opt/mongodb/mongod.conf & cd /eos/build; make test

Your setup may be different than mine, but key seems to be verifying first that mongod runs, and second seems to be making sure that the resource paths specified exist on some level (even if blank).

@StepOITD
Copy link

I am on branch 269f084
and still I got this
`Test project /Users/constantine/Desktop/eos/build
Start 1: test_cypher_suites
1/32 Test #1: test_cypher_suites ..................... Passed 0.03 sec
Start 2: validate_simple.token_abi
2/32 Test #2: validate_simple.token_abi .............. Passed 0.06 sec
Start 3: validate_eosio.token_abi
3/32 Test #3: validate_eosio.token_abi ............... Passed 0.05 sec
Start 4: validate_eosio.msig_abi
4/32 Test #4: validate_eosio.msig_abi ................ Passed 0.05 sec
Start 5: validate_multi_index_test_abi
5/32 Test #5: validate_multi_index_test_abi .......... Passed 0.05 sec
Start 6: validate_eosio.system_abi
6/32 Test #6: validate_eosio.system_abi .............. Passed 0.05 sec
Start 7: validate_identity_abi
7/32 Test #7: validate_identity_abi .................. Passed 0.06 sec
Start 8: validate_identity_test_abi
8/32 Test #8: validate_identity_test_abi ............. Passed 0.05 sec
Start 9: validate_currency_abi
9/32 Test #9: validate_currency_abi .................. Passed 0.05 sec
Start 10: validate_stltest_abi
10/32 Test #10: validate_stltest_abi ................... Passed 0.05 sec
Start 11: validate_exchange_abi
11/32 Test #11: validate_exchange_abi .................. Passed 0.05 sec
Start 12: validate_test.inline_abi
12/32 Test #12: validate_test.inline_abi ............... Passed 0.06 sec
Start 13: validate_asserter_abi
13/32 Test #13: validate_asserter_abi .................. Passed 0.05 sec
Start 14: validate_infinite_abi
14/32 Test #14: validate_infinite_abi .................. Passed 0.05 sec
Start 15: validate_proxy_abi
15/32 Test #15: validate_proxy_abi ..................... Passed 0.05 sec
Start 16: validate_test_api_abi
16/32 Test #16: validate_test_api_abi .................. Passed 0.06 sec
Start 17: validate_test_api_mem_abi
17/32 Test #17: validate_test_api_mem_abi .............. Passed 0.05 sec
Start 18: validate_test_api_db_abi
18/32 Test #18: validate_test_api_db_abi ............... Passed 0.05 sec
Start 19: validate_test_api_multi_index_abi
19/32 Test #19: validate_test_api_multi_index_abi ...... Passed 0.05 sec
Start 20: validate_eosio.bios_abi
20/32 Test #20: validate_eosio.bios_abi ................ Passed 0.05 sec
Start 21: validate_noop_abi
21/32 Test #21: validate_noop_abi ...................... Passed 0.06 sec
Start 22: validate_dice_abi
22/32 Test #22: validate_dice_abi ...................... Passed 0.05 sec
Start 23: validate_tic_tac_toe_abi
23/32 Test #23: validate_tic_tac_toe_abi ............... Passed 0.06 sec
Start 24: chain_test_binaryen
24/32 Test #24: chain_test_binaryen .................... Passed 64.59 sec
Start 25: chain_test_wavm
25/32 Test #25: chain_test_wavm ........................ Passed 159.10 sec
Start 26: nodeos_run_test
26/32 Test #26: nodeos_run_test ........................ Passed 53.57 sec
Start 27: nodeos_run_remote_test
27/32 Test #27: nodeos_run_remote_test ................. Passed 53.79 sec
Start 28: p2p_dawn515_test
28/32 Test #28: p2p_dawn515_test ....................... Passed 1.05 sec
Start 29: nodeos_run_test-mongodb
29/32 Test #29: nodeos_run_test-mongodb ................***Failed 0.35 sec
Start 30: distributed-transactions-test
30/32 Test #30: distributed-transactions-test .......... Passed 46.23 sec
Start 31: distributed-transactions-remote-test
31/32 Test #31: distributed-transactions-remote-test ... Passed 60.35 sec
Start 32: restart-scenarios-test_resync
32/32 Test #32: restart-scenarios-test_resync .......... Passed 134.10 sec

97% tests passed, 1 tests failed out of 32

Total Test time (real) = 574.39 sec

The following tests FAILED:
29 - nodeos_run_test-mongodb (Failed)
Errors while running CTest
make: *** [test] Error 8`
My OS isMacOS 10.13.1

@StepOITD
Copy link

I have figured out that nodeos_run_test-mongodb may be related to some permission issues on my MacOS.

cd ~
sudo chmod 777 .mongorc.js

will fix the error.
There are many issues building the project on mac, can I commit a GUIDE about building on MacOS? @PaulCalabrese

@rectinajh
Copy link

i meet the problem.

build:5.18.2018
ubuntu16.04,
git clone https://github.com/EOSIO/eos --recursive

2018-05-10 5 23 48

2018-05-10 5 23 21

@trigx300
Copy link

trigx300 commented Jun 4, 2018

having a similar issue:

82% tests passed, 6 tests failed out of 34

Total Test time (real) = 491.83 sec

The following tests FAILED:
29 - nodeos_run_test (Failed)
30 - nodeos_run_remote_test (Failed)
31 - distributed-transactions-test (Failed)
32 - distributed-transactions-remote-test (Failed)
33 - restart-scenarios-test_hard_replay (Failed)
34 - validate_dirty_db_test (Failed)
Errors while running CTest
Makefile:151: recipe for target 'test' failed
make: *** [test] Error 8

@BenAlthauser
Copy link

@trigx300 - I hit a similar problem when the directory wasn't chowned by the user I was (other than root).
Try sudo chown -R yourusername build

@trigx300
Copy link

trigx300 commented Jun 4, 2018

@falkon303 Thanks! That worked

@nb312
Copy link

nb312 commented Jul 27, 2018

I have the same error.

98% tests passed, 1 tests failed out of 41

Label Time Summary:
long_running_tests    = 1266.83 sec (2 tests)

Total Test time (real) = 2399.73 sec

The following tests FAILED:
	 34 - nodeos_run_test-mongodb (Failed)
Errors while running CTest
Makefile:61: recipe for target 'test' failed
make: *** [test] Error 8

@RyoNgs
Copy link

RyoNgs commented Jul 27, 2018

this is my solution. about nodeos_run_test-mongodb failed.

  • OS : Ubuntu 18.04 LTS (Virtual Box)
  1. install mongo db core
    -> $ sudo apt-get install mongodb-server-core
  2. install mongo db client
    -> $ sudo apt install mongodb-clients
  3. test mongo db
    -> eosio/build/tests/nodeos_run_test.py --mongod -v --dump-error-detail >& mongo_test.out
  4. check log
    -> vi eosio/build/mongo_test.out

image

  1. build validation
    -> $ ~/opt/mongodb/bin/mongod -f ~/opt/mongodb/mongod.conf &
    -> $ cd eosio/build
    -> make test

@nb312
Copy link

nb312 commented Jul 27, 2018

@RyoNgs Thank you so much, I just install the mongo and logout then login, restart the terminal and then run the make test, it is well done.
So, I think if other meet this issue, he needs to restart the pc or log out, then excuse the command line above.

@jimenezfer
Copy link

jimenezfer commented Oct 4, 2018

You have to :

$ sudo mkdir -p /data/db

$ sudo chown -R yourusername /data/db

and then just give the appropriate read and write permissions to /data/db

this will give a passed message on nodeos_run_test-mongodb.

as @falkon303 mentioned the dir was missing and lacked user ownership and read and write permisions.

@raisezhang
Copy link

I have the same error.

image

@RyoNgs It works on Mac? or Anybody solves it?

@RyoNgs
Copy link

RyoNgs commented Dec 27, 2018

@raisezhang i works on Ubuntu 18.04

if you already installed 'mongodb-server-core', 'mongodb-clients'
and input below command before running 'make test'
-> $ ~/opt/mongodb/bin/mongod -f ~/opt/mongodb/mongod.conf &

if 'nodeos_run_test-mongodb' fails again, I think there will be no problem using the entire eosio system and mongodb plugin.
(but, installation of 'mongodb-server-core', 'mongodb-clients' is essential for use mongodb plugin)

i think the test is just a test.

i also keep failing 'nodeos_run_test-mongodb'.
however, it is working without any problems.

@raisezhang
Copy link

@RyoNgs Thank you so much~

i also keep failing 'nodeos_run_test-mongodb'.
however, it is working without any problems.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests