-2

mongod is running, but show this error as title.

[root ~]# sudo lsof -i:27017
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
mongod  1608 root    7u  IPv4  10941      0t0  TCP localhost:27017 (LISTEN)
mongod  1608 root   33u  IPv4  11283      0t0  TCP localhost:27017->localhost:30484 (ESTABLISHED)
mongod  1608 root   35u  IPv4  11285      0t0  TCP localhost:27017->localhost:30485 (ESTABLISHED)
mongod  1608 root   36u  IPv4  11288      0t0  TCP localhost:27017->localhost:30486 (ESTABLISHED)
mongod  1608 root   37u  IPv4  11290      0t0  TCP localhost:27017->localhost:30487 (ESTABLISHED)
mongod  1608 root   38u  IPv4  11292      0t0  TCP localhost:27017->localhost:30488 (ESTABLISHED)
0

mongod is the name of the Mongo daemon. This is what you specify if you want to start or stop the service. The command you may want to access the MongoDB shell is mongo. Does this solve your problem?

You may want to check the status of MongoDB to see if it is actually running: sudo systemctl status mongod

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.