Logstash无法识别的国家/地区VM选项'UseParNewGC'

时间:2018-12-23 21:12:28

标签: elasticsearch logstash elastic-stack

我无法使用Logstash导入Kibana,我的Mac上具有以下版本,请帮助。

  • Logstash 6.5.4
  • 基巴纳语6.5.4
  • Elasticsearch 6.5.4
  • Java 11.0.1

我收到此错误

错误消息

unrecognised countries VM option 'UseParNewGC' 
Error not create the Java virtual machine
Error fatal exception has occurred.  Program will exist.

我已经创建了以下配置文件

配置文件(cars.config)

input {
    file {
        start_position => "beginning"
        sincedb_path => "/dev/null"
    }
}
filter {
    csv {
        separator => ","
        columns => [ "maker", "model", "mileage", "manufacture_year", "engine_power", "fuel_type", "date_created", "price_eur", "door_count", "seat_count" ]
    }
    mutate {convert => [ "door_count", "integer" ]}
    mutate {convert => [ "seat_count", "integer" ]}
}
output {
    elasticsearch {
        hosts => "localhost"
        index => "cars"
        document_type => "sold_cars"
    }
    stdout {}
}

我正在导入的命令

bin/logstash -f cars.config

更新-更改配置后

以下jvm.options文件中已应用的配置更改:

Remove line: -XX:+UseParNewGC
Remove line: -XX:+UseConcMarkSweepGC
Add: -XX:+UseG1GC

结果/第二次尝试

console window output

更新2

Second attempt using full path to config file

1 个答案:

答案 0 :(得分:1)

您有两个选择:

  1. 将系统的Java降级到版本8或在某个地方解压缩jdk8,并在启动脚本logstash中添加export JAVA_HOME=/PATH_TO_JDK8/
  2. jvm.options文件中:

    删除行:-XX:+UseParNewGC

    删除行:-XX:+UseConcMarkSweepGC

    添加:-XX:+UseG1GC

有关此问题的更多详细信息,请参见https://github.com/elastic/logstash/issues/9316