question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MongoDB connection always fail

See original GitHub issue

I am first time user of MongoDB and Node, so i am sorry for maybe asking stupid questions.

  1. There should be noted somewhere in install that you need MongoDB
  2. on a fresh vps i installed nodejs v0.10.4 and mongodb (dont know how to see version, from tutorial on net). There is no firewall running i installed uptime as per readme and i always get
[root@m uptime]# node app
loading plugin ./plugins/console on app
loading plugin ./plugins/patternMatcher on app
loading plugin ./plugins/httpOptions on app
   info  - socket.io started
loading plugin ./plugins/patternMatcher on monitor
loading plugin ./plugins/httpOptions on monitor
Monitor origin started
Express server listening on host localhost, port 8082 in development mode
MongoDB error: auth failed
Make sure a mongoDB server is running and accessible by this application

i get no errors while installing. Than i created mongodb with robomongo gui, added user with read/write and change details in default.yaml config. error is same. Can you please explain install proces to users that are less tehnical about this, because if you do exactly like in video or in readme, you cant run this… Thanks

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:16

github_iconTop GitHub Comments

6reactions
gfornaricommented, Aug 31, 2015

I had the same issue. If you don’t have the authentication enabled, the solution is to configure your connection URI string without credentials in the config/default.yaml file.

With a local database, the connectionString parameter should resemble to

connectionString: mongodb://localhost:27017/uptime
0reactions
drewbeercommented, Sep 11, 2015

a fresh install of the uptime repo solved my problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: couldn't connect to server 127.0.0.1:27017 - MongoDB
Your connection from client to server is blocked by firewall or network configuration · A MongoDB server is not listening on the requested...
Read more >
Couldn't connect to server 127.0.0.1:27017 - Stack Overflow
The log indicates that mongodb is terminating because there is an old lock file. If you are not and were ...
Read more >
Mongodb exception: connect failed - DBA Stack Exchange
So, restart your mongod sudo service mongodb restart , try now to connect it mongo . If you want to see what happens...
Read more >
Mongodb connection refused 127.0.0.1:27017 error solved
solved: Mongodb Error : couldn't connect to server 127.0.0.1:27017, connection attempt failed : solved in less than 2 minutes.
Read more >
Mongodb Error : couldn't connect to server 127.0 ... - YouTube
solved: Mongodb Error : couldn't connect to server 127.0.0.1:27017, connection attempt failed : solved in less than 2 minutes.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found