mongoid connection issue

view full story

http://serverfault.com – I've been trying to use Mongoid with Rails on Ubuntu. Mongodb was working fine for me with rails app 3.0 to 3.2, today suddenly, i am getting error "/home/pravinmishra/.rvm/gems/ruby-1.9.2-p318/gems/mongo-1.5.2/lib/mongo/connection.rb:413:in `connect': Failed to connect to a master node at localhost:27017 (Mongo::ConnectionFailure)" Many times i face this issues, and below commands works for me. sudo rm /var/lib/mongodb/mongod.lock sudo -u mongodb mongod -f /etc/mongodb.conf --repair sudo start mongodb sudo status mongodb when i m connecting from ubunto termial using mongo then getting er (HowTos)