Skip to content
This repository has been archived by the owner on Jan 21, 2023. It is now read-only.

7.3 image does not work with overlay2 driver #28

Open
alexandru-2016 opened this issue Mar 3, 2020 · 3 comments
Open

7.3 image does not work with overlay2 driver #28

alexandru-2016 opened this issue Mar 3, 2020 · 3 comments

Comments

@alexandru-2016
Copy link

Hello,

There seems to be a bug in java, which causes this error when running on overlay2 docker driver

[2020-03-03T09:49:24,727][ERROR][org.elasticsearch.bootstrap.Bootstrap] Exception
java.lang.IllegalStateException: failed to obtain node locks, tried [[/usr/share/elasticsearch/data]] with lock id [0]; maybe these locations are not writable or multip
at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:299) ~[elasticsearch-7.3.2.jar:7.3.2]
.....
Caused by: java.io.IOException: failed to obtain lock on /usr/share/elasticsearch/data/nodes/0
at org.elasticsearch.env.NodeEnvironment$NodeLock.(NodeEnvironment.java:221) ~[elasticsearch-7.3.2.jar:7.3.2]
at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:269) ~[elasticsearch-7.3.2.jar:7.3.2]
... 12 more
Caused by: java.io.IOException: Mount point not found
at sun.nio.fs.LinuxFileStore.findMountEntry(LinuxFileStore.java:105) ~[?:?]

Seems to be discussed here:
https://stackoverflow.com/questions/41022393/mount-point-not-found
https://bugs.openjdk.java.net/browse/JDK-8165852

@alexandru-2016
Copy link
Author

Similar issue is also discussed here:
pires/kubernetes-elasticsearch-cluster#89

Maybe the version of Java used in this image doesn't include the fix for this bug

@alexandru-2016
Copy link
Author

alpine 3.11 doesn't have the fix either

I was able to workaround using java 8, and changed the Dockerfile like this

-RUN apk add --no-cache openjdk11-jre-headless su-exec
+RUN apk add --no-cache openjdk8-jre su-exec

I do get this warning now, but I can live with it

future versions of Elasticsearch will require Java 11; your Java version from [/usr/lib/jvm/java-1.8-openjdk/jre] does not meet this requirement

Also, as a bonus, the image size decreased an extra 90 MB, and is 197MB now

@blacktop
Copy link
Owner

Thank you for doing this research! Hopefully alpine 3.11 or 3.12's java will fix this? I'll pin this for now, as I am not sure it is better to use old Java to support overlay2 or to wait for better Java 11.

@blacktop blacktop pinned this issue Mar 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants