Java Upgrade doesn't stop elasticsearch. Why?

I am using external JDK on Oracle Linux 7.9. Elasticsearch service is up and running when I upgrade the java. Also, there are no entries in log. I am not sure about this behavior.

Elasticsearch uses ES_JAVA_HOME=/usr/bin/java but it points to new directory after update ie. /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.342.b07-1.el7_9.x86_64/jre/bin/java and before it was /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/bin/java.

Can anyone explain? I expect elasticsearch to interrupt since after upgrade the older path doesn't exist.

ls -lrt /usr/bin/java
lrwxrwxrwx. 1 root root 22 Sep 12 05:43 /usr/bin/java -> /etc/alternatives/java

ls -lrt /etc/alternatives/java
lrwxrwxrwx. 1 root root 73 Sep 12 05:43 /etc/alternatives/java -> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.322.b06-1.el7_9.x86_64/jre/bin/java


# After upgrade
ls -lrt /etc/alternatives/java
lrwxrwxrwx. 1 root root 73 Sep 12 05:43 /etc/alternatives/java -> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.342.b07-1.el7_9.x86_64/jre/bin/java

But it'll have the things it needs to run in memory (via the OS). You need to restart it if you want it to use the new one.

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