疲劳是最舒适的枕头,努力工作吧。

Logstash启动配置文件 启动成功后立即被关闭 elasticsearch会显示 远程主机强迫关闭连接

Logstash | 作者 zuiyowu | 发布于2018年01月22日 | 阅读数:6327

The stdin plugin is now waiting for input:
15:46:45.008 [[main]-pipeline-manager] INFO logstash.outputs.elasticsearch - El
asticsearch pool URLs updated {:changes=>{:removed=>[], :added=>["http://~hidden
~:~hidden~@192.168.0.100:9200"]}}
15:46:45.010 [[main]-pipeline-manager] INFO logstash.outputs.elasticsearch - Ru
nning health check to see if an Elasticsearch connection is working {:url=>#<URI
::HTTP:0x1e63073 URL:http://~hidden~:~hidden~@192.168.0.100:9200&gt;, :healthcheck_
path=>"/"}
15:46:45.157 [Api Webserver] INFO logstash.agent - Successfully started Logstas
h API endpoint {:port=>9602}
org/apache/http/impl/auth/BasicScheme.java:168:in `authenticate': java.lang.NoCl
assDefFoundError: org/apache/commons/codec/binary/Base64
from org/apache/http/impl/auth/HttpAuthenticator.java:239:in `doAuth'....
Caused by:
URLClassLoader.java:381:in `findClass': java.lang.ClassNotFoundException: org.ap
ache.commons.codec.binary.Base64
        from JRubyClassLoader.java:221:in `findClass'
        from ClassLoader.java:424:in `loadClass'
        from ClassLoader.java:357:in `loadClass'
        from BasicScheme.java:168:in `authenticate'
        from HttpAuthenticator.java:239:in `doAuth'
        from HttpAuthenticator.java:218:in `generateAuthResponse'
        from MainClientExec.java:262:in `execute'
        from ProtocolExec.java:184:in `execute'
        from RetryExec.java:88:in `execute'
        from RedirectExec.java:110:in `execute'
        from InternalHttpClient.java:184:in `doExecute'
        from CloseableHttpClient.java:71:in `execute'
        from CloseableHttpClient.java:220:in `execute'
        from CloseableHttpClient.java:164:in `execute'...
以上是logstash启动配置文件后 报错信息。。我的配置文件如下:
input{
    stdin{}
}
output{
    elasticsearch{
        hosts => "192.168.0.100:9200"
    user => "elastic"
    password => "changeme"
    index => "megacorp"
     }
   stdout{codec => rubydebug}
}
不知道哪错了,如果不加elasticsearch的配置,是能打出日志的,但是加上就报错,求助
已邀请:

zuiyowu

赞同来自:

已解决、、es5.1.1版本并不能用logstash5.1.1、、改用低版本就行

shdosh

赞同来自:

你好请问你的logstash改用什么版本了,我es用的5.4.1,logstash用的5.4.1也有这个问题

要回复问题请先登录注册