前言
dolphinscheduler安装版本:3.1.8
zookeeper版本:3.4.5-cdh6.3.2
发现问题&分析问题
- 启动运行发现worker有错误日志
Exception in thread "Worker-Server" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'workerServer': Unsatisfied dependency expressed through field 'workerRegistryClient'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'workerRegistryClient': Unsatisfied dependency expressed through field 'registryClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'registryClient': Invocation of init method failed; nested exception is org.apache.dolphinscheduler.registry.api.RegistryException: Failed to put registry key: /nodes/master
.....
Caused by: org.apache.zookeeper.KeeperException$UnimplementedException: KeeperErrorCode = Unimplemented for /dolphinscheduler/nodes/master
...
-
通过查询github发现有老哥遇到相同的错误
[Bug] [Config] The rootPath for modifying the registration of zookeeper by dolphinescheduler is invalid · Issue #12516 · apache/dolphinscheduler (github.com)
curator官网也有相对应的公布 3.4.x需要对应curator的4.2.0版本
ZooKeeper Version 3.4.x Compatibility | Apache Curator -
官方文档上显示,3.4.6+版本即可,随即尝试升级了zk到3.4.14发现任然有问题
- 问了社区群里的老哥 发现dolphinscheduler 有在这方面做准备 但是需要自己重新编译各一个新包
瞅了一眼源码
<profiles>
<profile>
<id>zk-3.8</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<zookeeper.version>3.8.0</zookeeper.version>
<curator.version>5.3.0</curator.version>
</properties>
</profile>
<profile>
<id>zk-3.4</id>
<activation>
<property>
<name>zk-3.4</name>
</property>
</activation>
<properties>
<curator.version>4.3.0</curator.version>
<zookeeper.version>3.4.14</zookeeper.version>
</properties>
</profile>
</profiles>
默认是使用zk-3.8的配置,所以会出现不兼容问题。
使用zk-3.4配置即可适配3.4.x
ps:之前还有shell的问题,* [BUG][install.sh] fix the install Error "Command not found rmr" & support ZooKeeper (3.4.6+)
2023.1.12已经被社区解决
解决办法
#clone
git clone https://github.com/apache/dolphinscheduler.git
#切换到3.1.8的tag
git -c core.quotepath=false -c log.showSignature=false checkout 3.1.8
根目录执行
mvn clean package -T 1C -Prelease '-Dmaven.test.skip=true' '-Dcheckstyle.skip=true' '-Dmaven.javadoc.skip=true' '-Dzk-3.4'
大约三四十分钟后打包完成
拿到打包好的新安装包 按照文档继续安装
{path}\dolphinscheduler\dolphinscheduler-dist\target\apache-dolphinscheduler-3.1.8-bin.tar.gz
总结
感谢github
感谢群里挖呀挖呀挖老哥
网友评论