flume1.7 sink 到es5.5.2 报错问题
本帖最后由 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) 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)
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
本质应该还是缺包
可以通过maven下载
<dependency>
<groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.elasticsearch</artifactId>
<version>1.0.0_1</version>
</dependency>
或则sbt
libraryDependencies += "org.apache.servicemix.bundles" % "org.apache.servicemix.bundles.elasticsearch" % "1.0.0_1"
也可以找到下面对应版本的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
页:
[1]