Validate new dbpath error

I’ve updated the config file so that dbpath goes to /var/mongodb/db. My config file only includes storage: and net: (where the two IP addresses and port 27000 were specified).

I can run MongoD with no issue, but I cannot run Mongo with the mongo command, and the validate command returns this message: “Client experienced a timeout when connecting to the database - check that mongod is running on the correct port, and that your user was created with the correct settings.”

This is the message that I get when I run Mongo :

vagrant@m103:~$ mongo

MongoDB shell version v3.6.16

connecting to: mongodb://

2019-12-24T18:22:21.305+0000 W NETWORK [thread1] Failed to connect to, in(checking socket for error after poll), reason: Connection refused

2019-12-24T18:22:21.305+0000 E QUERY [thread1] Error: couldn’t connect to server, connection attempt failed :



exception: connect failed

Any ideas?

When you say just mongo it will try to connect to default port 27017

You should connect using the port on which your mongod is running
mongo --port port_num

Could you please share the command you use to start mongod?

In addition, the output of

ps -aef | grep mongo

will be appreciated.

Closing this thread as the users has reported that this is a duplicate post.