Installation of elasticsearch on Debian 10 hangs

Hi,

The installation of elasticsearch on a debian 10 using the repo hangs forever. The culprits seems to be the Java version checker:

root      3977  3.4  1.9 261376 160304 pts/0   Sl+  10:41   0:01          \_ aptitude install elasticsearch
root      4079  0.0  0.1  21836  9892 pts/1    Ss+  10:41   0:00              \_ /usr/bin/dpkg --status-fd 46 --configure --pending
root      4080  0.0  0.0   6956   840 pts/1    S+   10:41   0:00                  \_ sh -c (test -x /usr/lib/needrestart/dpkg-status && /usr/lib/needrestart/dpkg-status || cat > /dev/null)
root      4081  0.0  0.0   6956   188 pts/1    S+   10:41   0:00                  |   \_ sh -c (test -x /usr/lib/needrestart/dpkg-status && /usr/lib/needrestart/dpkg-status || cat > /dev/null)
root      4082  0.0  0.0   6956  1980 pts/1    S+   10:41   0:00                  |       \_ /bin/sh /usr/lib/needrestart/dpkg-status
root      4085  0.0  0.0  11328  3660 pts/1    S+   10:41   0:00                  \_ /bin/bash -e /var/lib/dpkg/info/elasticsearch.postinst configure
root      4089  0.0  0.0  11196  3408 pts/1    S+   10:41   0:00                      \_ /bin/bash /usr/share/elasticsearch/bin/elasticsearch-keystore upgrade
root      4091  0.0  0.0  11196  3600 pts/1    S+   10:41   0:00                          \_ /bin/bash /usr/share/elasticsearch/bin/elasticsearch-cli upgrade
root      4098  0.2  0.4 428732 35920 pts/1    Sl+  10:41   0:00                              \_ /usr/share/elasticsearch/jdk/bin/java -cp /usr/share/elasticsearch/lib/* org.elasticsearch.tools.java_version_checker.JavaVersionChecker

If I execute the line by hand, it also hangs forever.

UPDATE: Using the java from Debian, I receive the error:

Error: Could not find or load main class .usr.share.elasticsearch.lib.elasticsearch-cli-7.4.0.jar
Caused by: java.lang.ClassNotFoundException: /usr/share/elasticsearch/lib/elasticsearch-cli-7/4/0/jar

The installation of 7.3.2 succeeds.

Best,
Robert

what java version do you have installed? Can you run java -version? Also, just to make sure. Which line did you execute by hand, that also hangs?

Local java:
$ java -version

openjdk version "11.0.4" 2019-07-16
OpenJDK Runtime Environment (build 11.0.4+11-post-Debian-1deb10u1)
OpenJDK 64-Bit Server VM (build 11.0.4+11-post-Debian-1deb10u1, mixed mode, sharing)

ES 7.4.0 java
$ /usr/share/elasticsearch/jdk/bin/java -version

openjdk version "13" 2019-09-17
OpenJDK Runtime Environment AdoptOpenJDK (build 13+33)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 13+33, mixed mode, sharing)

ES 7.3.2 java

$ /usr/share/elasticsearch/jdk/bin/java -version

openjdk version "12.0.2" 2019-07-16
OpenJDK Runtime Environment (build 12.0.2+10)
OpenJDK 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)

I executed by hand:

/usr/share/elasticsearch/jdk/bin/java -cp /usr/share/elasticsearch/lib/* org.elasticsearch.tools.java_version_checker.JavaVersionChecker

I tested the installation, which succeeded, and the invocation of the JavaVersionChecker on a CentOS 7:

LANG=C /usr/share/elasticsearch/jdk/bin/java -cp /usr/share/elasticsearch/lib/* org.elasticsearch.tools.java_version_checker.JavaVersionChecker Error: Could not find or load main class .usr.share.elasticsearch.lib.elasticsearch-cli-7.4.0.jar Caused by: java.lang.ClassNotFoundException: /usr/share/elasticsearch/lib/elasticsearch-cli-7/4/0/jar ls /usr/share/elasticsearch/lib/*
/usr/share/elasticsearch/lib/elasticsearch-7.4.0.jar

Could you please describe more what you are doing to setup the yum/apt repo which you install from? Something is very wrong with the exception you get in both cases; we don't specify a jar as the class. Could you also try running /usr/share/elasticsearch/bin/elasticsearch-env directly, and if that fails upload the contents here?

In version 7.3.2 /usr/share/elasticsearch/bin/elasticsearch-env returns without any output, in version 7.4.0 it hangs.

It still happens in version 7.4.2.

Is there some investigation going on?

It still happens with 7.5.0.

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