UNSOLVED 部署canal集群的时候,报错
-
在设置好canal.zkServers=zk1:2181,zk2:2181,zk3:2181
的时候 log日志canal.log就报这个错 ,但是这三台集群kafka都搭好了,能ping通(肯定能啊) 但是报zk错误,WARN org.apache.zookeeper.ClientCnxn - Session 0x0 !for server null, unexpected error, closing socket connection and attempting reconnect -
@junyu-cloudcanal 大佬麻烦看下
2021-03-10 10:05:41.922 [Thread-6] INFO com.alibaba.otter.canal.deployer.CanalStarter - ## stop the canal server
2021-03-10 10:05:41.922 [Thread-7] INFO c.a.o.canal.connector.kafka.producer.CanalKafkaProducer - ## stop the kafka producer
2021-03-10 10:05:41.927 [Thread-7] INFO c.a.o.canal.connector.kafka.producer.CanalKafkaProducer - ## kafka producer is down.
2021-03-10 10:05:43.106 [Thread-6] INFO com.alibaba.otter.canal.deployer.CanalController - ## stop the canal server[172.16..(172.16..**):11111]
2021-03-10 10:05:43.109 [Thread-6] INFO com.alibaba.otter.canal.deployer.CanalStarter - ## canal server is down.
2021-03-10 10:10:42.901 [main] INFO com.alibaba.otter.canal.deployer.CanalLauncher - ## set default uncaught exception handler
2021-03-10 10:10:42.947 [main] INFO com.alibaba.otter.canal.deployer.CanalLauncher - ## load canal configurations
2021-03-10 10:10:43.404 [main] WARN org.apache.kafka.clients.producer.ProducerConfig - The configuration ‘kerberos.enable’ was supplied but isn’t a known config.
2021-03-10 10:10:43.406 [main] WARN org.apache.kafka.clients.producer.ProducerConfig - The configuration ‘kerberos.krb5.file’ was supplied but isn’t a known config.
2021-03-10 10:10:43.406 [main] WARN org.apache.kafka.clients.producer.ProducerConfig - The configuration ‘kerberos.jaas.file’ was supplied but isn’t a known config.
2021-03-10 10:10:43.408 [main] INFO com.alibaba.otter.canal.deployer.CanalStarter - ## start the canal server.
2021-03-10 10:10:43.505 [main-SendThread(jt-xw-test01:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at org.apache.zookeeper.Login.<init>(Login.java:44) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.client.ZooKeeperSaslClient.createSaslClient(ZooKeeperSaslClient.java:198) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.client.ZooKeeperSaslClient.<init>(ZooKeeperSaslClient.java:104) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:943) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:993) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_141]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_141]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) ~[na:1.8.0_141]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_141]
… 5 common frames omitted
2021-03-10 10:10:44.607 [main-SendThread(jt-xw-test01:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at org.apache.zookeeper.Login.<init>(Login.java:44) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.client.ZooKeeperSaslClient.createSaslClient(ZooKeeperSaslClient.java:198) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.client.ZooKeeperSaslClient.<init>(ZooKeeperSaslClient.java:104) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:943) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:993) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
2021-03-10 10:10:45.708 [main-SendThread(jt-xw-test01:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at org.apache.zookeeper.Login.<init>(Login.java:44) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.client.ZooKeeperSaslClient.createSaslClient(ZooKeeperSaslClient.java:198) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.client.ZooKeeperSaslClient.<init>(ZooKeeperSaslClient.java:104) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:943) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:993) ~[zookeeper-3.4.5.jar:3.4.5-1392090] -
@土鳖 这种错误一般是启动没启成功,需要看下刚开始报错的地方。如果确定不了,交流群中找我发下完整日志,否则看不出来。
-
感觉你发的日志不是根本的原因。如果单纯看你这个日志的报错,是找不到类定义,这个一般是类冲突。如果你是用自己改过的canal代码部署的话,检查下依赖吧。另外同时看下server、client和zk的日志,结合起来一起看下,看看有没有新的日志线索~
-
2021-02-26 17:16:58.030 [main-SendThread(jt-xw-test01:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at org.apache.zookeeper.Login.<init>(Login.java:44) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.client.ZooKeeperSaslClient.createSaslClient(ZooKeeperSaslClient.java:198) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.client.ZooKeeperSaslClient.<init>(ZooKeeperSaslClient.java:104) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:943) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:993) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_141]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_141]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335) ~[na:1.8.0_141]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_141]
… 5 common frames omitted
2021-02-26 17:16:58.132 [main-SendThread(jt-xw-test05:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at org.apache.zookeeper.Login.<init>(Login.java:44) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.client.ZooKeeperSaslClient.createSaslClient(ZooKeeperSaslClient.java:198) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.client.ZooKeeperSaslClient.<init>(ZooKeeperSaslClient.java:104) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:943) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:993) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
2021-02-26 17:16:58.233 [main-SendThread(jt-xw-test03:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at org.apache.zookeeper.Login.<init>(Login.java:44) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.client.ZooKeeperSaslClient.createSaslClient(ZooKeeperSaslClient.java:198) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.client.ZooKeeperSaslClient.<init>(ZooKeeperSaslClient.java:104) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:943) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:993) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
2021-02-26 17:16:59.334 [main-SendThread(jt-xw-test01:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at org.apache.zookeeper.Login.<init>(Login.java:44) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.client.ZooKeeperSaslClient.createSaslClient(ZooKeeperSaslClient.java:198) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.client.ZooKeeperSaslClient.<init>(ZooKeeperSaslClient.java:104) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:943) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:993) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
2021-02-26 17:16:59.435 [main-SendThread(jt-xw-test05:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at org.apache.zookeeper.Login.<init>(Login.java:44) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.client.ZooKeeperSaslClient.createSaslClient(ZooKeeperSaslClient.java:198) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.client.ZooKeeperSaslClient.<init>(ZooKeeperSaslClient.java:104) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:943) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:993) ~[zookeeper-3.4.5.jar:3.4.5-1392090]
2021-02-26 17:16:59.536 [main-SendThread(jt-xw-test03:2181)] WARN org.apache.zookeeper.ClientCnxn - Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.lang.NoClassDefFoundError: org/apache/log4j/Logger -
看下完整的日志,第一个报错的异常发一下
-
zk1 装的canal 单节点启动没问题