Csrs_1.conf: error

I encountered the error.

vagrant@m103:~$ mongod -f csrs_1.conf
about to fork child process, waiting until server is ready for connections.
forked process: 2533
ERROR: child process failed, exited with error number 51
To see additional information in this output, start without the “–fork” option.

And I’ve also checked csrs1.log file below.
I don’t know. why csrs data file can’t be created.

2020-02-22T20:13:25.950+0000 I STORAGE [initandlisten] exception in initAndListen: NonExistentPath: Data directory /var/mongodb/db/csrs1 not found., terminating

Can you please help me out to fix the problem?

2020-02-22T20:13:25.950+0000 I CONTROL [initandlisten] MongoDB starting : pid=2480 port=26001 dbpath=/var/mongodb/db/csrs1 64-bit host=m103
2020-02-22T20:13:25.950+0000 I CONTROL [initandlisten] db version v3.6.17
2020-02-22T20:13:25.950+0000 I CONTROL [initandlisten] git version: 3d6953c361213c5bfab23e51ab274ce592edafe6
2020-02-22T20:13:25.950+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1f 6 Jan 2014
2020-02-22T20:13:25.950+0000 I CONTROL [initandlisten] allocator: tcmalloc
2020-02-22T20:13:25.950+0000 I CONTROL [initandlisten] modules: enterprise
2020-02-22T20:13:25.950+0000 I CONTROL [initandlisten] build environment:
2020-02-22T20:13:25.950+0000 I CONTROL [initandlisten] distmod: ubuntu1404
2020-02-22T20:13:25.950+0000 I CONTROL [initandlisten] distarch: x86_64
2020-02-22T20:13:25.950+0000 I CONTROL [initandlisten] target_arch: x86_64
2020-02-22T20:13:25.950+0000 I CONTROL [initandlisten] options: { config: “csrs_1.conf”, net: { bindIp: “192.168.103.100,localhost”, port: 26001 }, processManagement: { fork: true }, replication: { replSetName: “m103-csrs” }, security: { keyFile: “/var/mongodb/pki/m103-keyfile” }, sharding: { clusterRole: “configsvr” }, storage: { dbPath: “/var/mongodb/db/csrs1” }, systemLog: { destination: “file”, logAppend: true, path: “/var/mongodb/db/csrs1.log” } }
2020-02-22T20:13:25.950+0000 I STORAGE [initandlisten] exception in initAndListen: NonExistentPath: Data directory /var/mongodb/db/csrs1 not found., terminating
2020-02-22T20:13:25.950+0000 F - [initandlisten] Invariant failure globalStorageEngine src/mongo/db/service_context_d.cpp 272
2020-02-22T20:13:25.950+0000 F - [initandlisten]

***aborting after invariant() failure

2020-02-22T20:13:25.957+0000 F - [initandlisten] Got signal: 6 (Aborted).

