Connection refused: Course Lab IDE

I have connected my laptop to Mobile Hotspot but the Lab IDE just does not connect. Any idea?

user@M103# mongo admin -u m103-admin -p m103-pass
MongoDB shell version v4.0.5
connecting to: mongodb://127.0.0.1:27017/admin?gssapiServiceName=mongodb
2022-03-14T16:37:39.276+0000 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:328:13
@(connect):1:6
exception: connect failed

means that there is no mongod running at the given host and port. In your case:

Which lab exactly? Lab number and title is important. Some labs, requires you to start mongod, some other indicates that mongod is already running. Most likely for this one, you had to start mongod yourself or connect to another port.

2 Likes