I'm running logstash
with Java 10 as follows:
./logstash -f std_std.conf
but I get this error:
Unrecognized VM option 'UseParNewGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Thank you so much in advance.
Sorry. I've found out Java 10 is not supported. Closing.
As @kylekong said, java 10
is not supported. You could install java 8
instead. Using Ubuntu you should do something like this:
sudo -i
apt-get update
apt-get install openjdk-8-jre-headless -y
apt-get install openjdk-8-jdk-headless -y
java -version
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
apt-get install apt-transport-https
apt-get update && apt-get install logstash
exit
Then you can start Logstash
with:
sudo systemctl start logstash
Reference: https://www.elastic.co/guide/en/logstash/current/installing-logstash.html
You probably have Java 10 (not proper version). You should install Java 8 (Ubuntu solution):
sudo apt install openjdk-8-jdk
It won't automatically change your default java compiler. Your should make it by your own. Change default java compiler:
sudo update-alternatives --config java
Type 0 or 1 or 2 ... option. Probably last entry. Now:
./logstash -f ../your-logstash-file.conf
According to the install guide... it is supported.
https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html
"Elasticsearch requires Java 8 or later. Use the official Oracle distribution or an open-source distribution such as OpenJDK."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With