Logstash无法在Windows 10 Pro中启动-ELK堆栈

时间:2019-04-04 12:47:55

标签: elasticsearch logstash kibana elastic-stack logstash-configuration

我是ELK Stack的新手。我已经在Windows中安装了ELK堆栈。 Elastic Search和kibana效果很好。但是当我启动logstash时,它显示以下错误。

当我启动logstash时:

C:\Program Files\logstash-6.7.0\logstash-6.7.0\bin>logstash.bat
Picked up _JAVA_OPTIONS: -Xmx1024M
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Error: Could not find or load main class Files\logstash-6.7.0\logstash-6.7.0\logstash-core\lib\jars\animal-sniffer-annotations-1.14.jar;C:\Program
Caused by: java.lang.ClassNotFoundException: Files\logstash-6/7/0\logstash-6/7/0\logstash-core\lib\jars\animal-sniffer-annotations-1/14/jar;C:\Program

当我尝试通过logstash传递数据时:

C:\Program Files\logstash-6.7.0\logstash-6.7.0\bin>logstash -f logstash_apps.config
Picked up _JAVA_OPTIONS: -Xmx1024M
Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Error: Could not find or load main class Files\logstash-6.7.0\logstash-6.7.0\logstash-core\lib\jars\animal-sniffer-annotations-1.14.jar;C:\Program
Caused by: java.lang.ClassNotFoundException: Files\logstash-6/7/0\logstash-6/7/0\logstash-core\lib\jars\animal-sniffer-annotations-1/14/jar;C:\Program

我在logstash目录中搜索了丢失的文件animal-sniffer-annotations-1.14.jar。它在bin文件夹中。我尝试搜索stackoverflow和google,但找不到合适的解决方案。有人给我一些解决问题的方法。

`

1 个答案:

答案 0 :(得分:1)

问题似乎是由目录名中的空格引起的,如日志所示,它不是在C:\Program Files中查找,而是在Files\中查找。

Error: Could not find or load main class Files\logstash-6.7.0\logstash-6.7.0\logstash-core\lib\jars\animal-sniffer-annotations-1.14.jar

将Logstash安装移动到名称中没有空格的目录。