当前位置:   article > 正文

解决Flume启动报错 java.lang.ClassNotFoundException: org.apache.zookeeper.KeeperException

java.lang.classnotfoundexception: org.apache.zookeeper.keeperexception$nonod
nohup: ignoring input
Info: Including Hive libraries found via () for Hive access
+ exec /opt/jdk1.8.0_221/bin/java -Xmx20m -Dflume.root.logger=INFO,console -cp 'conf:/opt/apache-flume-1.9.0-bin/lib/*:/lib/*' -Djava.library.path= org.apache.flume.node.Application -z xx.xx.xx.xx:2181 -p /flumeConfig -name a139888288461393920
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/zookeeper/KeeperException
	at org.apache.curator.framework.CuratorFrameworkFactory$Builder.build(CuratorFrameworkFactory.java:122)
	at org.apache.curator.framework.CuratorFrameworkFactory.newClient(CuratorFrameworkFactory.java:91)
	at org.apache.curator.framework.CuratorFrameworkFactory.newClient(CuratorFrameworkFactory.java:76)
	at org.apache.flume.node.AbstractZooKeeperConfigurationProvider.createClient(AbstractZooKeeperConfigurationProvider.java:87)
	at org.apache.flume.node.PollingZooKeeperConfigurationProvider.<init>(PollingZooKeeperConfigurationProvider.java:56)
	at org.apache.flume.node.Application.main(Application.java:311)
Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.KeeperException
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 6 more
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16

原因:flume的lib目录缺少
在这里插入图片描述
两个jar包

解决方法:
(1)将两个jar包放到flume的lib目录下
(2)配置 FLUME_CLASSPATH=”zookeeper jar 的地址“.例如:FLUME_CLASSPATH="/opt/zookeeper/zookeeper-3.5.8.jar;zookeeper-jute-3.5.8.jar"。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/386330
推荐阅读
相关标签
  

闽ICP备14008679号