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 “,”.
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://
2019-02-19T16:48:23.201+0800 E QUERY [js] Error: couldn’t connect to server, connection attempt failed: SocketException: Error connecting to :: caused by :: No connection could be made because the target machine actively refused it. :
exception: connect failed

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

1 Like

Thanks. I can connect now.