Don't start mongod - hw 1.3

when I try to start mongod process with x509 enable, the result is

vagrant@database:~/shared$ mongod --replSet CERT --dbpath m310-hw-1.3/r0 --logpath m310-hw-1.3/r0/mongo.log --port 31130 --fork --sslMode re
quireSSL --clusterAuthMode x509 --sslPEMKeyFile certs/client.pem --sslCAFile certs/ca.pem

about to fork child process, waiting until server is ready for connections.
forked process: 3622
ERROR: child process failed, exited with error number 51

what is wrong?

We can’t tell, because you did not show the log files :smiley:

I suggest that you look in the mongo.log file that you told the process to create.

here the log file

vagrant@database:~/shared$ less m310-hw-1.3/r0/mongo.log
2018-11-18T13:29:24.096+0000 I CONTROL [initandlisten] MongoDB starting : pid=4546 port=31130 dbpath=/home/vagrant/shared/m310-hw-1.3/r0 64-bit host=database
2018-11-18T13:29:24.097+0000 I CONTROL [initandlisten] db version v3.2.21
2018-11-18T13:29:24.098+0000 I CONTROL [initandlisten] git version: 1ab1010737145ba3761318508ff65ba74dfe8155
2018-11-18T13:29:24.098+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1f 6 Jan 2014
2018-11-18T13:29:24.099+0000 I CONTROL [initandlisten] allocator: tcmalloc
2018-11-18T13:29:24.099+0000 I CONTROL [initandlisten] modules: enterprise
2018-11-18T13:29:24.100+0000 I CONTROL [initandlisten] build environment:
2018-11-18T13:29:24.101+0000 I CONTROL [initandlisten] distmod: ubuntu1404
2018-11-18T13:29:24.106+0000 I CONTROL [initandlisten] distarch: x86_64
2018-11-18T13:29:24.109+0000 I CONTROL [initandlisten] target_arch: x86_64
2018-11-18T13:29:24.112+0000 I CONTROL [initandlisten] options: { net: { port: 31130, ssl: { CAFile: “certs/ca.pem”, PEMKeyFile: “certs/client.pem”, mode: “requireSSL” } }, processManagement: { fork: true }, replication: { replSet: “CERT” }, security: { clusterAuthMode: “x509” }, storage: { dbPath: “m310-hw-1.3/r0” }, systemLog: { destination: “file”, path: “m310-hw-1.3/r0/mongo.log” } }
2018-11-18T13:29:24.173+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=1G,session_max=20000,eviction=(threads_min=4,threads_max=4),config_2018-11-18T13:29:24.096+0000 I CONTROL [initandlisten] MongoDB starting : pid=4546 port=31130 dbpath=/home/vagrant/shared/m310-hw-1.3/r0 64-bit host=database
2018-11-18T13:29:24.097+0000 I CONTROL [initandlisten] db version v3.2.21
2018-11-18T13:29:24.098+0000 I CONTROL [initandlisten] git version: 1ab1010737145ba3761318508ff65ba74dfe8155
2018-11-18T13:29:24.098+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1f 6 Jan 2014
2018-11-18T13:29:24.099+0000 I CONTROL [initandlisten] allocator: tcmalloc
2018-11-18T13:29:24.099+0000 I CONTROL [initandlisten] modules: enterprise
2018-11-18T13:29:24.100+0000 I CONTROL [initandlisten] build environment:
2018-11-18T13:29:24.101+0000 I CONTROL [initandlisten] distmod: ubuntu1404
2018-11-18T13:29:24.106+0000 I CONTROL [initandlisten] distarch: x86_64
2018-11-18T13:29:24.109+0000 I CONTROL [initandlisten] target_arch: x86_64
2018-11-18T13:29:24.112+0000 I CONTROL [initandlisten] options: { net: { port: 31130, ssl: { CAFile: “certs/ca.pem”, PEMKeyFile: “certs/client.pem”, mode: “requireS
SL” } }, processManagement: { fork: true }, replication: { replSet: “CERT” }, security: { clusterAuthMode: “x509” }, storage: { dbPath: “m310-hw-1.3/r0” }, systemLog
: { destination: “file”, path: “m310-hw-1.3/r0/mongo.log” } }
2018-11-18T13:29:24.173+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=1G,session_max=20000,eviction=(threads_min=4,threads_max=4),config_
base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),s
tatistics_log=(wait=0),verbose=(recovery_progress),
2018-11-18T13:29:24.208+0000 E STORAGE [initandlisten] WiredTiger (22) [1542547764:208732][4546:0x7fbfbe858d00], connection: /home/vagrant/shared/m310-hw-1.3/r0/: d
base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),s
tatistics_log=(wait=0),verbose=(recovery_progress),
2018-11-18T13:29:24.208+0000 E STORAGE [initandlisten] WiredTiger (22) [1542547764:208732][4546:0x7fbfbe858d00], connection: /home/vagrant/shared/m310-hw-1.3/r0/: d
irectory-sync: fdatasync: Invalid argument
2018-11-18T13:29:24.209+0000 E STORAGE [initandlisten] WiredTiger (-31804) [1542547764:209670][4546:0x7fbfbe858d00], connection: the process must exit and restart:
WT_PANIC: WiredTiger library panic
2018-11-18T13:29:24.210+0000 I - [initandlisten] Fatal Assertion 28558
2018-11-18T13:29:24.211+0000 I - [initandlisten]

