Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-4097

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

    • Type: Icon: Task Task
    • Resolution: Done
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      On my local computer, I run a seed task to my staging server, using bundle exec rake db:seed RAILS_ENV=staging. It gives me the following error:

      bundle exec rake db:seed RAILS_ENV=staging
      rake aborted!
      Moped::Errors::ConnectionFailure: Could not connect to a primary node for replica set

      <Moped::Cluster:70258359778560 @seeds=[<Moped::Node resolved_address="10.10.4.131:27017">]>

      /Users/donato/.rvm/gems/ruby-2.1.2@core/gems/moped-2.0.4/lib/moped/cluster.rb:254:in `with_primary'

      I am able to deploy to that server using capistrano. So I know it is not a networking issue. Furthermore, I have seed tasks to mysql on that same server, so I know it is not a networking problem. So why is mongoid raising this exception?

            Assignee:
            Unassigned Unassigned
            Reporter:
            TheRealGuardDogGPS TheRealGuardDogGPS [X]
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: