dble
dble copied to clipboard
java.lang.ClassCastException is thrown after adding ‘useOuterHa=true’ in zookeeper and run ‘reload @@config’
-
dble version:
2.19.09.0 -
preconditions :
start a dble cluster with server.xml dose not configuseOuterHa -
steps:
step1. add<property name="useOuterHa">true</property>into server.xml step2. runreload @@config_allorinit_zk_data.sh -
real result:
- All dble nodes haven't restarted will throw a java.lang.ClassCastException as warning.
jvm 1 | 2019-12-07 16:10:48,950 [WARN ][Curator-PathChildrenCache-3] get Error when update Ha status java.lang.ClassCastException: com.actiontech.dble.backend.datasource.PhysicalDBPool cannot be cast to com.actiontech.dble.backend.datasource.PhysicalDNPoolSingleWH
jvm 1 | at com.actiontech.dble.config.loader.zkprocess.zktoxml.listen.DataHostStatusListener.updateStatus(DataHostStatusListener.java:44)
jvm 1 | at com.actiontech.dble.config.loader.zkprocess.zktoxml.listen.DataHostStatusListener.childEvent(DataHostStatusListener.java:30)
jvm 1 | at org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:522)
jvm 1 | at org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:516)
jvm 1 | at org.apache.curator.framework.listen.ListenerContainer$1.run(ListenerContainer.java:93)
jvm 1 | at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:310)
jvm 1 | at org.apache.curator.framework.listen.ListenerContainer.forEach(ListenerContainer.java:84)
jvm 1 | at org.apache.curator.framework.recipes.cache.PathChildrenCache.callListeners(PathChildrenCache.java:513)
jvm 1 | at org.apache.curator.framework.recipes.cache.EventOperation.invoke(EventOperation.java:35)
jvm 1 | at org.apache.curator.framework.recipes.cache.PathChildrenCache$9.run(PathChildrenCache.java:773)
jvm 1 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
jvm 1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266)
jvm 1 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
jvm 1 | at java.util.concurrent.FutureTask.run(FutureTask.java:266)
jvm 1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
jvm 1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
jvm 1 | at java.lang.Thread.run(Thread.java:748)
jvm 1 | (com.actiontech.dble.config.loader.zkprocess.zktoxml.listen.DataHostStatusListener:DataHostStatusListener.java:48)
- supplements:
- The warning is not friendly to understand what happened. It should tell people the node must be restarted to make config effective after
useOuterHachanged.
- The warning is not friendly to understand what happened. It should tell people the node must be restarted to make config effective after
after set useOuterHa=true, and reload @@config_all success, try to restart dble, the other dble's log has following warning:
2019-12-09 10:03:04.203 WARN [Curator-PathChildrenCache-0] (com.actiontech.dble.server.OfflineStatusListener.releaseForBinlog(OfflineStatusListener.java:130)) - releaseForBinlog error
java.lang.ArrayIndexOutOfBoundsException: 1
at com.actiontech.dble.config.loader.zkprocess.zookeeper.process.BinlogPause.<init>(BinlogPause.java:28) ~[dble-9.9.9.9.jar:?]
at com.actiontech.dble.server.OfflineStatusListener.releaseForBinlog(OfflineStatusListener.java:98) [dble-9.9.9.9.jar:?]
at com.actiontech.dble.server.OfflineStatusListener.deleteNode(OfflineStatusListener.java:53) [dble-9.9.9.9.jar:?]
at com.actiontech.dble.server.OfflineStatusListener.childEvent(OfflineStatusListener.java:43) [dble-9.9.9.9.jar:?]
at org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:522) [curator-recipes-2.11.0.jar:?]
at org.apache.curator.framework.recipes.cache.PathChildrenCache$5.apply(PathChildrenCache.java:516) [curator-recipes-2.11.0.jar:?]
at org.apache.curator.framework.listen.ListenerContainer$1.run(ListenerContainer.java:93) [curator-framework-2.11.0.jar:?]
at com.google.common.util.concurrent.MoreExecutors$DirectExecutorService.execute(MoreExecutors.java:310) [guava-19.0.jar:?]
at org.apache.curator.framework.listen.ListenerContainer.forEach(ListenerContainer.java:84) [curator-framework-2.11.0.jar:?]
at org.apache.curator.framework.recipes.cache.PathChildrenCache.callListeners(PathChildrenCache.java:513) [curator-recipes-2.11.0.jar:?]
at org.apache.curator.framework.recipes.cache.EventOperation.invoke(EventOperation.java:35) [curator-recipes-2.11.0.jar:?]
at org.apache.curator.framework.recipes.cache.PathChildrenCache$9.run(PathChildrenCache.java:773) [curator-recipes-2.11.0.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_121]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_121]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_121]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
verified on dble:5.7.21-dble-2.19.09.1-b9fccb62eac24fffdcd84daca54e6d239563cb77-20200103091125