title: MongoDB replica set no primary, need to force new primary
body: <p>We have a mongoDB replica set which has 3 nodes;</p>
  
  <ol>
  <li>Primary</li>
  <li>Secondary</li>
  <li>Arbiter</li>
  </ol>
  
  <p>Somehow our replica set has ended up with 1 &amp; 2 both being set as secondary members. I'm not sure how this has happened (we have had a server migration which one of the nodes runs on, but only one).</p>
  
  <p>Anyway, I've been trying to re-elect a new primary for the replica set following the guide <a href="http://docs.mongodb.org/manual/tutorial/force-member-to-be-primary/" rel="noreferrer">here</a> </p>
  
  <p>I'm unable to just use </p>
  
  <pre><code>rs.reconfig(cfg)
  </code></pre>
  
  <p>as it will only work if directed at the primary (which I don't have).</p>
  
  <p>Using the force parameter</p>
  
  <pre><code>rs.reconfig(cfg, { force: true})
  </code></pre>
  
  <p>would appear to work but then when I requery the status of the replica set, both servers are still only showing as Secondary.</p>
  
  <p>Why hasn't the force reconfig worked? Currently the database is locked out whatever I try.</p>