couldn't connect to server 127.0.0.1 shell/mongo.js

前端 未结 13 2114
后悔当初
后悔当初 2020-11-29 19:07

when i setup mongodb in my ubuntu , i try : ./mongo it show this error :

 couldn\'t connect to server 127.0.0.1 shell/mongo.js

so what can

13条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-29 19:25

    Also check that your root partition has enough space to start mongod.

    df -h /
    

    You'll see smth like this on mongod launch:

    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...
    

提交回复
热议问题