SiteCozy

  • My account

Where is the mongodb log file on Linux?

2018-09-21

Mongo copies logs in /var/log/mongodb/mongod.log. Consequently, you can take a look at the file by typing cat  /var/log/mongodb/mongod.log. For your information, if you run mongod -v at the prompt you see the last lines of the mongod.log file

Here is a log when Mongodb does not start:

[email protected]:/lib/systemd/system$ mongod -v
2018-09-21T20:56:41.063+0200 I CONTROL  [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2018-09-21T20:56:41.066+0200 D NETWORK  [main] fd limit hard:1048576 soft:1024 max conn: 819
2018-09-21T20:56:41.079+0200 I CONTROL  [initandlisten] MongoDB starting : pid=5202 port=27017 dbpath=/data/db 64-bit host=jojo-Z83-F
2018-09-21T20:56:41.079+0200 I CONTROL  [initandlisten] db version v4.0.2
2018-09-21T20:56:41.079+0200 I CONTROL  [initandlisten] git version: fc1573ba18aee42f97a3bb13b67af7d837826b47
2018-09-21T20:56:41.079+0200 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.1.0g  2 Nov 2017
2018-09-21T20:56:41.079+0200 I CONTROL  [initandlisten] allocator: tcmalloc
2018-09-21T20:56:41.079+0200 I CONTROL  [initandlisten] modules: none
2018-09-21T20:56:41.079+0200 I CONTROL  [initandlisten] build environment:
2018-09-21T20:56:41.079+0200 I CONTROL  [initandlisten]     distmod: ubuntu1804
2018-09-21T20:56:41.079+0200 I CONTROL  [initandlisten]     distarch: x86_64
2018-09-21T20:56:41.079+0200 I CONTROL  [initandlisten]     target_arch: x86_64
2018-09-21T20:56:41.079+0200 I CONTROL  [initandlisten] options: { systemLog: { verbosity: 1 } }
2018-09-21T20:56:41.079+0200 D -        [initandlisten] User Assertion: NonExistentPath: Data directory /data/db not found. src/mongo/db/storage/storage_engine_init.cpp 212
2018-09-21T20:56:41.080+0200 I STORAGE  [initandlisten] exception in initAndListen: NonExistentPath: Data directory /data/db not found., terminating
2018-09-21T20:56:41.080+0200 I CONTROL  [initandlisten] now exiting
2018-09-21T20:56:41.080+0200 I CONTROL  [initandlisten] shutting down with code:100

Related Posts:

  • How to install MongoDB community on ubuntu 18
  • How to install nodeBB on centos 7
  • How to fix the cyclic dependancy error in nodeJS/mongodb
Download our Broken link checker freeware here Buy a license key for the Sitecozy broken link checker

Customer Login

Lost password?

Categories

  • Webmaster advice
  • SEO advice
  • Web hosting
  • SiteCozy link checker KB
  • WordPress theme & plugin reviews
  • All articles
Disclosure: We are a professional review site that receives compensation from the companies whose products we review. We test each product thoroughly and give high marks to only the very best. We are independently owned and the opinions expressed here are our own.

Copyright Sitecozy 2018