Unable to properly use Logstash

Hi,

I am unable to launch Logstash. Elasticsearch and Kibana are both running
When I execute the following command:

bin\logstash.bat -f .\config\logstash-sample.conf

I get this:

> 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.
> Unrecognized option: -
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit.

I have the following Java version when I run Java -version

> java version "11.0.6" 2020-01-14 LTS
> Java(TM) SE Runtime Environment 18.9 (build 11.0.6+8-LTS)
> Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.6+8-LTS, mixed mode)

I am using logstash-7.5.2 and run it on Windows 10.
I am very new to elk and tried to search all the forums but have not been able to locate an answer...
Thank you in advance

It is possible that the - in -f is an en-dash (or another variant of dash). It has to be a hyphen. Try typing the entire command in, do not copy and paste it from a web site.

HI @Badger

Thank you for the feedback. I have tried to type it out and it still produces the same result.
I have tried to create my own config file, still the same result.
And I have also tried another Windows computer, to no alas.

bin\logstash.bat -f .\config\logstash-sample.conf

Even when I just type

bin\logstash.bat .\config\logstash-sample.conf

It still produces the same result. I am really not sure what could be the source of this problem... Any other ideas?

Can you try the following command to see if it comes from the .bat or from your configuration ?

bin\logstash.bat -e 'input { stdin { } } output { stdout {} }'

Hi @benoitdupont

I ran it and it produced the same output:

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.
Unrecognized option: -
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Hm OK, have you tried to download and extract again logstash? If it still fails, it narrows the search by excluding the bat

It is also possible that the flag is originating from the jvm.options file in the config directory.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.