{"id":21907,"date":"2024-01-02T17:18:25","date_gmt":"2024-01-02T17:18:25","guid":{"rendered":"https:\/\/server.hk\/blog\/21907\/"},"modified":"2024-11-14T10:25:13","modified_gmt":"2024-11-14T02:25:13","slug":"how-to-fix-mongodb-error-code-327-nosuchtenantmigration","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/21907\/","title":{"rendered":"\u5982\u4f55\u4fee\u5fa9 MongoDB \u932f\u8aa4\u4ee3\u78bc &#8211; 327 &#8211; NoSuchTenantMigration"},"content":{"rendered":"<h1 id=\"how-to-fix-mongodb-error-code-327-nosuchtenantmigration-CYsBraQSeG\">\u5982\u4f55\u4fee\u5fa9 MongoDB \u932f\u8aa4\u4ee3\u78bc &#8211; 327 &#8211; NoSuchTenantMigration<\/h1>\n<p>MongoDB \u662f\u4e00\u500b\u53d7\u6b61\u8fce\u7684 NoSQL \u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\uff0c\u63d0\u4f9b\u9ad8\u6027\u80fd\u3001\u53ef\u64f4\u5c55\u6027\u548c\u9748\u6d3b\u6027\u3002\u7136\u800c\uff0c\u5c31\u50cf\u4efb\u4f55\u8edf\u4ef6\u4e00\u6a23\uff0c\u5b83\u53ef\u80fd\u9047\u5230\u53ef\u80fd\u5e79\u64fe\u5176\u6b63\u5e38\u904b\u4f5c\u7684\u932f\u8aa4\u3002\u5176\u4e2d\u4e00\u500b\u932f\u8aa4\u662f MongoDB \u932f\u8aa4\u4ee3\u78bc &#8211; 327 &#8211; NoSuchTenantMigration\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u5011\u5c07\u63a2\u7d22\u9019\u500b\u932f\u8aa4\u7684\u539f\u56e0\u4e26\u63d0\u4f9b\u89e3\u6c7a\u5b83\u7684\u6b65\u9a5f\u3002<\/p>\n<h2 id=\"understanding-mongodb-error-code-327-nosuchtenantmigration-CYsBraQSeG\">\u7406\u89e3 MongoDB \u932f\u8aa4\u4ee3\u78bc &#8211; 327 &#8211; NoSuchTenantMigration<\/h2>\n<p>MongoDB \u932f\u8aa4\u4ee3\u78bc &#8211; 327 &#8211; NoSuchTenantMigration \u767c\u751f\u5728\u6578\u64da\u5eab\u627e\u4e0d\u5230\u7279\u5b9a\u7684\u79df\u6236\u9077\u79fb\u6642\u3002\u79df\u6236\u9077\u79fb\u662f\u4e00\u500b\u5c0d\u7279\u5b9a\u79df\u6236\u7684\u6578\u64da\u7d50\u69cb\u9032\u884c\u8b8a\u66f4\u7684\u904e\u7a0b\u3002\u9019\u500b\u932f\u8aa4\u901a\u5e38\u8868\u660e\u8207\u7279\u5b9a\u79df\u6236\u76f8\u95dc\u7684\u9077\u79fb\u6587\u4ef6\u6216\u8173\u672c\u4e1f\u5931\u6216\u5df2\u88ab\u522a\u9664\u3002<\/p>\n<h2 id=\"possible-causes-of-mongodb-error-code-327-nosuchtenantmigration-CYsBraQSeG\">MongoDB \u932f\u8aa4\u4ee3\u78bc &#8211; 327 &#8211; NoSuchTenantMigration \u7684\u53ef\u80fd\u539f\u56e0<\/h2>\n<p>\u9019\u500b\u932f\u8aa4\u6709\u5e7e\u500b\u53ef\u80fd\u7684\u539f\u56e0\uff1a<\/p>\n<ul>\n<li><strong>\u9077\u79fb\u6587\u4ef6\u7f3a\u5931\u6216\u88ab\u522a\u9664\uff1a<\/strong>\u5982\u679c\u8207\u79df\u6236\u76f8\u95dc\u7684\u9077\u79fb\u6587\u4ef6\u6216\u8173\u672c\u7f3a\u5931\u6216\u88ab\u610f\u5916\u522a\u9664\uff0cMongoDB \u5c07\u7121\u6cd5\u627e\u5230\u5b83\uff0c\u5c0e\u81f4 NoSuchTenantMigration \u932f\u8aa4\u3002<\/li>\n<li><strong>\u9077\u79fb\u6587\u4ef6\u547d\u540d\u4e0d\u6b63\u78ba\uff1a<\/strong>MongoDB \u4f9d\u8cf4\u65bc\u9077\u79fb\u6587\u4ef6\u7684\u7279\u5b9a\u547d\u540d\u898f\u5247\u3002\u5982\u679c\u6587\u4ef6\u547d\u540d\u4e0d\u6b63\u78ba\uff0cMongoDB \u5c07\u7121\u6cd5\u5b9a\u4f4d\u5b83\uff0c\u5f9e\u800c\u5c0e\u81f4\u932f\u8aa4\u3002<\/li>\n<li><strong>\u9077\u79fb\u6587\u4ef6\u4f4d\u7f6e\u4e0d\u6b63\u78ba\uff1a<\/strong>MongoDB \u671f\u671b\u9077\u79fb\u6587\u4ef6\u4f4d\u65bc\u7279\u5b9a\u7684\u76ee\u9304\u4e2d\u3002\u5982\u679c\u6587\u4ef6\u4f4d\u7f6e\u4e0d\u6b63\u78ba\uff0c\u6578\u64da\u5eab\u5c07\u7121\u6cd5\u627e\u5230\u5b83\uff0c\u5c0e\u81f4\u932f\u8aa4\u3002<\/li>\n<\/ul>\n<h2 id=\"fixing-mongodb-error-code-327-nosuchtenantmigration-CYsBraQSeG\">\u4fee\u5fa9 MongoDB \u932f\u8aa4\u4ee3\u78bc &#8211; 327 &#8211; NoSuchTenantMigration<\/h2>\n<p>\u8981\u89e3\u6c7a NoSuchTenantMigration \u932f\u8aa4\uff0c\u8acb\u9075\u5faa\u4ee5\u4e0b\u6b65\u9a5f\uff1a<\/p>\n<h3 id=\"step-1-check-for-missing-or-deleted-migration-files-CYsBraQSeG\">\u6b65\u9a5f 1\uff1a\u6aa2\u67e5\u7f3a\u5931\u6216\u88ab\u522a\u9664\u7684\u9077\u79fb\u6587\u4ef6<\/h3>\n<p>\u9996\u5148\uff0c\u9a57\u8b49\u662f\u5426\u6709\u4efb\u4f55\u9077\u79fb\u6587\u4ef6\u4e1f\u5931\u6216\u88ab\u610f\u5916\u522a\u9664\u3002\u6aa2\u67e5\u5b58\u5132\u9077\u79fb\u6587\u4ef6\u7684\u76ee\u9304\uff0c\u78ba\u4fdd\u6240\u6709\u5fc5\u8981\u7684\u6587\u4ef6\u90fd\u5728\u3002\u5982\u679c\u6709\u6587\u4ef6\u7f3a\u5931\uff0c\u5f9e\u5099\u4efd\u4e2d\u6062\u5fa9\u5b83\u5011\u6216\u5fc5\u8981\u6642\u91cd\u65b0\u5275\u5efa\u3002<\/p>\n<h3 id=\"step-2-verify-migration-file-naming-CYsBraQSeG\">\u6b65\u9a5f 2\uff1a\u9a57\u8b49\u9077\u79fb\u6587\u4ef6\u7684\u547d\u540d<\/h3>\n<p>\u78ba\u4fdd\u9077\u79fb\u6587\u4ef6\u7684\u547d\u540d\u662f\u6b63\u78ba\u7684\u3002MongoDB \u9075\u5faa\u7279\u5b9a\u7684\u9077\u79fb\u6587\u4ef6\u547d\u540d\u898f\u7bc7\uff0c\u901a\u5e38\u4f7f\u7528\u6642\u9593\u6233\u6216\u7248\u672c\u865f\u4f86\u8868\u793a\u57f7\u884c\u7684\u9806\u5e8f\u3002\u4ed4\u7d30\u6aa2\u67e5\u6587\u4ef6\u540d\u7a31\u662f\u5426\u7b26\u5408\u9810\u671f\u7684\u547d\u540d\u898f\u7bc7\u4ee5\u78ba\u4fdd\u4ed6\u5011\u5339\u914d\u3002<\/p>\n<h3 id=\"step-3-confirm-migration-file-location-CYsBraQSeG\">\u6b65\u9a5f 3\uff1a\u78ba\u8a8d\u9077\u79fb\u6587\u4ef6\u7684\u4f4d\u7f6e<\/h3>\n<p>\u6aa2\u67e5\u9077\u79fb\u6587\u4ef6\u7684\u4f4d\u7f6e\u3002MongoDB \u671f\u671b\u5b83\u5011\u5b58\u5132\u5728\u7279\u5b9a\u7684\u76ee\u9304\u4e2d\u3002\u5982\u679c\u6587\u4ef6\u4e0d\u5728\u6b63\u78ba\u7684\u4f4d\u7f6e\uff0c\u5c07\u5b83\u5011\u79fb\u52d5\u5230\u9069\u7576\u7684\u76ee\u9304\u3002\u78ba\u4fdd\u6578\u64da\u5eab\u5177\u6709\u8a2a\u554f\u6587\u4ef6\u6240\u9700\u7684\u6b0a\u9650\u3002<\/p>\n<h3 id=\"step-4-restart-mongodb-CYsBraQSeG\">\u6b65\u9a5f 4\uff1a\u91cd\u555f MongoDB<\/h3>\n<p>\u5728\u9032\u884c\u4efb\u4f55\u5fc5\u8981\u7684\u66f4\u6539\u5f8c\uff0c\u91cd\u555f MongoDB \u4ee5\u61c9\u7528\u4fee\u5fa9\u3002\u9019\u5c07\u78ba\u4fdd\u6578\u64da\u5eab\u8b58\u5225\u66f4\u65b0\u7684\u9077\u79fb\u6587\u4ef6\u4e26\u89e3\u6c7a NoSuchTenantMigration \u932f\u8aa4\u3002<\/p>\n<h2 id=\"summary-CYsBraQSeG\">\u7e3d\u7d50<\/h2>\n<p>MongoDB \u932f\u8aa4\u4ee3\u78bc &#8211; 327 &#8211; NoSuchTenantMigration \u767c\u751f\u5728\u6578\u64da\u5eab\u7121\u6cd5\u627e\u5230\u7279\u5b9a\u7684\u79df\u6236\u9077\u79fb\u6587\u4ef6\u6642\u3002\u9019\u500b\u932f\u8aa4\u53ef\u80fd\u662f\u7531\u65bc\u9077\u79fb\u6587\u4ef6\u4e1f\u5931\u6216\u88ab\u522a\u9664\u3001\u6587\u4ef6\u547d\u540d\u4e0d\u6b63\u78ba\u6216\u6587\u4ef6\u4f4d\u7f6e\u4e0d\u6b63\u78ba\u5c0e\u81f4\u7684\u3002\u8981\u89e3\u6c7a\u9019\u500b\u932f\u8aa4\uff0c\u6aa2\u67e5\u7f3a\u5931\u6216\u522a\u9664\u7684\u6587\u4ef6\uff0c\u9a57\u8b49\u6587\u4ef6\u547d\u540d\uff0c\u78ba\u8a8d\u6587\u4ef6\u4f4d\u7f6e\uff0c\u4e26\u91cd\u555f MongoDB\u3002\u5982\u679c\u60a8\u9700\u8981 MongoDB \u6258\u7ba1\u6216\u5176\u4ed6\u4efb\u4f55 VPS \u6258\u7ba1\u670d\u52d9\u7684\u5e6b\u52a9\uff0c\u8acb\u8003\u616e <a href=\"https:\/\/server.hk\">Server.HK<\/a> \u4ee5\u7372\u5f97\u53ef\u9760\u548c\u9ad8\u6027\u80fd\u7684\u89e3\u6c7a\u65b9\u6848\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":[101],"tags":[],"class_list":["post-21907","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21907","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=21907"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21907\/revisions"}],"predecessor-version":[{"id":23426,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/21907\/revisions\/23426"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=21907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=21907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=21907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}