AdoptOpenJDK / IcedTea-Web

The new home for IcedTea-Web
Other
223 stars 85 forks source link

Fatal: Initialization Error (unsigned jars?) #915

Closed CocolinoFan closed 1 year ago

CocolinoFan commented 1 year ago

OS: Gentoo Linux x86_64 Kernel: 6.3.9-gentoo-dist icedtea version: icedtea-web-1.8.8-r1::gentoo

Issues staring Dell's Remote Console. I think it might be related to the SSL certificate on the server (I am using the default one). The main takeaway from the error messages I took is the there wore some "jars" that needed to be signed?

After opening a .jnlp file to connect to the iDrac6 console: Fatal: Initialization Error: Could not initialize application. The application has not been initialized, for more information execute javaws for the command line.

Details:

net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize application. The application has not been initialized, for more information execute javaws from the command line. at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:823) at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:531) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:946) Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Cannot grant permissions to unsigned jars. Application requested security permissions, but jars are not signed. at net.sourceforge.jnlp.runtime.JNLPClassLoader$SecurityDelegateImpl.getClassLoaderSecurity(JNLPClassLoader.java:2488) at net.sourceforge.jnlp.runtime.JNLPClassLoader.setSecurity(JNLPClassLoader.java:384) at net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:807) at net.sourceforge.jnlp.runtime.JNLPClassLoader.(JNLPClassLoader.java:337) at net.sourceforge.jnlp.runtime.JNLPClassLoader.createInstance(JNLPClassLoader.java:420) at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:494) at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:467) at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:815) ... 2 more

The beginning of the console:

System logger called with result of 0 System logger called with result of 0 System logger called with result of 0 System logger called with result of 0 System logger called with result of 0 System logger called with result of 0 System logger called with result of 0 System logger called with result of 0 System logger called with result of 0 net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize application. The application has not been initialized, for more information execute javaws from the command line.      at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:823)      at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:531)      at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:946) Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Cannot grant permissions to unsigned jars. Application requested security permissions, but jars are not signed.     at net.sourceforge.jnlp.runtime.JNLPClassLoader$SecurityDelegateImpl.getClassLoaderSecurity(JNLPClassLoader.java:2488)     at net.sourceforge.jnlp.runtime.JNLPClassLoader.setSecurity(JNLPClassLoader.java:384)     at net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:807)    at net.sourceforge.jnlp.runtime.JNLPClassLoader.(JNLPClassLoader.java:337)    at net.sourceforge.jnlp.runtime.JNLPClassLoader.createInstance(JNLPClassLoader.java:420)     at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:494)     at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:467)     at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:815)      ... 2 more net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize application. The application has not been initialized, for more information execute javaws from the command line.     at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:823)     at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:531)     at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:946) Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Cannot grant permissions to unsigned jars. Application requested security permissions, but jars are not signed.      at net.sourceforge.jnlp.runtime.JNLPClassLoader$SecurityDelegateImpl.getClassLoaderSecurity(JNLPClassLoader.java:2488)     at net.sourceforge.jnlp.runtime.JNLPClassLoader.setSecurity(JNLPClassLoader.java:384)     at net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:807)     at net.sourceforge.jnlp.runtime.JNLPClassLoader.(JNLPClassLoader.java:337)     at net.sourceforge.jnlp.runtime.JNLPClassLoader.createInstance(JNLPClassLoader.java:420)     at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:494)     at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:467)     at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:815)     ... 2 more netx: Initialization Error: Could not initialize application. (Fatal: Application Error: Cannot grant permissions to unsigned jars. Application requested security permissions, but jars are not signed.) App already has trusted publisher: false Jar found at /home/cocolino/.cache/icedtea-web/cache/2/https/192.168.0.120/443/software/avctVMLinux64.jarhas been verified as UNSIGNED Jar found at /home/cocolino/.cache/icedtea-web/cache/3/https/192.168.0.120/443/software/avctKVMIOLinux64.jarhas been verified as UNSIGNED Jar found at /home/cocolino/.cache/icedtea-web/cache/1/https/192.168.0.120/443/software/avctKVM.jarhas been verified as UNSIGNED Removed sun.net.www.protocol.https.DelegateHttpsURLConnection:https://192.168.0.120:443/software/avctVMLinux64.jar Disconnecting sun.net.www.protocol.https.DelegateHttpsURLConnection:https://192.168.0.120:443/software/avctVMLinux64.jar isCurrent: https://192.168.0.120:443/software/avctVMLinux64.jar = true isCurrent:lastModified cache:1545304473000 actual:1545304473000 isCurrent:isCached true isCached: remote:135203 cached:135203 done https://192.168.0.120:443/software/avctVMLinux64.jar Adding sun.net.www.protocol.https.DelegateHttpsURLConnection:https://192.168.0.120:443/software/avctVMLinux64.jar Connecting https://192.168.0.120:443/software/avctVMLinux64.jar Removed sun.net.www.protocol.https.DelegateHttpsURLConnection:https://192.168.0.120:443/software/avctKVMIOLinux64.jar Disconnecting sun.net.www.protocol.https.DelegateHttpsURLConnection:https://192.168.0.120:443/software/avctKVMIOLinux64.jar isCurrent: https://192.168.0.120:443/software/avctKVMIOLinux64.jar = true isCurrent:lastModified cache:1545304473000 actual:1545304473000 isCurrent:isCached true isCached: remote:983672 cached:983672 best url for location=https://192.168.0.120:443/software/avctVMLinux64.jar state=PRECONNECT CONNECTING PREDOWNLOAD PROCESSING is https://192.168.0.120:443/software/avctVMLinux64.jar by HEAD done https://192.168.0.120:443/software/avctKVMIOLinux64.jar Adding sun.net.www.protocol.https.DelegateHttpsURLConnection:https://192.168.0.120:443/software/avctKVMIOLinux64.jar Connecting https://192.168.0.120:443/software/avctKVMIOLinux64.jar Removed sun.net.www.protocol.https.DelegateHttpsURLConnection:https://192.168.0.120:443/software/avctVMLinux64.jar best url for location=https://192.168.0.120:443/software/avctKVMIOLinux64.jar state=PRECONNECT CONNECTING PREDOWNLOAD PROCESSING is https://192.168.0.120:443/software/avctKVMIOLinux64.jar by HEAD

