Question

Mongodb not working Need Help ASAP

So I’ve reinstalled and installed mongo multiple times, but it isn’t working.

 sudo systemctl status mongod
● mongod.service - MongoDB Database Server
     Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset>
     Active: failed (Result: exit-code) since Sun 2022-07-31 02:01:08 UTC; 4min>
       Docs: https://docs.mongodb.org/manual
   Main PID: 8278 (code=exited, status=14)

Jul 31 02:01:08 ku-node-backend systemd[1]: Started MongoDB Database Server.
Jul 31 02:01:08 ku-node-backend systemd[1]: mongod.service: Main process exited>
Jul 31 02:01:08 ku-node-backend systemd[1]: mongod.service: Failed with result >

I can go into the mongo console.

 mongo
MongoDB shell version v4.2.21
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("52ac93f3-defd-4570-84b7-cbe0495b45bc") }
MongoDB server version: 4.2.21

 mongo --eval 'db.runCommand({ connectionStatus: 1 })'
MongoDB shell version v4.2.21
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("f92d3c19-228e-41d7-b3c1-3a7a4ea9f54b") }
MongoDB server version: 4.2.21
{
        "authInfo" : {
                "authenticatedUsers" : [ ],
                "authenticatedUserRoles" : [ ]
        },
        "ok" : 1
}


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer