Overview of the issue
I went to install Elasticsearch on a newly built Fedora 28 VM. For my first attempt, I tried to use the built-in repo as follows
sudo yum update sudo yum install elasticsearch
However, when I started Elasticsearch, it failed to launch with the following error.
Could not find netty3-3.9.3 Java extension for this JVM
My first effort at resolution involved searching on-line for a solution. Some solutions recommend fixing Open JVM. However, it seemed to me to be a more straight-forward solution to just install the Oracle JVM. So, I removed Open JVM and installed Oracle JVM instead. This resolved the issue and Elasticsearch started normally.
Summary of my steps
Download the latest Oracle JVM from Oracle JVM Download
Install the repo with the following command.
sudo rpm -Uvh jdk-10.0.1_linux-x64_bin.rpm
I used the
alternatives command to point to my java version.
alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 200000
This installed the Oracle JVM.
Next, install Elasticsearch. This time I used a more recent Elasticsearch repo.
Import the GPG key
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
Create /etc/yum.repos.d/elasticsearch.repo as below
[elasticsearch-6.x] name=Elasticsearch repository for 6.x packages baseurl=https://artifacts.elastic.co/packages/6.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md
Run the install of Elasticsearch.
sudo yum install elasticsearch
Configure Elasticsearch to run at boot-time with the following instructions.
sudo systemctl daemon-reload sudo systemctl enable elasticsearch
Start Elasticsearch with
sudo systemctl start elasticsearch
Finally, confirm that it has started correctly.
systemctl status elasticsearch