Mongo --port 27000 connect failed on windows command

I use windows command to do the lab.
I run below command to launch mongod instance on vagrant ssh client:
mongod --port 27000 --dbpath /data/db --bind_ip “127.0.0.1, 192.168.103.100”.
mongod%20command
mongod%20status
Then I open a new window command to run mongo --port 27000, I got the error like:
MongoDB shell version v4.0.5
connecting to: mongodb://127.0.0.1:27000/?gssapiServiceName=mongodb
2019-02-19T16:48:23.201+0800 E QUERY [js] Error: couldn’t connect to server 127.0.0.1:27000, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27000 :: caused by :: No connection could be made because the target machine actively refused it. :
connect@src/mongo/shell/mongo.js:328:13
@(connect):1:6
exception: connect failed
Untitled%20picture

your second shell is not in the vagrant instance
try to connect back to m103 first

1 Like

Thanks. I can connect now.