Saturday, November 23, 2013

Failed to connect to a master node at localhost:27017 (Mongo::ConnectionFailure)

Error: 

/home/sachin/.rvm/gems/ruby-1.9.3-p448@rails3/gems/mongo-1.9.2/lib/mongo/mongo_client.rb:486:in `connect': Failed to connect to a master node at localhost:27017 (Mongo::ConnectionFailure)

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

For start mongodb:
       
       sudo start mongodb
       It will give you: mongodb start/running, process 4994

For look at status for mongodb:

       sudo status mongodb 
       It will give you: mongodb start/running, process 4994
Reactions:

1 comment: