title: Single Instance Mongodb Replica Set - cannot perform query/insert operations
body: <p>After installing mongodb, I ran <code>mongod</code> with</p>
  
  <pre><code>mongod --dbpath &lt;pathtodb&gt; --logpath &lt;pathtolog&gt; --replSet rs0
  </code></pre>
  
  <p>I then connected with the mongo shell and ran</p>
  
  <pre><code>rs.initiate()
  </code></pre>
  
  <p>I then tried to insert a document into a collection, but received an error:</p>
  
  <pre><code>&gt; db.blah.insert({a:1})
  WriteResult({ "writeError" : { "code" : undefined, "errmsg" : "not master" } })
  </code></pre>
  
  <p>Looking at <code>rs.status()</code>, I see the status is <code>REMOVED</code>:</p>
  
  <pre>
  > rs.status()
  {
          "state" : 10,
          "stateStr" : "REMOVED",
          "uptime" : 1041,
          "optime" : Timestamp(1429037007, 1),
          "optimeDate" : ISODate("2015-04-14T18:43:27Z"),
          "ok" : 0,
          "errmsg" : "Our replica set config is invalid or we are not a member of it",
          "code" : 93
  }
  </pre>
  
  <p>I have no idea what I could have done to mess this up. This <em>should</em> have worked I think. How do I get past this?</p>