分享

flume1.7 sink 到es5.5.2 报错问题

J20_果农 发表于 2017-8-24 19:13:22 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 1 13885
本帖最后由 J20_果农 于 2017-8-24 19:15 编辑

版本flume1.7.0 , es 5.5.2,es 5.4.3
已经把es下的lib所有jar都扔到flume下的lib
两个版本都试了 ,一直报错 , 大神们帮忙看一下,谢谢!
错误信息:
2017-08-24 17:27:13,517 (conf-file-poller-0) [ERROR - org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:146)] Failed to start agent because dependencies were not found in classpath. Error follows.
java.lang.NoClassDefFoundError: org/elasticsearch/common/io/BytesStream
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:190)
        at org.apache.flume.sink.elasticsearch.ElasticSearchSink.configure(ElasticSearchSink.java:287)
        at org.apache.flume.conf.Configurables.configure(Configurables.java:41)
        at org.apache.flume.node.AbstractConfigurationProvider.loadSinks(AbstractConfigurationProvider.java:411)
        at org.apache.flume.node.AbstractConfigurationProvider.getConfiguration(AbstractConfigurationProvider.java:102)
        at org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:141)


[mw_shl_code=applescript,true]agent5.sinks.k1.channel = c1
agent5.sinks.k1.type=org.apache.flume.sink.elasticsearch.ElasticSearchSink

agent5.sinks.k1.hostNames=10.30.5.2:9300,10.30.5.3:9300,10.30.5.4:9300
agent5.sinks.k1.indexName=kafka_log
agent5.sinks.k1.indexType = logs
agent5.sinks.k1.clusterName = a-cluster
agent5.sinks.k1.ttl = 5d
agent5.sinks.k1.batchSize = 4000
agent5.sinks.k1.serializer = org.apache.flume.sink.elasticsearch.ElasticSearchDynamicSerializer[/mw_shl_code]



已有(1)人评论

跳转到指定楼层
qcbb001 发表于 2017-8-24 20:09:47
本质应该还是缺包
可以通过maven下载
[mw_shl_code=bash,true]<dependency>
    <groupId>org.apache.servicemix.bundles</groupId>
    <artifactId>org.apache.servicemix.bundles.elasticsearch</artifactId>
    <version>1.0.0_1</version>
</dependency>[/mw_shl_code]
或则sbt
[mw_shl_code=bash,true]libraryDependencies += "org.apache.servicemix.bundles" % "org.apache.servicemix.bundles.elasticsearch" % "1.0.0_1"
[/mw_shl_code]

也可以找到下面对应版本的jar包
org.apache.servicemix.bundles.elasticsearch-1.0.0_1.jar
org.apache.servicemix.bundles.elasticsearch-1.0.0_1-sources.jar
org.apache.servicemix.bundles.elasticsearch-1.0.0_1-javadoc.jar

网盘里有两个对应的包
链接:http://pan.baidu.com/s/1o8sRoiY 密码:fv8p
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条