Skip to content
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

Improve error reporting when the tmp dir has the noexec flag #193

Closed
gnodet opened this issue Jan 26, 2021 · 1 comment · May be fixed by gnodet/jansi#1
Closed

Improve error reporting when the tmp dir has the noexec flag #193

gnodet opened this issue Jan 26, 2021 · 1 comment · May be fixed by gnodet/jansi#1
Milestone

Comments

@gnodet
Copy link
Member

gnodet commented Jan 26, 2021

See apache/maven-mvnd#341 (comment)
The Jansi 1.x messages were more helpful, see https://issues.apache.org/jira/browse/KARAF-4690

@gnodet
Copy link
Member Author

gnodet commented Feb 11, 2021

When running with a noexec /tmp dir:

➜  jansi git:(master) docker run -ti --tmpfs /tmp:rw,noexec,nosuid,size=2g --mount type=bind,source="$(pwd)",target=/app adoptopenjdk/openjdk11 java -jar /app/target/jansi-2.2.1-SNAPSHOT.jar
Jansi 2.2.1-SNAPSHOT

library.jansi.path= 
library.jansi.version= 
Failed to load native library:jansi-2.2.1-acca4c630d6ba382-libjansi.so. osinfo: Linux/x86_64
java.lang.UnsatisfiedLinkError: /tmp/jansi-2.2.1-acca4c630d6ba382-libjansi.so: /tmp/jansi-2.2.1-acca4c630d6ba382-libjansi.so: failed to map segment from shared object
Exception in thread "main" java.lang.RuntimeException: Unable to load jansi native library
	at org.fusesource.jansi.internal.JansiLoader.initialize(JansiLoader.java:62)
	at org.fusesource.jansi.AnsiMain.main(AnsiMain.java:60)
Caused by: java.lang.Exception: No native library found for os.name=Linux, os.arch=x86_64, paths=[/org/fusesource/jansi/internal/native/Linux/x86_64:/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib]
	at org.fusesource.jansi.internal.JansiLoader.loadJansiNativeLibrary(JansiLoader.java:333)
	at org.fusesource.jansi.internal.JansiLoader.initialize(JansiLoader.java:60)
	... 1 more
➜  jansi git:(master) 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant