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

Replicaset primary down

    • Type: Icon: Task Task
    • Resolution: Done
    • 3.0.0
    • Affects Version/s: None
    • Component/s: None
    • None

      Hi,

      Sorry to bother you again...

      I've tried to crash my setup to see how it behaves and there's one strange case :

      Initial setup => mongo1(primary), mongo2(secondary), arbiter

      If arbiter goes down, everything is fine
      If secondary goes down, everything is fine
      If primary goes down, after few seconds secondary becomes primary however the connexion failed, here is the error :

      Errno::EHOSTUNREACH (No route to host - connect(2)):
      

      Config file :

      Unable to find source-code formatter for language: yml. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      staging:
        sessions:
          default:
            database: stagingdb
            username: xxxxxxx
            password: xxxxxxx
            hosts:
              - mongo1:27017
              - mongo2:27017
            options:
              consistency: :strong
              safe: true
        options:
          allow_dynamic_fields: false
      

      State of the replica (taken from mongo2 after mongo1 crash) :

      PRIMARY> rs.status()
      {
      	"set" : "xxxxx",
      	"date" : ISODate("2012-06-12T21:14:04Z"),
      	"myState" : 1,
      	"syncingTo" : "mongo1:27017",
      	"members" : [
      		{
      			"_id" : 0,
      			"name" : "mongo1:27017",
      			"health" : 0,
      			"state" : 8,
      			"stateStr" : "(not reachable/healthy)",
      			"uptime" : 0,
      			"optime" : {
      				"t" : 1339530046000,
      				"i" : 2
      			},
      			"optimeDate" : ISODate("2012-06-12T19:40:46Z"),
      			"lastHeartbeat" : ISODate("2012-06-12T19:41:36Z"),
      			"pingMs" : 0,
      			"errmsg" : "socket exception"
      		},
      		{
      			"_id" : 1,
      			"name" : "mongo2:27017",
      			"health" : 1,
      			"state" : 1,
      			"stateStr" : "PRIMARY",
      			"optime" : {
      				"t" : 1339530046000,
      				"i" : 2
      			},
      			"optimeDate" : ISODate("2012-06-12T19:40:46Z"),
      			"self" : true
      		},
      		{
      			"_id" : 2,
      			"name" : "arbiter:27017",
      			"health" : 1,
      			"state" : 7,
      			"stateStr" : "ARBITER",
      			"uptime" : 5612,
      			"optime" : {
      				"t" : 0,
      				"i" : 0
      			},
      			"optimeDate" : ISODate("1970-01-01T00:00:00Z"),
      			"lastHeartbeat" : ISODate("2012-06-12T21:14:03Z"),
      			"pingMs" : 0
      		}
      	],
      	"ok" : 1
      }
      

      Am I missing something ? Thx for your help.

            Assignee:
            durran Durran Jordan
            Reporter:
            jjaffeux jjaffeux
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: