{"id":980,"date":"2024-09-01T13:41:36","date_gmt":"2024-09-01T13:41:36","guid":{"rendered":"http:\/\/www.nokws.top\/?p=980"},"modified":"2024-09-01T13:41:37","modified_gmt":"2024-09-01T13:41:37","slug":"mongodb-changjiancuowu","status":"publish","type":"post","link":"http:\/\/www.nokws.top\/index.php\/2024\/09\/01\/mongodb-changjiancuowu\/","title":{"rendered":"MongoDB \u5e38\u89c1\u9519\u8bef"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u6743\u9650\u95ee\u98981<\/h2>\n\n\n\n<p>\u65e5\u5fd7\u663e\u793a\uff1a<strong>mongod.service: Main process exited, code=exited, status=14\/n\/a<\/strong><\/p>\n\n\n\n<p>\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo rm -rf \/tmp\/mongodb-27017.sock\nsudo service mongod start<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u6743\u9650\u95ee\u98982<\/h2>\n\n\n\n<p>\u65e5\u5fd7\u663e\u793a\uff1a<strong>mongod.service: Main process exited, code=exited, status=100\/n\/a<\/strong><\/p>\n\n\n\n<p>\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo chown -R mongodb:mongodb \/var\/lib\/mongodb\/*<\/pre>\n\n\n\n<p>\u8be6\u60c5\uff1a<a href=\"https:\/\/stackoverflow.com\/questions\/45691032\/mongod-service-start-exits-with-code-100\">mongodb &#8211; Mongod \u670d\u52a1\u542f\u52a8\u9000\u51fa\uff0c\u4ee3\u7801\u4e3a 100 &#8211; \u5806\u6808\u6ea2\u51fa (stackoverflow.com)<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u65e5\u5fd7\u95ee\u9898<\/h2>\n\n\n\n<p>\u65e5\u5fd7\u663e\u793a\uff1a<strong>Can\u2019t initialize rotatable log file<\/strong><\/p>\n\n\n\n<p>\u89e3\u51b3\u65b9\u6848\uff1a\u5220\u9664\u540c\u540d\u6587\u4ef6\uff0c\u8ba9mongodb\u81ea\u5df1\u65b0\u5efa\u65e5\u5fd7\u6587\u4ef6<\/p>\n\n\n\n<p>\u8be6\u60c5\uff1a<a href=\"https:\/\/www.mongodb.com\/community\/forums\/t\/cant-initialize-rotatable-log-file\/130628\">Can&#8217;t initialize rotatable log file &#8211; Ops and Admin &#8211; MongoDB Developer Community Forums<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u914d\u7f6e\u95ee\u9898<\/h2>\n\n\n\n<p>\u65e5\u5fd7\u663e\u793a\uff1aEnvironment variable MONGODB_CONFIG_OVERRIDE_NOFORK == 1, overriding \\&#8221;processManagement.fork\\&#8221; to false&#8221;<\/p>\n\n\n\n<p>\u89e3\u51b3\u65b9\u6848\uff1a\u5220\u9664\/usr\/lib\/systemd\/system\/mongod.service \u4e2d\u7684\u5b57\u6bb5MONGODB_CONFIG_OVERRIDE_NOFORK=1<\/p>\n\n\n\n<p>\u8be6\u60c5\uff1a<a href=\"https:\/\/stackoverflow.com\/questions\/76293776\/environment-variable-mongodb-config-override-nofork-1-overriding-processma\">mongodb &#8211; \u73af\u5883\u53d8\u91cf MONGODB_CONFIG_OVERRIDE_NOFORK == 1\uff0c\u5c06 \\\u201cprocessManagement.fork\\\u201d \u8986\u76d6\u4e3a false\u201c &#8211; \u5806\u6808\u6ea2\u51fa (stackoverflow.com)<\/a><\/p>\n\n\n\n<p><strong>PS\uff1a\u9047\u5230\u5176\u4ed6\u95ee\u9898\u7684\u65f6\u5019\u9700\u8981\u91cd\u542f\u524d\u5efa\u8bae\u6267\u884c\u6743\u9650\u95ee\u98981\u4e2d\u5185\u5bb9\u3002<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6743\u9650\u95ee\u98981 \u65e5\u5fd7\u663e\u793a\uff1amongod.service: Main process exited, code=ex [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-980","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.nokws.top\/index.php\/wp-json\/wp\/v2\/posts\/980","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.nokws.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.nokws.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.nokws.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.nokws.top\/index.php\/wp-json\/wp\/v2\/comments?post=980"}],"version-history":[{"count":1,"href":"http:\/\/www.nokws.top\/index.php\/wp-json\/wp\/v2\/posts\/980\/revisions"}],"predecessor-version":[{"id":981,"href":"http:\/\/www.nokws.top\/index.php\/wp-json\/wp\/v2\/posts\/980\/revisions\/981"}],"wp:attachment":[{"href":"http:\/\/www.nokws.top\/index.php\/wp-json\/wp\/v2\/media?parent=980"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.nokws.top\/index.php\/wp-json\/wp\/v2\/categories?post=980"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.nokws.top\/index.php\/wp-json\/wp\/v2\/tags?post=980"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}