Kan ikke tilgå CISCO enhed via lokalt eksekveret jnlp fil (JAVA issue)

Jacques
Antal: 190
Tilmeldt:
11-01-2003
User is offline
Kan ikke tilgå CISCO enhed via lokalt eksekveret jnlp fil (JAVA issue)

Hej alle,

Jeg kan simpelthen ikke få IcedTea til at spille med en downloaded .jnlp fil på en Ubuntu 20.04 VM. Jeg får bare dette spyttet ud i masken, når jeg kører "javaws" på filen:

jacques@jacques:~/Downloads$ javaws asdm.jnlp
selected jre: /usr/lib/jvm/default-java
WARNING: package javax.jnlp not in java.desktop
Unable to use Firefox's proxy settings. Using "DIRECT" as proxy type.
selected jre: /usr/lib/jvm/default-java
WARNING: package javax.jnlp not in java.desktop
Unable to use Firefox's proxy settings. Using "DIRECT" as proxy type.
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.)
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:822)
at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:531)
at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:945)
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:2481)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.setSecurity(JNLPClassLoader.java:385)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:806)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.<init>(JNLPClassLoader.java:338)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.createInstance(JNLPClassLoader.java:421)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:495)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:468)
at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:814)
... 2 more

Hvordan i alverden skærer jeg igennem dette problem så det "bare virker"?


ejvindh
Antal: 168
Tilmeldt:
17-05-2010
User is offline
Det ser ud til, at den slår

Det ser ud til, at den slår sig på at jar-filen ikke er signeret (eller i hvert fald signeret med MD5). Jeg kan se, at andre har haft et lignende problem, og en løsning er foreslået her:

https://techblog.jeppson.org/2018/01/fix-icedtea-c...

Muligvis kan det også fixes, hvis du skifter over til Sun's java-motor. Men det er jo ikke sikkert du har lyst til det :)


Jacques
Antal: 190
Tilmeldt:
11-01-2003
User is offline
Tak, men jeg har allerede

Tak, men jeg har allerede prøvet det på linket foreslåede.


ejvindh
Antal: 168
Tilmeldt:
17-05-2010
User is offline
Har du også prøvet det

Har du også prøvet det andet trick, jeg foreslog?


sunlock.dk
sunlock.dk's picture
Antal: 311
Tilmeldt:
26-08-2003
User is offline
Hvad med denne (skipper dog

Hvad med denne (skipper dog alt sikkerhed):

javaws -nosecurity asdm.jnlp


Jacques
Antal: 190
Tilmeldt:
11-01-2003
User is offline
Har ikke specielt meget lyst

Har ikke specielt meget lyst til at rode med Sun's java. Det burde virke med OpenJDK 11:

jacques@jacques:~/Desktop$ java -version
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)
jacques@jacques:~/Desktop$

Har nu skite til OenWebStart som jeg ikke anede eksisterede, men det spiller heller ikke. Prøvede "javaws -nosecurity asdm.jnlp" som foreslået af sunlock.dk, men der hænger OpenWebStart splash screen'en bare nogle minutter og så pludselig en: "Could not parse .jnlp file..." error besked.

Da jeg installerede OpenWebstart fik jeg heller ikke pkt 3 her:

https://openwebstart.com/docs/OWSGuide.html#_linux

Jeg får kun:

jacques@jacques:~/Downloads$ sudo dpkg -i OpenWebStart_linux_1_4_0.deb
(Reading database ... 191993 files and directories currently installed.)
Preparing to unpack OpenWebStart_linux_1_4_0.deb ...
Unpacking openwebstart (1.4.0) over (1.4.0) ...
Setting up openwebstart (1.4.0) ...
jacques@jacques:~/Downloads$

- og så intet efter.

Dette burde i dén grad kunne virke, da pakken decideret er lavet til Ubuntu 18.04 og over:

https://openwebstart.com/download/

Hvad er der galt her? Den samme .jnlp fil giver mig fint adgang på en Windows10.


Jacques
Antal: 190
Tilmeldt:
11-01-2003
User is offline
Kigger man på dette, ser

Kigger man på dette, ser det ud til at den forsøger sig med java 1.8:

