I can\'t connect to MongoDB. In Ubuntu it works, but I\'m working in CentOS now. This is the error message:
MongoDB shell version: 2.4.2
connecting
I don't know why @lkrzysiak answer was downvoted: it worked for me ! Insufficient free space CAN be the source of this error that I got too, see the logs I got:
Mon Aug 12 17:02:59.159 [initandlisten] recover : no journal files present, no recovery needed
Mon Aug 12 17:02:59.159 [initandlisten]
Mon Aug 12 17:02:59.159 [initandlisten] ERROR: Insufficient free space for journal files
Mon Aug 12 17:02:59.159 [initandlisten] Please make at least 3379MB available in /var/lib/mongodb/journal or use --smallfiles
Mon Aug 12 17:02:59.159 [initandlisten]
Mon Aug 12 17:02:59.159 [initandlisten] exception in initAndListen: 15926 Insufficient free space for journals, terminating
Mon Aug 12 17:02:59.159 dbexit:
Mon Aug 12 17:02:59.159 [initandlisten] shutdown: going to close listening sockets...
After some cleaning to free some space, it worked like a charm !