-
Notifications
You must be signed in to change notification settings - Fork 472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libjli.so is missing for java:8-jre-alpine #77
Comments
This looks to be an issue with the alpine packaging of the jre. Could you open an issue with them? Or maybe @ncopa can look into this? $ docker run -it --rm alpine:3.3 sh
/ # apk add --no-cache openjdk8-jre
fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.3/community/x86_64/APKINDEX.tar.gz
(1/24) Installing libffi (3.2.1-r2)
(2/24) Installing libtasn1 (4.7-r1)
(3/24) Installing p11-kit (0.23.1-r1)
(4/24) Installing p11-kit-trust (0.23.1-r1)
(5/24) Installing openssl (1.0.2h-r0)
(6/24) Installing ca-certificates (20160104-r2)
(7/24) Installing java-cacerts (1.0-r0)
(8/24) Installing libxau (1.0.8-r1)
(9/24) Installing libxdmcp (1.1.2-r1)
(10/24) Installing libxcb (1.11.1-r0)
(11/24) Installing libx11 (1.6.3-r2)
(12/24) Installing libxext (1.3.3-r1)
(13/24) Installing libxi (1.7.5-r0)
(14/24) Installing libxrender (0.9.9-r1)
(15/24) Installing libxtst (1.2.2-r0)
(16/24) Installing libpng (1.6.20-r0)
(17/24) Installing freetype (2.6.2-r0)
(18/24) Installing libgcc (5.3.0-r0)
(19/24) Installing giflib (5.1.1-r0)
(20/24) Installing openjdk8-jre-lib (8.92.14-r0)
(21/24) Installing java-common (0.1-r0)
(22/24) Installing alsa-lib (1.1.0-r1)
(23/24) Installing openjdk8-jre-base (8.92.14-r0)
(24/24) Installing openjdk8-jre (8.92.14-r0)
Executing busybox-1.24.1-r7.trigger
Executing ca-certificates-20160104-r2.trigger
Executing java-common-0.1-r0.trigger
OK: 105 MiB in 35 packages
/ # java
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
The default VM is server,
because you are running on a server-class machine.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A : separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose:[class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
Warning: this feature is deprecated and will be removed
in a future release.
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
Warning: this feature is deprecated and will be removed
in a future release.
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
/ # which java
/usr/bin/java
/ # ldd /usr/bin/java
/lib/ld-musl-x86_64.so.1 (0x562c83948000)
Error loading shared library libjli.so: No such file or directory (needed by /usr/bin/java)
libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x562c83948000)
Error relocating /usr/bin/java: JLI_Launch: symbol not found
/ # ldd $(readlink -f /usr/bin/java)
/lib/ld-musl-x86_64.so.1 (0x56387d169000)
libjli.so => /usr/lib/jvm/java-1.8-openjdk/jre/bin/../lib/amd64/jli/libjli.so (0x7fc1a52a5000)
libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x56387d169000)
libz.so.1 => /lib/libz.so.1 (0x7fc1a508f000) |
it seems that we need ship It is interesting that |
fixes docker-library/openjdk#77 (cherry picked from commit 99e1859)
This should be fixed in c6c90f5 |
@yosifkit The problem still occurs on the latest
Any hints on how to fix this? |
It works:
If you manually set LD_LIBRARY_PATH, then will also
So java works, but there might be an issue with |
This worked for me when running java as root, but not as unprivileged user using Alpine 3.5.2 The reason seems to be that musl ignores both RPATH and LD_LIBRARY_PATH. The musl docu on LD_LIBRARY_PATH vaguely stats
My solution was to define all required library paths in
|
Closing since this appears solved. If someone is running into this problem still, please open a new issue with a detailed reproducing case that shows it is a problem specific to the image (not to either the Alpine packages or OpenJDK upstream directly). Thanks! |
Just move $ ldd /usr/bin/java /lib/ld-musl-x86_64.so.1 (0x7fc78c95c000) libjli.so => /lib/libjli.so (0x7fc78c54c000) libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7fc78c95c000) libz.so.1 => /lib/libz.so.1 (0x7fc78c336000) |
The solution from @echa worked perfectly for me. Thanks! |
* Add make commands for pushing images. * Slightly rewrite the Docker readme again. * Use `apk --no-cache` uniformly. * Reorder Dockerfile layers to make caching slightly nicer. * Add a makefile for the web-server Docker image to work around some weird Java+Alpine bug (docker-library/openjdk#77)
* Add make commands for pushing images. * Slightly rewrite the Docker readme again. * Use `apk --no-cache` uniformly. * Reorder Dockerfile layers to make caching slightly nicer. * Add a makefile for the web-server Docker image to work around some weird Java+Alpine bug (docker-library/openjdk#77)
* Back to official OpenJDK 8 with Alpine Linux 3.9: https://hub.docker.com/_/openjdk * Move to multi-stage Docker build: https://docs.docker.com/develop/develop-images/multistage-build/ * Add OCI labels: https://github.com/opencontainers/image-spec/blob/v1.0.1/annotations.md * Fix issue with binding privileged ports: docker-library/openjdk#77 (comment)
Hello
When i run my zookeeper some errors
The text was updated successfully, but these errors were encountered: