Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Unable to start alpine based docker images #5609

Unanswered
akhilesh-delphix asked this question in Q&A
Discussion options

I have a alpine based docker image which is getting deployed as Pod in K8s deployment. It deploys well for all customers except one.
It just has only one line in log file.
Error: An unexpected error occurred while trying to open file app.jar

however when i run entry point with -Xdiag (java -jar -Xdiag app.jar), i get detailed log

java.nio.file.FileSystemException: unload-service.jar: Function not implemented
 at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
 at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
 at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
 at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
 at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:148)
 at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
 at java.base/java.nio.file.Files.readAttributes(Files.java:1851)
 at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1432)
 at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:717)
 at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:251)
 at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:180)
 at java.base/java.util.jar.JarFile.<init>(JarFile.java:346)
 at java.base/java.util.jar.JarFile.<init>(JarFile.java:317)
 at java.base/java.util.jar.JarFile.<init>(JarFile.java:256)
 at java.base/sun.launcher.LauncherHelper.getMainClassFromJar(LauncherHelper.java:561)
 at java.base/sun.launcher.LauncherHelper.loadMainClass(LauncherHelper.java:787)
 at java.base/sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:695)

The above error seems little generic and do not give us pointers what is missing.

We have checked a few things , like app.jar is available at the location and is user has permissions to run it. the JDK version (openjdk version "17.0.12" 2024年07月16日, which is inline with other images). Tried running java -jar -Xdiag -verbose app.jar

Any sugestions here will be helpful

You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

I don't have a clear-cut answer to this, but perhaps some pointers;

Function not implemented is the text-representation used by Golang for an ENOSYS error. It's hard to tell exactly what's causing it, but it could be;

  • the container trying to make a syscall that's not supported by the host; this can happen if the container is running with a more recent "user land" than the host. In many codebases, and ENOSYS may trigger it to fallback to an alternative syscall, but that's not always the case (in some cases this can be caused by the seccomp profile used)
  • another possible cause (given that I see extracting an archive is involved), is if the extracted archive contains extended-attributes (xattrs), and the container filesystem doesn't support extended attributes, or it's trying to set an extended attribute that's not supported by the platform (we've had some cases where, e.g., macOS-specific extended attributes were included in an archive, and trying to set those on a Linux platform would make Linux refuse to set them).
You must be logged in to vote
1 reply
Comment options

Containers are running in K8s cluster (kubectl version 1.30).

container is running with a more recent "user land" than the host

Are you trying to suggest that host kernel is very old which may have compatibility issue with container OS.

I see similar regression bug reported with openJDK (17.0.11), but its not exactly same (this issue is also observed while reading extended-attribute). With our images we are using openJDK17.0.12.

https://bugs.openjdk.org/browse/JDK-8337966 (Operation not permitted instead of Function not implemented )

This above bug is regression introduced
https://bugs.openjdk.org/browse/JDK-8316304

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /