MongoDB - shutting down with code:62

后端 未结 10 848
既然无缘
既然无缘 2020-12-05 17:58

I followed the MongoDB Docs to run my MongoDB in macOS,

When I start MongoDB using the terminal get this error:

Shutting down with code: 62

相关标签:
10条回答
  • 2020-12-05 18:20

    Delete the data directory where MongoDB stored and create again.

    rmdir data
    

    And:

    mkdir data/db
    
    0 讨论(0)
  • 2020-12-05 18:20
     Error code 62:MongoDB dbpath doesn't support the current version 
    

    Removing data director is not an optimal solution. The best solution would be to upgrade to the higher version.

    Else take the dump & restore the complete database on a fresh instance with a higher version.

    mongodump --db employee --out /path/

    mongorestore /path/employee/

    Hope this helps !!!

    0 讨论(0)
  • 2020-12-05 18:24

    This has worked for me

    Initially i was facing various issues, like when i tried to start the server by using:

    mongod
    

    I received this error: shutting down with code 100

    and then i tried to start by

    sudo mongod
    

    I received this error: shutting down with code 62

    finally this command helped me to get rid of various issues

    sudo mongod --repair
    

    Now mongod server is running tentatively

    sudo mongod
    
    0 讨论(0)
  • 2020-12-05 18:28

    Please ensure if you are upgrading MongoDB, your featureCompatibilityVersion version is correct. I faced similar problem, after updating featureCompatibilityVersion to the correct version, it worked fine.

    Reference: https://docs.mongodb.com/manual/reference/command/setFeatureCompatibilityVersion/

    0 讨论(0)
提交回复
热议问题