I’m packaging a java application “besu”.
The snap builds just fine, but after installation seems to want to update some lib and of course get a Permission Denied.
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: Failed to create temporary file for /com/sun/jna/linux-x86-64/libjnidispatch.so library: Permission denied [in thread "main"]
- It works if I install the snap with “–devmode”
- It fails if I install with “–dangerous”
This is more from the logs:
2024-07-14 13:10:45.083+02:00 | main | ERROR | LinuxOperatingSystem | Did not find Udev class from JNA. There is likely an old JNA version on the classpath.
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: 2024-07-14 13:10:45.093+02:00 | main | ERROR | Besu | Uncaught exception in thread "main"
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at oshi.jna.platform.linux.LinuxLibc.<clinit>(LinuxLibc.java:22)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at oshi.software.os.linux.LinuxOperatingSystem.<clinit>(LinuxOperatingSystem.java:98)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at oshi.hardware.platform.linux.LinuxGlobalMemory.<clinit>(LinuxGlobalMemory.java:28)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at oshi.hardware.platform.linux.LinuxHardwareAbstractionLayer.createMemory(LinuxHardwareAbstractionLayer.java:38)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at oshi.util.Memoizer$1.get(Memoizer.java:61)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at oshi.hardware.common.AbstractHardwareAbstractionLayer.getMemory(AbstractHardwareAbstractionLayer.java:60)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at org.hyperledger.besu.cli.ConfigurationOverviewBuilder.build(ConfigurationOverviewBuilder.java:389)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at org.hyperledger.besu.cli.BesuCommand.generateConfigurationOverview(BesuCommand.java:2819)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at org.hyperledger.besu.cli.BesuCommand.configure(BesuCommand.java:1828)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at org.hyperledger.besu.cli.BesuCommand.run(BesuCommand.java:1168)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at picocli.CommandLine.executeUserObject(CommandLine.java:2026)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at picocli.CommandLine.access$1500(CommandLine.java:148)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at picocli.CommandLine.execute(CommandLine.java:2170)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at org.hyperledger.besu.cli.BesuCommand.lambda$createExecuteTask$1(BesuCommand.java:1099)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at picocli.CommandLine.execute(CommandLine.java:2170)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at org.hyperledger.besu.cli.BesuCommand.lambda$createPluginRegistrationTask$2(BesuCommand.java:1109)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at picocli.CommandLine.execute(CommandLine.java:2170)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at org.hyperledger.besu.cli.util.ConfigDefaultValueProviderStrategy.execute(ConfigDefaultValueProviderStrategy.java:58)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at picocli.CommandLine.execute(CommandLine.java:2170)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at org.hyperledger.besu.cli.BesuCommand.executeCommandLine(BesuCommand.java:1136)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at org.hyperledger.besu.cli.BesuCommand.parse(BesuCommand.java:1078)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at org.hyperledger.besu.Besu.main(Besu.java:41)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: Failed to create temporary file for /com/sun/jna/linux-x86-64/libjnidispatch.so library: Permission denied [in thread "main"]
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:1055)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:1011)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at com.sun.jna.Native.<clinit>(Native.java:221)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at org.hyperledger.besu.nativelib.secp256k1.LibSecp256k1.createContext(LibSecp256k1.java:56)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at org.hyperledger.besu.nativelib.secp256k1.LibSecp256k1.<clinit>(LibSecp256k1.java:52)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at org.hyperledger.besu.crypto.SECP256K1.maybeEnableNative(SECP256K1.java:77)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at org.hyperledger.besu.crypto.SECP256K1.<init>(SECP256K1.java:62)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at org.hyperledger.besu.crypto.SignatureAlgorithmFactory.getInstance(SignatureAlgorithmFactory.java:66)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at org.hyperledger.besu.cli.subcommands.TxParseSubCommand.<clinit>(TxParseSubCommand.java:58)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at org.hyperledger.besu.cli.BesuCommand.addSubCommands(BesuCommand.java:1212)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at org.hyperledger.besu.cli.BesuCommand.initializeCommandLineSettings(BesuCommand.java:1088)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: at org.hyperledger.besu.cli.BesuCommand.parse(BesuCommand.java:1067)
2024-07-14T13:10:45+02:00 besu.besu-daemon[3826290]: ... 1 more
2024-07-14T13:10:45+02:00 systemd[1]: snap.besu.besu-daemon.service: Main process exited, code=exited, status=1/FAILURE
2024-07-14T13:10:45+02:00 systemd[1]: snap.besu.besu-daemon.service: Failed with result 'exit-code'.
2024-07-14T13:10:45+02:00 systemd[1]: snap.besu.besu-daemon.service: Consumed 13.387s CPU time.
Any take on how to get past this error?