title: MongoDB Error couldn't connect to server
body: <p>I first execute the command:</p>
  
  <pre><code>sudo service mongodb restart
  </code></pre>
  
  <p>I get the prompt:</p>
  
  <pre><code>stop: Unknown instance: 
  mongodb start/running, process 3175
  </code></pre>
  
  <p>Then,I execute the command:</p>
  
  <pre><code>mongo
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>MongoDB shell version: 2.4.6
  connecting to: test
  Tue Oct  8 19:48:08.961 Error: couldn't connect to server 127.0.0.1:27017 at  src/mongo/shell/mongo.js:145
  exception: connect failed
  </code></pre>
  
  <p>I don't know how I get this error.</p>