开发者社区> 问答> 正文

阿里云ACK k8s集群内部署canal-server无法向admin注册

你好,我在使用canal工具使用docker部署,目前没有任何问题;但是在kubernetes集群内部署无法注册至admin,所以想请问一下该如何去排查或者解决 以下是部署时测试的yaml内容(已保证网络连通性正常)

######canal-admin.yaml###### apiVersion: v1 kind: Service metadata: name: canal-svc namespace: canal spec: selector: app: canal-admin ports: - port: 8089 targetPort: 8089 type: NodePort

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

######canal-server.yaml###### apiVersion: v1 kind: Service metadata: name: canal-server-svc labels: app: canal-server-svc namespace: bbcl-prod spec: selector: app: canal-server ports: - name: srvport-a port: 11110 targetPort: 11110 - name: srvport-b port: 11111 targetPort: 11111 - name: srvport-c port: 11112 targetPort: 11112 clusterIP: None

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

展开
收起
山海行 2023-04-27 19:25:58 229 0
1 条回答
写回答
取消 提交回答
  • 1、你的canal-server-svc 名称空间和cana-server不是同一个呀。

    2、试试手动添加server

    原回答者GitHub用户WangJian3306

    2023-04-28 14:16:05
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
《边缘容器服务ACK@Edge》 立即下载
云效携手SAE助力掌讯科技持续降本提效 立即下载
探秘边缘容器,ACK@Edge 商业化解读 立即下载

相关镜像