title: Mongodb gives error during startup
body: <p>Whenever I try to play with mongo's interactive shell, it dies:</p>
  
  <pre><code>somekittens@DLserver01:~$ mongo
  MongoDB shell version: 2.2.2
  connecting to: test
  Mon Dec 17 13:14:16 DBClientCursor::init call() failed
  Mon Dec 17 13:14:16 Error: Error during mongo startup. :: caused by :: 10276 DBClientBase::findN: transport error: 127.0.0.1:27017 ns: admin.$cmd query: { whatsmyuri: 1 } src/mongo/shell/mongo.js:91
  exception: connect failed
  </code></pre>
  
  <p>I'm able to repair the install (deleting <code>mongodb.lock</code>, etc) and get back to this point, but it'll only die again.</p>
  
  <blockquote>
    <p>/var/log/mongodb/mongodb.log</p>
  </blockquote>
  
  <pre><code>Mon Dec 17 13:14:03
  Mon Dec 17 13:14:03 warning: 32-bit servers don't have journaling enabled by default. Please use --journal if you want durability.
  Mon Dec 17 13:14:03
  Mon Dec 17 13:14:03 [initandlisten] MongoDB starting : pid=2674 port=27017 dbpath=/var/lib/mongodb 32-bit host=DLserver01
  Mon Dec 17 13:14:03 [initandlisten]
  Mon Dec 17 13:14:03 [initandlisten] ** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data
  Mon Dec 17 13:14:03 [initandlisten] **       see http://blog.mongodb.org/post/137788967/32-bit-limitations
  Mon Dec 17 13:14:03 [initandlisten] **       with --journal, the limit is lower
  Mon Dec 17 13:14:03 [initandlisten]
  Mon Dec 17 13:14:03 [initandlisten] db version v2.2.2, pdfile version 4.5
  Mon Dec 17 13:14:03 [initandlisten] git version: d1b43b61a5308c4ad0679d34b262c5af9d664267
  Mon Dec 17 13:14:03 [initandlisten] build info: Linux domU-12-31-39-01-70-B4 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686 BOOST_LIB_VERSION=1_49
  Mon Dec 17 13:14:03 [initandlisten] options: { config: "/etc/mongodb.conf", dbpath: "/var/lib/mongodb", logappend: "true", logpath: "/var/log/mongodb/mongodb.log" }
  Mon Dec 17 13:14:03 [initandlisten] Unable to check for journal files due to: boost::filesystem::basic_directory_iterator constructor: No such file or directory: "/var/lib/mongodb/journal"
  Mon Dec 17 13:14:03 [initandlisten] couldn't unlink socket file /tmp/mongodb-27017.sockerrno:1 Operation not permitted skipping
  Mon Dec 17 13:14:03 [initandlisten] waiting for connections on port 27017
  Mon Dec 17 13:14:03 [websvr] admin web console waiting for connections on port 28017
  Mon Dec 17 13:14:16 [initandlisten] connection accepted from 127.0.0.1:57631 #1 (1 connection now open)
  Mon Dec 17 13:14:16 Invalid operation at address: 0x819bb23 from thread: conn1
  
  Mon Dec 17 13:14:16 Got signal: 4 (Illegal instruction).
  
  Mon Dec 17 13:14:16 Backtrace:
  0x8759eaa 0x817033a 0x81709ff 0x20e40c 0x819bb23 0x854cd54 0x85377d1 0x846b594 0x83e5591 0x83e6c15 0x81902b4 0x8746731 0x49ad4c 0x34ed3e
   /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x2a) [0x8759eaa]
   /usr/bin/mongod(_ZN5mongo10abruptQuitEi+0x3ba) [0x817033a]
   /usr/bin/mongod(_ZN5mongo24abruptQuitWithAddrSignalEiP7siginfoPv+0x2af) [0x81709ff]
   [0x20e40c]
   /usr/bin/mongod(_ZNK5mongo7BSONObj4copyEv+0x33) [0x819bb23]
   /usr/bin/mongod(_ZN5mongo11ParsedQuery4initERKNS_7BSONObjE+0x494) [0x854cd54]
   /usr/bin/mongod(_ZN5mongo11ParsedQueryC1ERNS_12QueryMessageE+0x91) [0x85377d1]
   /usr/bin/mongod(_ZN5mongo8runQueryERNS_7MessageERNS_12QueryMessageERNS_5CurOpES1_+0x34) [0x846b594]
   /usr/bin/mongod() [0x83e5591]
   /usr/bin/mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x3d5) [0x83e6c15]
   /usr/bin/mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0x84) [0x81902b4]
   /usr/bin/mongod(_ZN5mongo3pms9threadRunEPNS_13MessagingPortE+0x421) [0x8746731]
   /lib/i386-linux-gnu/libpthread.so.0(+0x6d4c) [0x49ad4c]
   /lib/i386-linux-gnu/libc.so.6(clone+0x5e) [0x34ed3e]
  </code></pre>
  
  <p>Connecting using node's shell:</p>
  
  <pre><code>&gt; mdb.open(function(err, db) { console.log(err) });
  [Error: failed to connect to [localhost:27017]]
  </code></pre>
  
  <p>I've searched around for this error and found nothing of use.  This is running on a fairly old server (Ubuntu 12.04 32-bit, 640MB RAM, 500MHz P2).  How can I fix this?</p>