Having MongoDB Startup Errors!

August 13, 2017 596 views
MongoDB Ubuntu 16.04

Hey!
Greetings!

So recently I was thinking of resetting my nodebb forums when I had an error after deleting the database I couldn't create a user. So what I thought was to delete MongoDB v3.2 again not 3.4 its 3.2 for my nodebb forums. I deleted the /var/lib/ files the /etc/ and that systemd files! When trying to install I can't startup mongod and when I do service mongod start it says that not there and when I do service mongod status it shows a error! I think I have messed up something in the mongod.service as I deleted it I readded it to work with systemctl still NP chance! I have also asked a friend to myne to help out if he could I'll notify as well!

Thanks/
Kind regards,
/shar

3 comments
  • I'll forward any of the terminal outputs if needed!

  • Whenever I execute `service mongod status it shows....

    ● mongod.service                                                                                    
       Loaded: not-found (Reason: No such file or directory)                                            
       Active: failed (Result: exit-code) since Sun 2017-08-13 01:40:02 UTC; 12h ago                    
     Main PID: 1421 (code=exited, status=100)                                                           
    
    Aug 13 01:40:00 Cobra-Server systemd[1]: Started High-performance, schema-free document-oriented dat
    Aug 13 01:40:02 Cobra-Server systemd[1]: mongod.service: Main process exited, code=exited, status=10
    Aug 13 01:40:02 Cobra-Server systemd[1]: mongod.service: Unit entered failed state.                 
    Aug 13 01:40:02 Cobra-Server systemd[1]: mongod.service: Failed with result 'exit-code'.
    
  • When I execute service mongod start it shows....

    Failed to start mongod.service: Unit mongod.service not found.
    

    But I have mongod.service at /lib/systemd/system``

1 Answer

Try:

sudo systemctl enable mongod

Ensure you've got the correct config in etc/mongod.conf and then:

sudo service mongod restart

Have another answer? Share your knowledge.