MongoDB: ERROR: child process failed, exited with error number 14

后端 未结 11 1989
攒了一身酷
攒了一身酷 2020-12-17 21:48

I run MongoDB on Mac:

Shave:mongodb_simple Logan$ ./bin/mongod -f conf/mongod.conf
about to fork child process, waiting until server is ready for connections         


        
11条回答
  •  清歌不尽
    2020-12-17 21:59

    Check if the mongod is running with pgrep mongod or ps -aef | grep mongod or systemctl status mongod

    Stop and restart it to check if the issue gone if you start mongod with mongod -f /etc/mongod.conf kill it with pkill -9 mongod then start it with mongod -f /etc/mongod.conf fi you run it a service, use systemctl restart mongod to restart it.

    If restart not works, figure out the issue by the /var/log/message and /var/log/mongodb/mongod.log file. use tail -f /var/log/message and tail -f /var/log/mongodb/mongod.log to check the output when your action.

    for example:
        1.
            Failed to unlink socket file /tmp/mongodb-27017.sock Operation not permitted
                delete the sock file with `rm`
        
        
        2.
            WiredTiger error (13) [1596090168:830936][25997:0x7fe22f208b80], wiredtiger_open: __posix_open_file, 672: /data/mongo/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1596090168:830936][25997:0x7fe22f208b80], wiredtiger_open: __posix_open_file, 672: /data/mongo/WiredTiger.turtle: handle-open: open: Permission denied
            Failed to start up WiredTiger under any compatibility version
            Reason: 13: Permission denied
            
                check the file permission or owner with `ls` then change to the wright permission with `chmod` or right owner with `chown`
    

提交回复
热议问题