jacques@jacques:~/Desktop$ cd ../Downloads; sudo javaws -nosecurity asdm.jnlp
[sudo] password for jacques:
[ITW-CORE][2021-10-22 15:14:22.256 CEST][INFO ][com.openwebstart.launcher.OpenWebStartLauncher] OWS main args [-nosecurity, asdm.jnlp].
[ITW-CORE][2021-10-22 15:14:22.333 CEST][INFO ][com.openwebstart.launcher.PhaseTwoWebStartLauncher] Starting OpenWebStart 1.4.0
[ITW-CORE][2021-10-22 15:14:22.370 CEST][INFO ][net.sourceforge.jnlp.config.DeploymentConfiguration] Ico provider registered correctly.
[ITW-CORE][2021-10-22 15:14:22.402 CEST][INFO ][net.sourceforge.jnlp.config.DeploymentConfiguration] Ico provider registered correctly.
[ITW-CORE][2021-10-22 15:14:22.405 CEST][INFO ][net.sourceforge.jnlp.config.DeploymentConfiguration] Loading USER level properties from: file:/root/.config/icedtea-web/deployment.properties
[ITW-CORE][2021-10-22 15:14:22.470 CEST][INFO ][net.sourceforge.jnlp.config.DeploymentConfiguration] Loading USER level properties from: file:/root/.config/icedtea-web/deployment.properties
[ITW-CORE][2021-10-22 15:14:22.516 CEST][INFO ][net.sourceforge.jnlp.config.DeploymentConfiguration] Saving properties into /root/.config/icedtea-web/deployment.properties
[ITW-CORE][2021-10-22 15:14:22.539 CEST][INFO ][net.sourceforge.jnlp.config.DeploymentConfiguration] Loading USER level properties from: file:/root/.config/icedtea-web/deployment.properties
[ITW-CORE][2021-10-22 15:14:22.650 CEST][INFO ][com.openwebstart.launcher.PhaseTwoWebStartLauncher] Calling ITW Boot with args [-nosecurity, asdm.jnlp].
[ITW-CORE][2021-10-22 15:14:22.655 CEST][INFO ][net.sourceforge.jnlp.runtime.EnvironmentPrinter] OpenWebStartLauncher called with args: [-nosecurity, asdm.jnlp].
[ITW-CORE][2021-10-22 15:14:22.655 CEST][INFO ][net.sourceforge.jnlp.runtime.EnvironmentPrinter] OS: Linux
[ITW-CORE][2021-10-22 15:14:22.655 CEST][INFO ][net.sourceforge.jnlp.runtime.EnvironmentPrinter] Java Runtime AdoptOpenJDK-1.8.0_292
[ITW-CORE][2021-10-22 15:14:22.963 CEST][INFO ][net.sourceforge.jnlp.runtime.Boot] Proceeding with jnlp
[ITW-CORE][2021-10-22 15:14:22.966 CEST][INFO ][net.sourceforge.jnlp.runtime.Boot] JNLP file location: asdm.jnlp
[ITW-CORE][2021-10-22 15:14:22.998 CEST][INFO ][net.adoptopenjdk.icedteaweb.xmlparser.MalformedXMLParser] Using MalformedXMLParser
[ITW-CORE][2021-10-22 15:14:23.262 CEST][INFO ][net.sourceforge.jnlp.Parser] Homepage: http://www.cisco.com/go/asdm
[ITW-CORE][2021-10-22 15:14:23.263 CEST][INFO ][net.sourceforge.jnlp.Parser] Description: ASDM on 194.182.2.244:4443
[ITW-CORE][2021-10-22 15:14:23.264 CEST][INFO ][net.sourceforge.jnlp.JNLPFile] Acceptable vendor tag found, contains: Cisco Systems, Inc.
[ITW-CORE][2021-10-22 15:14:23.268 CEST][INFO ][net.sourceforge.jnlp.Parser] good - your JRE - 1.8.0_292 - match requested JRE - 1.6+
[ITW-CORE][2021-10-22 15:14:23.302 CEST][INFO ][net.adoptopenjdk.icedteaweb.resources.cache.LeastRecentlyUsedCache] isCached: https://194.182.2.244:4443/admin/public/asdm.jnlp - (v: null) = false

- men jeg har altså valgt java 11 som den aktive installation:

jacques@jacques:~/Downloads$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                         Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java   1111      auto mode
  1            /opt/jdk/jdk1.8.0_301/bin/java                100       manual mode
* 2            /usr/lib/jvm/java-11-openjdk-amd64/bin/java   1111      manual mode

Press <enter> to keep the current choice[*], or type selection number:


Jacques
Antal: 190
Tilmeldt:
11-01-2003
User is offline
En smule fremskridt. Jeg

En smule fremskridt. Jeg går ud og henter en anden .jnlp fil der bruges i andet regi.

Efter filen er kommet ned eksekverer jeg igen med: "javaws -nosecurity asdm.jnlp" men får nu beskeden "could not launch .jnlp file. The application has not been initialized ..."

Why?

Det stinker virkelig at rode med, det her :-( Og det er det sidste jeg har tilbage for at kunne ditche Windows helt. Røvirriterende!


Jacques
Antal: 190
Tilmeldt:
11-01-2003
User is offline

Jacques
Antal: 190
Tilmeldt:
11-01-2003
User is offline
Til andre der måtte rende

Til andre der måtte rende ind i dette:

https://www.youtube.com/watch?v=bZ3lYJo3zk0