{"id":12862,"date":"2024-05-20T16:02:54","date_gmt":"2024-05-20T08:02:54","guid":{"rendered":"https:\/\/nj.transwarp.cn:8180\/?p=12862"},"modified":"2024-05-20T16:02:54","modified_gmt":"2024-05-20T08:02:54","slug":"kundb-relay-log%e6%8d%9f%e5%9d%8f","status":"publish","type":"post","link":"https:\/\/kbwp.transwarp.cn\/?p=12862","title":{"rendered":"kundb relay-log\u635f\u574f"},"content":{"rendered":"<h3>\u6982\u8981\u63cf\u8ff0<\/h3>\n<p>\u672c\u6587\u63cf\u8ff0Kundb relay-log\u6587\u4ef6\u4e0d\u6b63\u5e38\u7684\u6392\u67e5\u601d\u8def\u4ee5\u53ca\u89e3\u51b3\u65b9\u6848<\/p>\n<h3>\u8be6\u7ec6\u63cf\u8ff0<\/h3>\n<p>\u5e38\u89c1\u4e8e\u96c6\u7fa4\u51fa\u73b0\u610f\u5916\u65ad\u7535\u7b49\u60c5\u51b5\uff0c\u5bfc\u81f4kundb\u670d\u52a1\u4e0d\u6b63\u5e38<\/p>\n<h4>\u786e\u8ba4kundb\u89d2\u8272\u72b6\u6001<\/h4>\n<p>\u94fe\u63a5kundb\u89d2\u8272 \u6267\u884c<\/p>\n<pre><code class=\"language-sql\">select * from performance_schema.replication_group_members;<\/code><\/pre>\n<p>\u5982\u4e0b\u56fe\u6240\u793a\u53d1\u73b0\u53ea\u6709\u4e00\u4e2aprimary\u53ef\u7528\uff0c\u5176\u4f59\u8282\u70b9\u5747\u5904\u4e8erecovery\u72b6\u6001\uff0c\u4e14\u8fc7\u4e00\u6bb5\u65f6\u95f4\u4f1a\u9000\u51fa\u3002<br \/>\n<img decoding=\"async\" src=\"https:\/\/nj.transwarp.cn:8180\/wp-content\/uploads\/2024\/05\/image-1714915903120.png\" alt=\"file\" \/><\/p>\n<h4>\u67e5\u770b\u65e5\u5fd7<\/h4>\n<p>\u67e5\u770b2\u4e2a\u95ee\u9898\u8282\u70b9\u7684\u65e5\u5fd7  <code>\/mnt\/disk1\/kundb11\/kundbdata\/error.log<\/code> \u5747\u53d1\u73b0\u4ee5\u4e0b\u62a5\u9519<\/p>\n<pre><code class=\"language-shell\">[ERROR] [MY-013122] [Repl] Slave SQL for channel 'group_replication_applier': Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, the server was unable to fetch a keyring key required to open an encrypted relay log file, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave. Error_code: MY-013122\n<\/code><\/pre>\n<p>\u5173\u952e\u8bcd\uff1a<code>the master&#039;s binary log is corrupted (you can check this by running &#039;mysqlbinlog&#039; on the binary log), the slave&#039;s relay log is corrupted<\/code><\/p>\n<p>\u5982\u679c\u5b58\u5728\u8be5\u9519\u8868\u660erelaylog\u5728\u65ad\u7535\u65f6\u6587\u4ef6\u53d1\u751f\u4e86\u635f\u574f\uff0c\u9700\u8981\u6e05\u7406\u6389\u9519\u8bef\u65e5\u5fd7\u3002<\/p>\n<h4>\u6e05\u7406\u65b9\u5f0f<\/h4>\n<p>\u5728\u6709\u95ee\u9898\u7684\u8282\u70b9\u4e0a\u5f0f\u5c06relay-log\u76ee\u5f55mv\u6389\u5e76\u65b0\u5efa\u4e00\u4e2a\u7a7a\u76ee\u5f55<br \/>\n\u8fdb\u5165kundb\u7684pod\u5185<\/p>\n<pre><code class=\"language-shell\"> ps -ef|grep mysqld<\/code><\/pre>\n<p>\u6839\u636e\u8fdb\u7a0b\u51fa\u6765\u7684\u8def\u5f84\uff0c\u6bd4\u5982<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/nj.transwarp.cn:8180\/wp-content\/uploads\/2024\/05\/image-1714916183570.png\" alt=\"file\" \/><\/p>\n<p>\u5728\u5bf9\u5e94\u7684pod\u5185\u6267\u884c\uff1a<\/p>\n<pre><code class=\"language-shell\">cd \/vdir\/mnt\/disk1\/kundb11\/kundbdata\/\nmv relay-logs relay-logs-bak\nmkdir relay-logs<\/code><\/pre>\n<p>\u9000\u51fapod \uff0ckubectl delete pod xxxx \u5bf9\u95ee\u9898pod\u8fdb\u884c\u91cd\u542f<\/p>\n<p>\u91cd\u542f\u4e4b\u540e \u94fe\u63a5kundb\u518d\u6b21\u8fdb\u884c\u9a8c\u8bc1<\/p>\n<pre><code class=\"language-sql\">select * from performance_schema.replication_group_members;<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/nj.transwarp.cn:8180\/wp-content\/uploads\/2024\/05\/image-1714916300689.png\" alt=\"file\" \/><\/p>\n<p>\u786e\u4fdd\u4e09\u4e2a\u90fd\u662fonline\u72b6\u6001\u5373\u53ef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6982\u8981\u63cf\u8ff0 \u672c\u6587\u63cf\u8ff0Kundb relay-log\u6587\u4ef6\u4e0d\u6b63\u5e38\u7684\u6392\u67e5\u601d\u8def\u4ee5\u53ca\u89e3\u51b3\u65b9\u6848 \u8be6\u7ec6\u63cf\u8ff0 \u5e38\u89c1\u4e8e\u96c6\u7fa4\u51fa\u73b0\u610f\u5916 ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/kbwp.transwarp.cn\/?p=12862\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-12862","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"acf":[],"_links":{"self":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/12862","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12862"}],"version-history":[{"count":3,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/12862\/revisions"}],"predecessor-version":[{"id":12896,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=\/wp\/v2\/posts\/12862\/revisions\/12896"}],"wp:attachment":[{"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kbwp.transwarp.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}