Logstash未安装 X-Pack 前是正常的,能使用,可是安装 X-Pack后启动报错,自己分析觉得是缺包,因此自己下载了commons-codec-1.10.jar 包,但是放到Logstash 的lib目录下(也测试了放倒相关许多子目录下)还是没用,因此只能求助社区的大牛们了。部分日志如下:
org/apache/http/impl/auth/BasicScheme.java:168:in `authenticate': java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64
from org/apache/http/impl/auth/HttpAuthenticator.java:239:in `doAuth'
from org/apache/http/impl/auth/HttpAuthenticator.java:218:in `generateAuthResponse'
from /Users/niuniu/Documents/ELK/logstash-5.6.3/logstash-core/lib/logstash/pipeline.rb:310:in `start_workers'
from /Users/niuniu/Documents/ELK/logstash-5.6.3/logstash-core/lib/logstash/pipeline.rb:235:in `run'
from /Users/niuniu/Documents/ELK/logstash-5.6.3/logstash-core/lib/logstash/agent.rb:398:in `start_pipeline'
from java/lang/Thread.java:745:in `run'
Caused by:
URLClassLoader.java:381:in `findClass': java.lang.ClassNotFoundException: org.apache.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'
org/apache/http/impl/auth/BasicScheme.java:168:in `authenticate': java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64
from org/apache/http/impl/auth/HttpAuthenticator.java:239:in `doAuth'
from org/apache/http/impl/auth/HttpAuthenticator.java:218:in `generateAuthResponse'
from /Users/niuniu/Documents/ELK/logstash-5.6.3/logstash-core/lib/logstash/pipeline.rb:310:in `start_workers'
from /Users/niuniu/Documents/ELK/logstash-5.6.3/logstash-core/lib/logstash/pipeline.rb:235:in `run'
from /Users/niuniu/Documents/ELK/logstash-5.6.3/logstash-core/lib/logstash/agent.rb:398:in `start_pipeline'
from java/lang/Thread.java:745:in `run'
Caused by:
URLClassLoader.java:381:in `findClass': java.lang.ClassNotFoundException: org.apache.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'
0 个回复