mongo.js:L112 Error: couldn't connect to server 127.0.0.1:27017 atsrc/mongo/shell/mongo.js:L112

mongo.js:L112 Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:L112

Stop mongodb service

sudo service mongodb stop

Remove mongodb lock file

sudo rm /var/lib/mongodb/mongod.lock

Change ownership from root to mongodb path

sudo chown -R mongodb:mongodb /var/lib/mongodb/

Start mongodb service

sudo service mongodb start

Test mongo app

mongo

Then you will be able to execute successfully (i hope).

Comments

Post a Comment

Popular posts from this blog

Debug Nodejs inside docker container

Swap primary keys between two records in the same table in Postgres

How to add a bootstrap table with fixed header and scrollable body