0x7ff3173d1ba1 0x7ff3173d0db9 0x7ff3173d129d 0x7ff312124330 0x7ff311d81c37 0x7ff311d85028 0x7ff315996f58 0x7ff315b86cc8 0x7ff31724d271 0x7ff317249357 0x7ff315a145d3 0x7ff3173ccf65 0x7ff315998131 0x7ff31592b70c 0x7ff315a1bf5a 0x7ff315999089 0x7ff311d6cf45 0x7ff315a040cf
----- BEGIN BACKTRACE -----
{“backtrace”:[{“b”:“7FF314FC8000”,“o”:“2409BA1”,“s”:"_ZN5mongo15printStackTraceERSo"},{“b”:“7FF314FC8000”,“o”:“2408DB9”},{“b”:“7FF314FC8000”,“o”:“240929D”},{“b”:“7FF312114000”,“o”:“10330”},{“b”:“7FF311D4B000”,“o”:“36C37”,“s”:“gsignal”},{“b”:“7FF311D4B000”,“o”:“3A028”,“s”:“abort”},{“b”:“7FF314FC8000”,“o”:“9CEF58”,“s”:"_ZN5mongo22invariantFailedWithMsgEPKcS1_S1_j"},{“b”:“7FF314FC8000”,“o”:“BBECC8”,“s”:"_ZN5mongo20ServiceContextMongoD9_newOpCtxEPNS_6ClientEj"},{“b”:“7FF314FC8000”,“o”:“2285271”,“s”:"_ZN5mongo14ServiceContext20makeOperationContextEPNS_6ClientE"},{“b”:“7FF314FC8000”,“o”:“2281357”,“s”:"_ZN5mongo6Client20makeOperationContextEv"},{“b”:“7FF314FC8000”,“o”:“A4C5D3”},{“b”:“7FF314FC8000”,“o”:“2404F65”},{“b”:“7FF314FC8000”,“o”:“9D0131”,“s”:"_ZN5mongo8shutdownENS_8ExitCodeERKNS_16ShutdownTaskArgsE"},{“b”:“7FF314FC8000”,“o”:“96370C”,“s”:"_ZZN5mongo13duration_castINS_8DurationISt5ratioILl1ELl1000EEEES2_ILl1ELl1EEEET_RKNS1_IT0_EEENKUlvE_clEv"},{“b”:“7FF314FC8000”,“o”:“A53F5A”,“s”:“ZN5mongo11mongoDbMainEiPPcS1”},{“b”:“7FF314FC8000”,“o”:“9D1089”,“s”:“main”},{“b”:“7FF311D4B000”,“o”:“21F45”,“s”:"__libc_start_main"},{“b”:“7FF314FC8000”,“o”:“A3C0CF”}],“processInfo”:{ “mongodbVersion” : “3.6.17”, “gitVersion” : “3d6953c361213c5bfab23e51ab274ce592edafe6”, “compiledModules” : [ “enterprise” ], “uname” : { “sysname” : “Linux”, “release” : “3.13.0-170-generic”, “version” : “#220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019”, “machine” : “x86_64” }, “somap” : [ { “b” : “7FF314FC8000”, “elfType” : 3, “buildId” : “6ACAF269F5944FAB5A293A46CBA9DEA6B6F74E3A” }, { “b” : “7FFC4E4EF000”, “elfType” : 3, “buildId” : “8BEB43CA1BD4CFDB90BC2BFCE0EC3042E4090782” }, { “b” : “7FF314B3C000”, “path” : “/usr/lib/x86_64-linux-gnu/libcurl.so.4”, “elfType” : 3, “buildId” : “4ACB08147817E6291B181CEF491FB4724336AC04” }, { “b” : “7FF3146CF000”, “path” : “/usr/lib/x86_64-linux-gnu/libnetsnmpmibs.so.30”, “elfType” : 3, “buildId” : “931606F6B9E4CCB05C628D0525E564CE5E7A2DB4” }, { “b” : “7FF3144C0000”, “path” : “/usr/lib/x86_64-linux-gnu/libsensors.so.4”, “elfType” : 3, “buildId” : “859FDBFDD82F0EFDEB44A433D9D8020A232A35E2” }, { “b” : “7FF3142BC000”, “path” : “/lib/x86_64-linux-gnu/libdl.so.2”, “elfType” : 3, “buildId” : “1B38A86853776548628FA4090913C7A12C8F3F4D” }, { “b” : “7FF314053000”, “path” : “/usr/lib/x86_64-linux-gnu/libnetsnmpagent.so.30”, “elfType” : 3, “buildId” : “AD37989D875C4B4DAAF96CD26387B8BFBAA9EE4F” }, { “b” : “7FF313E49000”, “path” : “/lib/x86_64-linux-gnu/libwrap.so.0”, “elfType” : 3, “buildId” : “54FCBC5B0F994A13A9B0EAD46F23E7DA7F7FE75B” }, { “b” : “7FF313B6F000”, “path” : “/usr/lib/x86_64-linux-gnu/libnetsnmp.so.30”, “elfType” : 3, “buildId” : “2A8B93895720278AAE3C1C44E38A217A4A83E134” }, { “b” : “7FF313792000”, “path” : “/lib/x86_64-linux-gnu/libcrypto.so.1.0.0”, “elfType” : 3, “buildId” : “0430E61DA2B4291F7CE5512101F7AE23C93236D4” }, { “b” : “7FF313577000”, “path” : “/usr/lib/x86_64-linux-gnu/libsasl2.so.2”, “elfType” : 3, “buildId” : “666B276BD134B0E9579B67D4EE333F2D0FB813CD” }, { “b” : “7FF313326000”, “path” : “/usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2”, “elfType” : 3, “buildId” : “372822D0E17BF7C615B6345E5ECEFB1B27BCA57B” }, { “b” : “7FF313117000”, “path” : “/usr/lib/x86_64-linux-gnu/liblber-2.4.so.2”, “elfType” : 3, “buildId” : “B39BBBBA44739593151523E5F03459BC3E2D3205” }, { “b” : “7FF312ED0000”, “path” : “/usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2”, “elfType” : 3, “buildId” : “F53E78DECA2C22259B2FD54DC32C9E3B010BBBF8” }, { “b” : “7FF312BCA000”, “path” : “/lib/x86_64-linux-gnu/libm.so.6”, “elfType” : 3, “buildId” : “1B288F3B11CB908F03FA568752126AD1AE3C6D1E” }, { “b” : “7FF3129AF000”, “path” : “/lib/x86_64-linux-gnu/libresolv.so.2”, “elfType” : 3, “buildId” : “9FCED6C1BB3F783375497F9C98FF2CF025ABBEBB” }, { “b” : “7FF312750000”, “path” : “/lib/x86_64-linux-gnu/libssl.so.1.0.0”, “elfType” : 3, “buildId” : “5BB10EACF0B497C21806AACAAF45C36328E831A3” }, { “b” : “7FF312548000”, “path” : “/lib/x86_64-linux-gnu/librt.so.1”, “elfType” : 3, “buildId” : “D27A253ACFC83E639AE80A606BBA2C058302D07A” }, { “b” : “7FF312332000”, “path” : “/lib/x86_64-linux-gnu/libgcc_s.so.1”, “elfType” : 3, “buildId” : “36311B4457710AE5578C4BF00791DED7359DBB92” }, { “b” : “7FF312114000”, “path” : “/lib/x86_64-linux-gnu/libpthread.so.0”, “elfType” : 3, “buildId” : “C4D728AC02A328301C070F5C220B826492273FCD” }, { “b” : “7FF311D4B000”, “path” : “/lib/x86_64-linux-gnu/libc.so.6”, “elfType” : 3, “buildId” : “5A49BF8DEF435AC3FE9208DF3C6B5622FE347A97” }, { “b” : “7FF314DA3000”, “path” : “/lib64/ld-linux-x86-64.so.2”, “elfType” : 3, “buildId” : “2C5922FE5D8F6A77F42349579B5D9AF51E17C591” }, { “b” : “7FF311B18000”, “path” : “/usr/lib/x86_64-linux-gnu/libidn.so.11”, “elfType” : 3, “buildId” : “A4CF3D2F3AD65050A8199AFC54BD29893EE88902” }, { “b” : “7FF3118FE000”, “path” : “/usr/lib/x86_64-linux-gnu/librtmp.so.0”, “elfType” : 3, “buildId” : “B194D58FAD21CCFA9B4321CA687678D82B712994” }, { “b” : “7FF3116E5000”, “path” : “/lib/x86_64-linux-gnu/libz.so.1”, “elfType” : 3, “buildId” : “61ECB1C9E746126B3CCCC7E82705E539ECAEC3AB” }, { “b” : “7FF31135C000”, “path” : “/usr/lib/libperl.so.5.18”, “elfType” : 3, “buildId” : “3B7B9ECBAD558BC0248513DA1FDFF1A9D1C0B8C2” }, { “b” : “7FF311142000”, “path” : “/lib/x86_64-linux-gnu/libnsl.so.1”, “elfType” : 3, “buildId” : “313621B833833F024B472A4ADDB794FE9AE20188” }, { “b” : “7FF310F04000”, “path” : “/usr/lib/x86_64-linux-gnu/libgssapi.so.3”, “elfType” : 3, “buildId” : “3DD3615C50982A067E390FC2443D7EF749ADAA4D” }, { “b” : “7FF310C45000”, “path” : “/usr/lib/x86_64-linux-gnu/libgnutls.so.26”, “elfType” : 3, “buildId” : “31C8FF1B8CFAA077ECE92C00C11FCAB72272C5E2” }, { “b” : “7FF3109C5000”, “path” : “/lib/x86_64-linux-gnu/libgcrypt.so.11”, “elfType” : 3, “buildId” : “75E1DDBDFDD5DB837EC6E83928DB65A0A3CE4084” }, { “b” : “7FF3106FA000”, “path” : “/usr/lib/x86_64-linux-gnu/libkrb5.so.3”, “elfType” : 3, “buildId” : “35C054BECC0C5FB1AE9CDF7CDFA4F54089878BF0” }, { “b” : “7FF3104CB000”, “path” : “/usr/lib/x86_64-linux-gnu/libk5crypto.so.3”, “elfType” : 3, “buildId” : “0788D6F3B7675F5373F8D2F66D8284ADB7D2B7B7” }, { “b” : “7FF3102C7000”, “path” : “/lib/x86_64-linux-gnu/libcom_err.so.2”, “elfType” : 3, “buildId” : “8D56938ABD6462C4C29822D8E48A131BE1C61F6A” }, { “b” : “7FF3100BC000”, “path” : “/usr/lib/x86_64-linux-gnu/libkrb5support.so.0”, “elfType” : 3, “buildId” : “3D4F9028A10CC566F8CDC9FEFB09683B8A20FB92” }, { “b” : “7FF30FE83000”, “path” : “/lib/x86_64-linux-gnu/libcrypt.so.1”, “elfType” : 3, “buildId” : “8C9454C84B882A57EAA28D8F8D92F8D2C8B21A79” }, { “b” : “7FF30FC7A000”, “path” : “/usr/lib/x86_64-linux-gnu/libheimntlm.so.0”, “elfType” : 3, “buildId” : “F284B367B83FC07B7309FA086DC6634C9CC8A005” }, { “b” : “7FF30F9F2000”, “path” : “/usr/lib/x86_64-linux-gnu/libkrb5.so.26”, “elfType” : 3, “buildId” : “7CC32240A00456FA57B74BFB922E31BA8EEF57C2” }, { “b” : “7FF30F751000”, “path” : “/usr/lib/x86_64-linux-gnu/libasn1.so.8”, “elfType” : 3, “buildId” : “7CF4C34552B60E44902EA2DFCC4EE4906A90DE3C” }, { “b” : “7FF30F51E000”, “path” : “/usr/lib/x86_64-linux-gnu/libhcrypto.so.4”, “elfType” : 3, “buildId” : “5F0EF0E1DDE5070F686668B93E6A9BEC44D83220” }, { “b” : “7FF30F309000”, “path” : “/usr/lib/x86_64-linux-gnu/libroken.so.18”, “elfType” : 3, “buildId” : “DF1229739A9F5E6A9850B519C95D8A811B63B8EF” }, { “b” : “7FF30F0F5000”, “path” : “/usr/lib/x86_64-linux-gnu/libtasn1.so.6”, “elfType” : 3, “buildId” : “1477FEC6F18A279343616F89650A2737E83358C0” }, { “b” : “7FF30EEB3000”, “path” : “/usr/lib/x86_64-linux-gnu/libp11-kit.so.0”, “elfType” : 3, “buildId” : “D4B5C925023E4142D335EEFB6106F47245A3F97C” }, { “b” : “7FF30ECAE000”, “path” : “/lib/x86_64-linux-gnu/libgpg-error.so.0”, “elfType” : 3, “buildId” : “38CA3EE1AE3847D38BF2F3ED9CA1A17FAC217CF7” }, { “b” : “7FF30EAAA000”, “path” : “/lib/x86_64-linux-gnu/libkeyutils.so.1”, “elfType” : 3, “buildId” : “0F03635F97B93D3DACD84F0ED363C56BD266044F” }, { “b” : “7FF30E881000”, “path” : “/usr/lib/x86_64-linux-gnu/libwind.so.0”, “elfType” : 3, “buildId” : “DBCF291C6CF70F0D0BF62F07347AEF28E040E1A5” }, { “b” : “7FF30E673000”, “path” : “/usr/lib/x86_64-linux-gnu/libheimbase.so.1”, “elfType” : 3, “buildId” : “F4FDBD38788250E843523FFEA869A4DA933B6BBC” }, { “b” : “7FF30E42A000”, “path” : “/usr/lib/x86_64-linux-gnu/libhx509.so.5”, “elfType” : 3, “buildId” : “C03FF77D3A35A40589C712C74A8597FF532C8ED7” }, { “b” : “7FF30E171000”, “path” : “/usr/lib/x86_64-linux-gnu/libsqlite3.so.0”, “elfType” : 3, “buildId” : “183703AF20E0C5BC50D86864CF0FA578F79564DB” }, { “b” : “7FF30DF69000”, “path” : “/usr/lib/x86_64-linux-gnu/libffi.so.6”, “elfType” : 3, “buildId” : “C114D2C23BD2F3B1705F37FBF9CA06163C8B89A6” } ] }}
mongod(_ZN5mongo15printStackTraceERSo+0x41) [0x7ff3173d1ba1]
mongod(+0x2408DB9) [0x7ff3173d0db9]
mongod(+0x240929D) [0x7ff3173d129d]
libpthread.so.0(+0x10330) [0x7ff312124330]
libc.so.6(gsignal+0x37) [0x7ff311d81c37]
libc.so.6(abort+0x148) [0x7ff311d85028]
mongod(_ZN5mongo22invariantFailedWithMsgEPKcS1_S1_j+0x0) [0x7ff315996f58]
mongod(_ZN5mongo20ServiceContextMongoD9_newOpCtxEPNS_6ClientEj+0x158) [0x7ff315b86cc8]
mongod(_ZN5mongo14ServiceContext20makeOperationContextEPNS_6ClientE+0x41) [0x7ff31724d271]
mongod(_ZN5mongo6Client20makeOperationContextEv+0x27) [0x7ff317249357]
mongod(+0xA4C5D3) [0x7ff315a145d3]
mongod(+0x2404F65) [0x7ff3173ccf65]
mongod(_ZN5mongo8shutdownENS_8ExitCodeERKNS_16ShutdownTaskArgsE+0x364) [0x7ff315998131]
mongod(_ZZN5mongo13duration_castINS_8DurationISt5ratioILl1ELl1000EEEES2_ILl1ELl1EEEET_RKNS1_IT0_EEENKUlvE_clEv+0x0) [0x7ff31592b70c]
mongod(ZN5mongo11mongoDbMainEiPPcS1+0x87A) [0x7ff315a1bf5a]
mongod(main+0x9) [0x7ff315999089]
libc.so.6(__libc_start_main+0xF5) [0x7ff311d6cf45]
mongod(+0xA3C0CF) [0x7ff315a040cf]
----- END BACKTRACE -----

The very first error line indicates what the problem is:


It says, it doesn’t exist. You need to create /var/mongodb/db/csrs1

Yes. I know the problem. But no such error happened in the previous chapters at all.
As you can see the screen shot below, csrs1.log has been created and other data files like 1,2,3, node1, node2,… have been created successfully.

The file csrs1.log exists, but the directory csrs1 doesn’t exist. It’s the directory it’s complaining about. The storage.dbPath in your config file is pointing to that sub directory.

1 Like

My bad. I’ve created file instead of directory. :frowning: Thank you for the help.

:slightly_smiling_face: :+1:

Closing this thread as the issue has been resolved.