title: MongoDB on Ubuntu won't start as a service, nothing in the log
body: <p>Am running MongoDB 2.2 on Ubuntu and if I run:</p>
  
  <pre><code>sudo mongod
  </code></pre>
  
  <p>I get an error that it can't find /data/db, which is not where the database is. In mongod.conf the database path is specified as the Ubuntu 10gen default <code>/var/lib/mongodb</code> which is where the db is located. Seems like <code>mongod</code> is not finding the conf file. So when I run:</p>
  
  <pre><code>sudo mongod -f /etc/mongodb.conf
  </code></pre>
  
  <p>The server starts up fine and output is logged to the log file: <code>/var/log/mongodb/mongodb.log</code>. All is happy. I can switch to another shell, log into mongo shell, see the databases and run queries.</p>
  
  <p>So, I cancel out of that and try to run as a service:</p>
  
  <pre><code>&gt; sudo status mongodb
  mongodb stop/waiting
  &gt; sudo start mongodb
  mongodb start/running, process 10468
  </code></pre>
  
  <p>Looks good so far, but the mongo server did not start. Running another:</p>
  
  <pre><code>&gt; sudo status mongodb
  mongodb stop/waiting
  &gt; mongo
  MongoDB shell version: 2.2.0
  connecting to: test
  Sat Sep  1 19:07:43 Error: couldn't connect to server 127.0.0.1:27017 src/mongo/shell/mongo.js:91
  exception: connect failed
  </code></pre>
  
  <p>"test" is not the correct database, and nothing appears in the log file.</p>
  
  <p>I am at a loss as to what could be wrong. I checked the upstart scripts and they seem fine. <code>/etc/init/mongodb.conf</code> runs:</p>
  
  <pre><code>mongodb --exec  /usr/bin/mongod -- --config /etc/mongodb.conf
  </code></pre>