# Installation of elasticsearch on Debian 10 hangs

**URL:** <https://discuss.elastic.co/t/installation-of-elasticsearch-on-debian-10-hangs/202794>\
**Category:** Elasticsearch\
**Created:** [October 9, 2019, 8:59am UTC](https://discuss.elastic.co/t/installation-of-elasticsearch-on-debian-10-hangs/202794 "2019-10-09T08:59:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![leprovokateur](https://avatars.discourse-cdn.com/v4/letter/l/8e8cbc/32.png) [@leprovokateur](https://discuss.elastic.co/u/leprovokateur)\
**Post date:** [October 9, 2019, 8:59am UTC](https://discuss.elastic.co/t/installation-of-elasticsearch-on-debian-10-hangs/202794/1 "2019-10-09T08:59:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 9, 2019, 1:09pm UTC](https://discuss.elastic.co/t/installation-of-elasticsearch-on-debian-10-hangs/202794/2 "2019-10-09T13:09:28Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![leprovokateur](https://avatars.discourse-cdn.com/v4/letter/l/8e8cbc/32.png) [@leprovokateur](https://discuss.elastic.co/u/leprovokateur)\
**Post date:** [October 9, 2019, 1:17pm UTC](https://discuss.elastic.co/t/installation-of-elasticsearch-on-debian-10-hangs/202794/3 "2019-10-09T13:17:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![leprovokateur](https://avatars.discourse-cdn.com/v4/letter/l/8e8cbc/32.png) [@leprovokateur](https://discuss.elastic.co/u/leprovokateur)\
**Post date:** [October 10, 2019, 8:23am UTC](https://discuss.elastic.co/t/installation-of-elasticsearch-on-debian-10-hangs/202794/4 "2019-10-10T08:23:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [October 10, 2019, 5:26pm UTC](https://discuss.elastic.co/t/installation-of-elasticsearch-on-debian-10-hangs/202794/5 "2019-10-10T17:26:40Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![leprovokateur](https://avatars.discourse-cdn.com/v4/letter/l/8e8cbc/32.png) [@leprovokateur](https://discuss.elastic.co/u/leprovokateur)\
**Post date:** [October 15, 2019, 7:46am UTC](https://discuss.elastic.co/t/installation-of-elasticsearch-on-debian-10-hangs/202794/6 "2019-10-15T07:46:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![leprovokateur](https://avatars.discourse-cdn.com/v4/letter/l/8e8cbc/32.png) [@leprovokateur](https://discuss.elastic.co/u/leprovokateur)\
**Post date:** [November 4, 2019, 8:22am UTC](https://discuss.elastic.co/t/installation-of-elasticsearch-on-debian-10-hangs/202794/7 "2019-11-04T08:22:33Z")

</div>

It still happens in version 7.4.2.

---

<div class="post-metadata">

**Author:** ![leprovokateur](https://avatars.discourse-cdn.com/v4/letter/l/8e8cbc/32.png) [@leprovokateur](https://discuss.elastic.co/u/leprovokateur)\
**Post date:** [November 19, 2019, 8:48am UTC](https://discuss.elastic.co/t/installation-of-elasticsearch-on-debian-10-hangs/202794/8 "2019-11-19T08:48:02Z")

</div>

Is there some investigation going on?

---

<div class="post-metadata">

**Author:** ![leprovokateur](https://avatars.discourse-cdn.com/v4/letter/l/8e8cbc/32.png) [@leprovokateur](https://discuss.elastic.co/u/leprovokateur)\
**Post date:** [December 4, 2019, 1:31pm UTC](https://discuss.elastic.co/t/installation-of-elasticsearch-on-debian-10-hangs/202794/9 "2019-12-04T13:31:32Z")

</div>

It still happens with 7.5.0.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 1, 2020, 1:31pm UTC](https://discuss.elastic.co/t/installation-of-elasticsearch-on-debian-10-hangs/202794/10 "2020-01-01T13:31:37Z")

</div>

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