Errr 'mongo.js:L112 Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:L112'

后端 未结 8 1190
别那么骄傲
别那么骄傲 2021-01-30 01:25

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

8条回答
  •  醉梦人生
    2021-01-30 01:52

    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 !

提交回复
热议问题