Port 27017 cannot connect

For some reason, I can’t link my SSH to my instance of MongoDB, even though I’m on the right port number. This is a picture of what it’s showing: https://i.stack.imgur.com/fg82v.png It still says “waiting for connection” even though my shell is running.

I’ve been trying to install/connect to mongoDB for the last three hours and am extremely frustrated. any help is appreciated.

Hi @Jason_N_A1 and welcome to the MongoDB community forums. :wave:

Out of curiosity have you tried running any commands in the mongosh shell? If so what errors do you get?

Can you show how you’re running the mongod command. Are you supplying any parameters from the command line? Unfortunately that info is in the logs just a few lines before what’s been captured in the screen shot.

I see a message about FeatureCompatiblityVersion being 5.0.0 but according to the shell you’re using MongoDB 6.0.0. Did you upgrade from an older version of MongoDB?

I see you have Compass installed. What happens if you try to connect to the server from Compass? Do you see your list of databases?

1 Like