Failed to connect mongodb server
arjan@controller:~$ mongo
MongoDB shell version: 2.4.9
connecting to: test
Mon Jul 4 06:17:02.603 Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145
exception: connect failed
arjan@controller:~$
I cannot connect to mongo database to install telemetry services
I have tried the following:
stop the mongodb service
deleting /var/lib/mongodb/mongodb.lock
then repairing the database by mongod --repair
and then start the mongodb service again
It didn't work the mongodb.lock file appears any how.
Please help
You may want to pull the mongo logs and post them to paste.openstack.org then add it to the ticket. Other issues similar to this said that the user needed to remove the current lock file, then restart, but I don't know if that will resolve it.
http://paste.openstack.org/show/528897/ (Logs pasted)
Be sure the directory /data/db has mongodb as owner. All files in that directory should have mongodb owner and group. Also if selinux is enforcing, set context on /data/db recursively to system_u:object_r:mongod_var_lib_t.