title: Unable to connect to MongoDB
body: <p>I've just installed MongoDB (standard Ubuntu build, not the latest stable) and for some reason I can't connect:</p>
  
  <pre><code>Mon Feb  6 03:11:22 Error: couldn't connect to server 127.0.0.1 shell/mongo.js:79
  exception: connect failed
  </code></pre>
  
  <p>Now my machine isn't 127.x.x.1 it's for some reason x.x.x.2 (But i've changed my config to bind to that address, and also tried to bind to my public IP which provided no avail.</p>
  
  <p>Config:</p>
  
  <p>#mongodb.conf</p>
  
  <pre><code># Where to store the data.
  
  # Note: if you run mongodb as a non-root user (recommended) you may
  # need to create and set permissions for this directory manually,
  # e.g., if the parent directory isn't mutable by the mongodb user.
  dbpath=/var/lib/mongodb
  
  #where to log
  logpath=/var/log/mongodb/mongodb.log
  
  logappend=true
  
  bind_ip = 199.21.114.XX
  port = 27017
  </code></pre>
  
  <p>I've checked the logs and only startup info is displaying in there. </p>
  
  <p>I've also checked that the deamon is running too, and it is - I even tried running it manually with a <code>--fork</code>.</p>
  
  <p>Has anyone come across this before? Or any suggestions?</p>
  
  <p>Thx</p>
  
  <p>UPDATE:</p>
  
  <p>After a restart - here are the logs:</p>
  
  <pre><code>** WARNING: You are running in OpenVZ. This is known to be broken!!!
  
  Tue Feb  7 19:43:32 [initandlisten] db version v1.8.2, pdfile version 4.5
  Tue Feb  7 19:43:32 [initandlisten] git version: nogitversion
  Tue Feb  7 19:43:32 [initandlisten] build sys info: Linux allspice 2.6.24-28-se$
  Tue Feb  7 19:43:32 [initandlisten] *** warning: spider monkey build without ut$
  Tue Feb  7 19:43:32 [initandlisten] waiting for connections on port 27017
  Tue Feb  7 19:43:32 [websvr] web admin interface listening on port 28017
  </code></pre>