你好,我在使用canal工具使用docker部署,目前没有任何问题;但是在kubernetes集群内部署无法注册至admin,所以想请问一下该如何去排查或者解决 以下是部署时测试的yaml内容(已保证网络连通性正常)
apiVersion: apps/v1 kind: Deployment metadata: name: canal namespace: canal spec: replicas: 1 selector: matchLabels: app: canal-admin template: metadata: name: canal-admin labels: app: canal-admin spec: containers: - name: canal-admin image: canal/canal-admin imagePullPolicy: IfNotPresent env: - name: server.port value: "8089" - name: spring.datasource.address value: "172.10.10.10:3306" - name: spring.datasource.database value: canal_manager - name: spring.datasource.username value: canal - name: spring.datasource.password value: "123456" livenessProbe: exec: command: - ls initialDelaySeconds: 5 periodSeconds: 5 readinessProbe: exec: command: - ls initialDelaySeconds: 5 periodSeconds: 5 resources: requests: memory: "3072Mi" cpu: "1000m" limits: memory: "3072Mi" cpu: "1000m" ports: - name: svcport containerPort: 8089
apiVersion: apps/v1 kind: StatefulSet metadata: name: canal-server namespace: canal spec: serviceName: canal-server-svc replicas: 1 selector: matchLabels: app: canal-server template: metadata: name: canal-server labels: app: canal-server spec: containers: - name: canal-server image: canal/canal-server imagePullPolicy: IfNotPresent env: - name: canal.auto.scan value: "false" - name: canal.destinations value: mall_dest - name: canal.instance.master.address value: "172.10.10.10:3306" - name: canal.instance.dbUsername value: canal - name: canal.instance.dbPassword value: 123456 - name: canal.instance.connectionCharset value: "UTF-8" - name: canal.instance.tsdb.enable value: "true" - name: canal.instance.gtidon value: "false" - name: canal.admin.manage value: "canal-svc.canal.svc.cluster.local:8089" - name: canal.admin.port value: "11110" - name: canal.admin.user value: admin - name: canal.admin.passwd value: 4ACFE3202A5FF5CF467898FC58AAB1D615029441 - name: canal.admin.register.cluster value: mall_cluster - name: canal.register.ip value: canal-server-0.canal-server-svc.canal.svc.cluster.local livenessProbe: exec: command: - ls initialDelaySeconds: 5 periodSeconds: 5 readinessProbe: exec: command: - ls initialDelaySeconds: 5 periodSeconds: 5 resources: requests: memory: "3072Mi" cpu: "500m" limits: memory: "3072Mi" cpu: "500m" ports: - name: svcport-a containerPort: 11110 - name: svcport-b containerPort: 11111 - name: svcport-c containerPort: 11112
日志内容
at com.alibaba.otter.canal.parse.driver.mysql.MysqlQueryExecutor.queryMulti(MysqlQueryExecutor.java:109) ~[canal.parse.driver-1.1.5-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.queryMulti(MysqlConnection.java:111) ~[canal.parse-1.1.5-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.dumpTableMeta(DatabaseTableMeta.java:232) ~[canal.parse-1.1.5-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.tsdb.DatabaseTableMeta.rollback(DatabaseTableMeta.java:182) ~[canal.parse-1.1.5-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.mysql.AbstractMysqlEventParser.processTableMeta(AbstractMysqlEventParser.java:137) ~[canal.parse-1.1.5-SNAPSHOT.jar:na] at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:200) ~[canal.parse-1.1.5-SNAPSHOT.jar:na] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181] 2020-12-06 01:56:44.722 [destination = mall_dest , address = /172.10.10.10:3306 , EventParser] ERROR com.alibaba.otter.canal.common.alarm.LogAlarmHandler - destination:mall_dest[com.alibaba.otter.canal.parse.exception.CanalParseException: java.io.IOException: ErrorPacket [errorNumber=1146, fieldCount=-1, message=Table 'performance_schema.events_statements_summary_by_digest_supplement' doesn't exist, sqlState=42S02, sqlStateMarker=#] with command: show create table performance_schema
.accounts
;show create table performance_schema
.cond_instances
;show create table performance_schema
.events_stages_current
;show create table performance_schema
.events_stages_history
;show create table performance_schema
.events_stages_history_long
;show create table performance_schema
.events_stages_summary_by_account_by_event_name
;show create table performance_schema
.events_stages_summary_by_host_by_event_name
;
原提问者GitHub用户huangjc7
1、你的canal-server-svc 名称空间和cana-server不是同一个呀。
2、试试手动添加server
原回答者GitHub用户WangJian3306
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。