Categories
Linux Mastering Development Ubuntu

Failed to connect to bus: No such file or directory

I am using debian 9
After enter this command sudo systemctl start mongod.service
it shows:

 Failed to connect to bus: No such file or directory 

But This command is working:

sudo systemctl enable mongod 

How to solve this problem?

And After entering this command mongo --eval 'db.runCommand({ connectionStatus: 1 })' it shows:

MongoDB shell version v4.0.17
connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb
2020-03-27T01:42:18.705+0530 E QUERY    [js] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
connect@src/mongo/shell/mongo.js:344:17
@(connect):2:6
exception: connect failed

Leave a Reply

Your email address will not be published. Required fields are marked *