简体   繁体   中英

Logstash not starting up

I am trying to start logstash 5.4 on my linux rhel 6 server but i'm getting the following message:

WARNING: Default JAVA_OPTS will be overridden by the JAVA_OPTS defined in the environment. Environment JAVA_OPTS are -Xms1G .Xmx64G Error: Could not find or load main class .Xmx64G

Following is my logstash.conf in which I'm try to ingest data from sqlserver

    input {
  jdbc {
    jdbc_driver_library => "/usr/share/logstash/mysql-connector-java-5.1.42-bin.jar"
    jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
    jdbc_connection_string => "jdbc:sqlserver://9.37.92.72:1433;databaseName=KaiserPermanente;"
    jdbc_user => "sa"
    jdbc_password => "passw0rd!"
    statement => "select * from IEVDIncident ;"
  }
}

output {
  elasticsearch {
    hosts => "http://localhost:9200"
    index => "kaiserpermanente"
  }
  stdout { codec => json_lines }
}

Please tell me how can I resolve this one. Thanks

It seems you have an environment variable JAVA_OPTS with value -Xms1G .Xmx64G so it overrides logstash options. You need to change your variable to -Xms1G -Xmx64G . Replace . with - .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM