Octtavius
By:
Octtavius

Why I can't connect to MongoDB? exception: connect failed

December 9, 2016 2.8k views
MongoDB

When I type mongo it gives me error:

MongoDB shell version: 2.4.14
connecting to: test
Fri Dec  9 11:20:22.550 Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145
exception: connect failed

When I start the project, it says that failed to connect to server [localhost: 27017]

I was working before but when another app was deployed to server (that also uses mongodb) it stopped working.

I installed mongodb again but no success. :(

Could anyone tell me what is the problem?

1 Answer

Are you seeing any indication of an error or issue in your log files? This would be the first place to start when checking if the service has failed for some reason. If you can share any errors or warnings showing up there we can better assist in troubleshooting.

Have another answer? Share your knowledge.