***aborting after fassert() failure

1a60c27 0x1b1e769 0x1afbf8d 0x1aaeaa2 0x1124136 0x1120383 0x104938e 0x9d99f0 0x98bd8d 0x7fbfbbef7f45 0x9d53b7
----- BEGIN BACKTRACE -----
{“backtrace”:[{“b”:“400000”,“o”:“FC9072”,“s”:"_ZN5mongo15printStackTraceERSo"},{“b”:“400000”,“o”:“FC81C9”},{“b”:“400000”,“o”:“FC89D2”},{“b”:“7FBFBC29F000”,“o”:“10330”},{“b”:“7FBFBBED6000”,“o”:“36C37”,“s”:“gsignal”},{“b”:“7FBFBBED6000”,“o”:“3A028”,“s”:“abort”},{“b”:“400000”,“o”:“F492D2”,“s”:"_ZN5mongo13fassertFailedEi"},{“b”:“400000”,“o”:“D3CC43”},{“b”:“400000”,“o”:“58B0AD”,“s”:"__wt_eventv"},{“b”:“400000”,“o”:“58B2AA”,“s”:"__wt_err"},{“b”:“400000”,“o”:“58B478”,“s”:"__wt_panic"},{“b”:“400000”,“o”:“1700EE7”},{“b”:“400000”,“o”:“170107D”},{“b”:“400000”,“o”:“1701A0B”},{“b”:“400000”,“o”:“16FDF31”,“s”:"__wt_open"},{“b”:“400000”,“o”:“1660C27”,“s”:"__wt_block_manager_create"},{“b”:“400000”,“o”:“171E769”,“s”:"__wt_schema_create"},{“b”:“400000”,“o”:“16FBF8D”,“s”:"__wt_turtle_init"},{“b”:“400000”,“o”:“16AEAA2”,“s”:“wiredtiger_open”},{“b”:“400000”,“o”:“D24136”,“s”:"_ZN5mongo18WiredTigerKVEngineC2ERKSsS2_S2_mbbb"},{“b”:“400000”,“o”:“D20383”},{“b”:“400000”,“o”:“C4938E”,“s”:"_ZN5mongo20ServiceContextMongoD29initializeGlobalStorageEngineEv"},{“b”:“400000”,“o”:“5D99F0”},{“b”:“400000”,“o”:“58BD8D”,“s”:“main”},{“b”:“7FBFBBED6000”,“o”:“21F45”,“s”:"__libc_start_main"},{“b”:“400000”,“o”:“5D53B7”}],“processInfo”:{ “mongodbVersion” : “3.2.21”, “gitVersion” : “1ab1010737145ba3761318508ff65ba74dfe8155”, “compiledModules” : [ …skipping…
nux-gnu/libkeyutils.so.1", “elfType” : 3, “buildId” : “0F03635F97B93D3DACD84F0ED363C56BD266044F” }, { “b” : “7FBFBA9D2000”, “path” : “/lib/x86_64-linux-gnu/libresolv.so.2”, “elfType” : 3, “buildId” : “AD304AFCE6847F7A4D66D22853E87CCBF5A66966” } ] }}
mongod(_ZN5mongo15printStackTraceERSo+0x32) [0x13c9072]
mongod(+0xFC81C9) [0x13c81c9]
mongod(+0xFC89D2) [0x13c89d2]
libpthread.so.0(+0x10330) [0x7fbfbc2af330]
libc.so.6(gsignal+0x37) [0x7fbfbbf0cc37]
libc.so.6(abort+0x148) [0x7fbfbbf10028]
mongod(_ZN5mongo13fassertFailedEi+0x82) [0x13492d2]
mongod(+0xD3CC43) [0x113cc43]
mongod(__wt_eventv+0x440) [0x98b0ad]
mongod(__wt_err+0x8D) [0x98b2aa]
mongod(__wt_panic+0x2E) [0x98b478]
mongod(+0x1700EE7) [0x1b00ee7]
mongod(+0x170107D) [0x1b0107d]
mongod(+0x1701A0B) [0x1b01a0b]
mongod(__wt_open+0x461) [0x1afdf31]
mongod(__wt_block_manager_create+0x57) [0x1a60c27]
mongod(__wt_schema_create+0x4D9) [0x1b1e769]
mongod(__wt_turtle_init+0x33D) [0x1afbf8d]
mongod(wiredtiger_open+0x1902) [0x1aaeaa2]
mongod(_ZN5mongo18WiredTigerKVEngineC2ERKSsS2_S2_mbbb+0x5B6) [0x1124136]
mongod(+0xD20383) [0x1120383]
mongod(_ZN5mongo20ServiceContextMongoD29initializeGlobalStorageEngineEv+0x59E) [0x104938e]
mongod(+0x5D99F0) [0x9d99f0]
mongod(main+0x15D) [0x98bd8d]
libc.so.6(__libc_start_main+0xF5) [0x7fbfbbef7f45]
mongod(+0x5D53B7) [0x9d53b7]
----- END BACKTRACE -----

Ahah!

Are you storing your database inside the shared directory? As in /shared or /home/vagrant/shared? I’ve found an article through Google (searching for “mongodb fdatasync”) which suggests that MongoDB does not support this.

So I would suggest making sure that your storage dir is somewhere else than the shared directory.

1 Like

thank you!!! now it working!

1 Like