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

后端 未结 11 1889
攒了一身酷
攒了一身酷 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:50

    Use --shutdown

    mongod --shutdown
    

    Then

    service mongod restart
    

    It work!

    https://docs.mongodb.com/manual/tutorial/manage-mongodb-processes/#use-shutdown

    0 讨论(0)
  • 2020-12-17 21:51

    For me it was ulimit issue, mongo could not open too many files.

    Used ulimit -n 10000.

    However as a generic pointer look into mongo logs file, they will tell where to look further. Generally the logs file are in /var/log/mongo.log but look into your mongo config file.

    0 讨论(0)
  • 2020-12-17 21:55

    I had this same issue, but mine was the system clock being off so my SSL cert was technically invalid. Changing to the current date and time worked date --set "<DD M Y H:M>"
    Only found this by looking at the mongodb log

    0 讨论(0)
  • 2020-12-17 21:55

    In my mongodb setup, in order to retain a specific version of mongoDB inline to existing servers and also to avoid having binary files placed under root disk, i changed the path of all mongo binaries in a different directory. i had to use rpm option instead of yum option (as yum installs only the latest version despite of mentioning the specific version).

    rpm -ivh --prefix=/apps/mongodb /apps/mongo_rpm_packages/mongodb-org-*.rpm 
    

    Note: The default path where the binaries will be placed is /var/lib/mongo.

    This approach does not either allow required permission for mongod user or its not provisioned properly and hence, i changed user and group in mongod.service file to root user and managed to successful start the process using:

    service start mongod
    
    0 讨论(0)
  • 2020-12-17 21:58

    It's because you haven't configured your mongod instance correctly in the config file that you passed to the -f option. Revisit your config file and make sure eveything is configured correctly.

    0 讨论(0)
  • 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`
    
    0 讨论(0)
提交回复
热议问题