I have a rails-app which uses both mongoid and mongo. I use mongoid for my own models, and I use mongo because I have ruote with a ruote-mon storage.
In production however; I get
Mongo::ConnectionFailure: Failed to connect to a master node at localhost:27017
when I try to connect to the ruote storage. Even when I just do Mongo::MongoClient.new
Steps I have taken so far to try to resolve this:
-
I have made my mongodb an explicit master by setting
master = truein/etc/mongod.conf -
There are no $ENV variables set that could intervene with
Mongo::MongoClient.new(double checked) -
I have tried to connect using
Mongo::MongoClient.new(:slave_ok => true)– same error -
I have restarted my mongo database several times (w/o success).
-
I have checked my firewall settings and I can connect to localhost:27017 with telnet (as said, the mongoid documents can be fetched and stored w/o issue)
I am out of my wits… Any suggestions?
please look at: https://jira.mongodb.org/browse/RUBY-525
Should be fixed by the 1.8.2 mongo gem.