Mongo DB无法连接到副本集的主节点

时间:2023-01-03 02:57:53

This is driving my crazy.

这让我发疯了。

I am starting Mongo in my terminal with:

我在我的终端开始使用Mongo:

mongod

I am on a OSX mavericks operating system. Mongo is installed, and I have been using it without any issues for quite some time.

我在OSX mavericks操作系统上。已经安装了Mongo,并且我已经使用它了很长一段时间没有任何问题。

Two days ago Mongo worked with no issue. The only change I've made between then and now is I installed Rubymine 6, from Rubymine 5.4.3.2.1.

两天前,Mongo没有任何问题。我在当时和现在之间唯一的变化是我从Rubymine 5.4.3.2.1安装了Rubymine 6。

This is the error I'm receiving:

这是我收到的错误:

> Could not connect to a primary node for replica set
> #<Moped::Cluster:70318211582520 @seeds=[<Moped::Node resolved_address="127.0.0.1:27017">]>

It's happening on this line of code:

它发生在这行代码上:

TempStore.create!(array: array, test_id: id)

and TempStore is a Mongo Model.

和TempStore是一个Mongo模型。

I've seen this error before when Mongo wasn't running, or at least a very similar error. However, Mongo is running and I can't find any reason that this error should be happening.

我在Mongo没有运行之前看到过这个错误,或者至少是一个非常类似的错误。但是,Mongo正在运行,我找不到任何理由发生此错误。

Any thoughts? I am running rails 4.0.0 and ruby 2.0.0.

有什么想法吗?我正在运行rails 4.0.0和ruby 2.0.0。

1 个解决方案

#1


0  

Please follow the instruction mention in the blog post.link

请按照博客post.link中提到的说明进行操作

#1


0  

Please follow the instruction mention in the blog post.link

请按照博客post.link中提到的说明进行操作