Moped :: Errors :: ConnectionFailure无法连接到副本集的任何辅助或主节点 [英] Moped::Errors::ConnectionFailure Could not connect to any secondary or primary nodes for replica set

查看:115
本文介绍了Moped :: Errors :: ConnectionFailure无法连接到副本集的任何辅助或主节点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Ubuntu系统挂起后,我不得不强行关闭它.现在,在尝试运行我的Rails应用程序时出现此错误.

I had to forcefully shutdown my Ubuntu system after it got hanged. Now I get this error while trying to run my Rails app.

Moped::Errors::ConnectionFailure (Could not connect to any secondary or primary nodes for replica set <Moped::Cluster nodes=[<Moped::Node resolved_address="127.0.0.1:27017">]>):

我将Rails 3.2.11Mongoid 3.1.4一起使用.

有什么问题吗?

推荐答案

我能够通过删除mongod.lock文件并重新启动mongodb service

I was able to get it working by removing the mongod.lock file and restarting mongodb service

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

这篇关于Moped :: Errors :: ConnectionFailure无法连接到副本集的任何辅助或主节点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