CocolinoFan commented 1 year ago

Solution for Gentoo: (https://www.dell.com/community/PowerEdge-Hardware-General/iDRAC6-Express-Virtual-Console-not-running/td-p/5087306) Edit the file java.security in my case it was located in: /opt/openjdk-bin-17.0.6_p10/conf/security/java.security You might have multiple java.security files, I edited all of them until I found the correct one. Comment out the lines:

jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & usage TLSServer, \
    RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224, \
    SHA1 usage SignedJAR & denyAfter 2019-01-01

jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, \
      DSA keySize < 1024, SHA1 denyAfter 2019-01-01

jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA, \
    DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL

Save your changes and lunch the .jnlp file sent from your iDrac.

P.S. Big thanks to the chads in Gentoo IRC. (epenguin)

CocolinoFan commented 2 months ago

lol one year later I was looking for the same problem. Thank you for the answer past CocolinoFan.

I can confirm that this solution works on Ubuntu 24.04 as well. The files you need to edit are:

/etc/java-8-openjdk/security/java.security
/etc/java-21-openjdk/security/java.security

P.S. Also, you might find that even tho you can see the virtual console now, the keyboard does not work. ->Open the program called IcedTea Web Control Panel ->Debugging -> Enable debugging -> Enable logging to file -> Take note where the logs are saved ->Look in the log file. If you find something similar to this idrac Exception in thread "AWT-EventQueue-1" java.lang.NoSuchMethodError: 'java.awt.peer.ComponentPeer java.awt.Window.getPeer()' (By the way I don't think that's the main error but, that's what I googled to find the solution) I found a way to fix it using this: https://andreaskaris.github.io/blog/linux/java-idrac-issues/ or this https://minimonk-net.translate.goog/10111?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-GB ->In terminal run sudo find / -name "*jre*" ->IcedTea Web Control Panel -> JVM Settings -> Set JVM for IcedTea-Web - working best with OpenJDK -> Try every file from the previous search till you find one that works. You will know is a good file because the text will turn green. In my case it was /usr/lib/jvm/java-8-openjdk-amd64/jre