{"id":21699,"date":"2024-01-02T13:50:23","date_gmt":"2024-01-02T13:50:23","guid":{"rendered":"https:\/\/server.hk\/blog\/21699\/"},"modified":"2024-11-14T10:28:27","modified_gmt":"2024-11-14T02:28:27","slug":"how-to-fix-mongodb-error-code-109-configurationinprogress","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/21699\/","title":{"rendered":"\u5982\u4f55\u4fee\u5fa9 MongoDB \u932f\u8aa4\u4ee3\u78bc &#8211; 109 &#8211; ConfigurationInProgress"},"content":{"rendered":"<br \/>\n<h1 id=\"how-to-fix-mongodb-error-code-109-configurationinprogress-lOjQKpqtcV\">\u5982\u4f55\u4fee\u5fa9 MongoDB \u932f\u8aa4\u4ee3\u78bc &#8211; 109 &#8211; ConfigurationInProgress<\/h1>\n<p>MongoDB \u662f\u4e00\u500b\u53d7\u6b61\u8fce\u7684\u958b\u6e90 NoSQL \u8cc7\u6599\u5eab\u7ba1\u7406\u7cfb\u7d71\uff0c\u63d0\u4f9b\u9ad8\u6548\u80fd\u3001\u53ef\u64f4\u5c55\u6027\u548c\u9748\u6d3b\u6027\u3002\u7136\u800c\uff0c\u8207\u5176\u4ed6\u8edf\u4ef6\u4e00\u6a23\uff0cMongoDB \u4e5f\u53ef\u80fd\u9047\u5230\u9700\u8981\u89e3\u6c7a\u7684\u932f\u8aa4\u3002\u5176\u4e2d\u4e00\u500b\u932f\u8aa4\u662f MongoDB \u932f\u8aa4\u4ee3\u78bc &#8211; 109 &#8211; ConfigurationInProgress\u3002\u672c\u6587\u5c07\u63a2\u8a0e\u6b64\u932f\u8aa4\u7684\u539f\u56e0\uff0c\u4e26\u63d0\u4f9b\u9010\u6b65\u6307\u5f15\u4f86\u89e3\u6c7a\u6b64\u554f\u984c\u3002<\/p>\n<h2 id=\"understanding-mongodb-error-code-109-configurationinprogress-lOjQKpqtcV\">\u7406\u89e3 MongoDB \u932f\u8aa4\u4ee3\u78bc &#8211; 109 &#8211; ConfigurationInProgress<\/h2>\n<p>MongoDB \u932f\u8aa4\u4ee3\u78bc &#8211; 109 &#8211; ConfigurationInProgress \u767c\u751f\u5728 MongoDB \u96c6\u7fa4\u9032\u884c\u914d\u7f6e\u66f4\u6539\u6642\u3002\u7576\u60a8\u5617\u8a66\u57f7\u884c\u67d0\u4e9b\u7ba1\u7406\u64cd\u4f5c\uff08\u4f8b\u5982\u6dfb\u52a0\u6216\u79fb\u9664\u5206\u7247\uff09\u800c\u96c6\u7fa4\u4ecd\u5728\u9032\u884c\u914d\u7f6e\u66f4\u6539\u6642\uff0c\u901a\u5e38\u6703\u51fa\u73fe\u6b64\u932f\u8aa4\u3002<\/p>\n<p>\u7576\u6b64\u932f\u8aa4\u767c\u751f\u6642\uff0c\u60a8\u53ef\u80fd\u6703\u770b\u5230\u985e\u4f3c\u4ee5\u4e0b\u7684\u932f\u8aa4\u4fe1\u606f\uff1a<\/p>\n<p><code>FailedToSatisfyReadPreference: Could not find host matching read preference { mode: \"primary\" }<\/code><\/p>\n<h2 id=\"fixing-mongodb-error-code-109-configurationinprogress-lOjQKpqtcV\">\u4fee\u5fa9 MongoDB \u932f\u8aa4\u4ee3\u78bc &#8211; 109 &#8211; ConfigurationInProgress<\/h2>\n<p>\u8981\u4fee\u5fa9 MongoDB \u932f\u8aa4\u4ee3\u78bc &#8211; 109 &#8211; ConfigurationInProgress\uff0c\u8acb\u6309\u7167\u4ee5\u4e0b\u6b65\u9a5f\u64cd\u4f5c\uff1a<\/p>\n<h3 id=\"step-1-check-the-cluster-configuration-status-lOjQKpqtcV\">\u6b65\u9a5f 1\uff1a\u6aa2\u67e5\u96c6\u7fa4\u914d\u7f6e\u72c0\u614b<\/h3>\n<p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u6aa2\u67e5\u96c6\u7fa4\u7684\u914d\u7f6e\u72c0\u614b\u3002\u60a8\u53ef\u4ee5\u901a\u904e\u9023\u63a5\u5230 MongoDB Shell \u4e26\u57f7\u884c\u4ee5\u4e0b\u547d\u4ee4\u4f86\u5be6\u73fe\uff1a<\/p>\n<p><code>sh.status()<\/code><\/p>\n<p>\u6b64\u547d\u4ee4\u5c07\u986f\u793a\u7576\u524d\u7684\u914d\u7f6e\u7248\u672c\u548c\u96c6\u7fa4\u7684\u72c0\u614b\u3002\u5982\u679c\u914d\u7f6e\u7248\u672c\u4e0d\u662f\u6700\u65b0\u7684\uff0c\u6216\u8005\u96c6\u7fa4\u4ecd\u5728\u9032\u884c\u66f4\u6539\uff0c\u60a8\u9700\u8981\u7b49\u5f85\u914d\u7f6e\u904e\u7a0b\u5b8c\u6210\u3002<\/p>\n<h3 id=\"step-2-wait-for-the-configuration-process-to-complete-lOjQKpqtcV\">\u6b65\u9a5f 2\uff1a\u7b49\u5f85\u914d\u7f6e\u904e\u7a0b\u5b8c\u6210<\/h3>\n<p>\u5982\u679c\u96c6\u7fa4\u4ecd\u5728\u9032\u884c\u914d\u7f6e\u66f4\u6539\uff0c\u60a8\u9700\u8981\u7b49\u5f85\u904e\u7a0b\u5b8c\u6210\u3002MongoDB \u6703\u81ea\u52d5\u5728\u80cc\u666f\u4e2d\u61c9\u7528\u914d\u7f6e\u66f4\u6539\uff0c\u9019\u53ef\u80fd\u9700\u8981\u4e00\u4e9b\u6642\u9593\u4f86\u8b93\u66f4\u6539\u50b3\u64ad\u5230\u96c6\u7fa4\u4e2d\u7684\u6240\u6709\u7bc0\u9ede\u3002\u8acb\u8010\u5fc3\u7b49\u5f85\uff0c\u4e26\u907f\u514d\u5728\u914d\u7f6e\u904e\u7a0b\u5b8c\u6210\u4e4b\u524d\u57f7\u884c\u4efb\u4f55\u7ba1\u7406\u64cd\u4f5c\u3002<\/p>\n<h3 id=\"step-3-retry-the-operation-lOjQKpqtcV\">\u6b65\u9a5f 3\uff1a\u91cd\u8a66\u64cd\u4f5c<\/h3>\n<p>\u4e00\u65e6\u914d\u7f6e\u904e\u7a0b\u5b8c\u6210\uff0c\u60a8\u53ef\u4ee5\u91cd\u8a66\u89f8\u767c MongoDB \u932f\u8aa4\u4ee3\u78bc &#8211; 109 &#8211; ConfigurationInProgress \u7684\u64cd\u4f5c\u3002\u6b64\u932f\u8aa4\u61c9\u4e0d\u518d\u51fa\u73fe\uff0c\u60a8\u61c9\u80fd\u5920\u9806\u5229\u57f7\u884c\u7ba1\u7406\u4efb\u52d9\u3002<\/p>\n<h2 id=\"summary-lOjQKpqtcV\">\u7e3d\u7d50<\/h2>\n<p>MongoDB \u932f\u8aa4\u4ee3\u78bc &#8211; 109 &#8211; ConfigurationInProgress \u662f\u4e00\u500b\u5e38\u898b\u932f\u8aa4\uff0c\u767c\u751f\u65bc MongoDB \u96c6\u7fa4\u9032\u884c\u914d\u7f6e\u66f4\u6539\u6642\u3002\u8981\u89e3\u6c7a\u6b64\u932f\u8aa4\uff0c\u60a8\u9700\u8981\u6aa2\u67e5\u96c6\u7fa4\u7684\u914d\u7f6e\u72c0\u614b\u3001\u7b49\u5f85\u914d\u7f6e\u904e\u7a0b\u5b8c\u6210\uff0c\u7136\u5f8c\u91cd\u8a66\u64cd\u4f5c\u3002\u901a\u904e\u9075\u5faa\u9019\u4e9b\u6b65\u9a5f\uff0c\u60a8\u53ef\u4ee5\u89e3\u6c7a\u932f\u8aa4\uff0c\u4e26\u7e7c\u7e8c\u6709\u6548\u5730\u7ba1\u7406\u60a8\u7684 MongoDB \u96c6\u7fa4\u3002<\/p>\n<p>\u5982\u9700\u4e86\u89e3\u66f4\u591a\u6709\u95dc VPS \u8a17\u7ba1\u53ca\u5176\u5982\u4f55\u6539\u5584\u60a8\u7684 MongoDB \u90e8\u7f72\u7684\u8cc7\u8a0a\uff0c\u8acb\u9020\u8a2a <a href=\"https:\/\/server.hk\">Server.HK<\/a>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u4fee\u5fa9 MongoDB \u932f\u8aa4\u4ee3&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-21699","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21699","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=21699"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21699\/revisions"}],"predecessor-version":[{"id":23703,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21699\/revisions\/23703"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=21699"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=21699"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=21699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}