Not even sure where to start. I am following the guide at:

https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-18-04

But when I get to Step 2, I enter sudo systemctl status mongodb and receive this result:

##################################
mongodb.service - An object/document-oriented database
   Loaded: loaded (/lib/systemd/system/mongodb.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2020-01-16 22:17:06 UTC; 2 weeks 5 days ago
     Docs: man:mongod(1)
 Main PID: 6859 (code=exited, status=100)

Jan 16 22:17:06 HothBase systemd[1]: Started An object/document-oriented database.
Jan 16 22:17:06 HothBase systemd[1]: mongodb.service: Main process exited, code=exited, status
Jan 16 22:17:06 HothBase systemd[1]: mongodb.service: Failed with result 'exit-code'.
####################################

Help!

edited by MattIPv4

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi @raphaelrashkin,

IF you try and start the mongodb, are there any errors generated or shown?

The command to start it should be

service mongodb start
or
systemctl start mongodb

If there aren’t any errors, then great, if there are, please do provide them here.

To see all the errors if starting fails, just type in

journalctl -xe

Looking forward to your next reply

Regards,
KDSys

  • Subject: Unit mongodb.service has begun start-up
    -- Defined-By: systemd
    -- Support: http://www.ubuntu.com/support
    -- 
    -- Unit mongodb.service has begun starting up.
    Aug 13 16:30:20 inovateosWeb mongodb[2570]:  * Starting database mongodb
    Aug 13 16:30:21 inovateosWeb mongodb[2570]:    ...fail!
    Aug 13 16:30:21 inovateosWeb systemd[1]: mongodb.service: Control process exited, code=exited status=1
    Aug 13 16:30:21 inovateosWeb systemd[1]: mongodb.service: Failed with result 'exit-code'.
    Aug 13 16:30:21 inovateosWeb systemd[1]: Failed to start LSB: An object/document-oriented database.
    -- Subject: Unit mongodb.service has failed
    -- Defined-By: systemd
    -- Support: http://www.ubuntu.com/support
    -- 
    -- Unit mongodb.service has failed.
    -- 
    -- The result is RESULT.
    
    edited by MattIPv4
    • Hi @inovateos,

      I’ve looked over the issue and it does seem like MongoDB has some issues at some version with starting.It seems in these cases, everyone went with reinstalling MongoDB.

      Having said that, please don’t try that yet, can you please first check your MongoDB log:

      /var/log/mongodb/mongodb.log
      

      And let me know what do you see there?

      Regards,
      KFSys

Submit an Answer