karakun / OpenWebStart

Run Web Start based applications after the release of Java 11
https://openwebstart.com
Other
420 stars 48 forks source link

JVM deleted right after download and no JVM found for application #285

Closed barthel closed 4 years ago

barthel commented 4 years ago

I'm using OpenWebStart 1.1.8 in a managed Windows 10 remote desktop environment with system proxy.

After a fresh installation of OpenWebStart, the JVM (provided by the JNLP file) will downloaded and extracted into the .cahe\icedtea-web\jvm-cache\ directory.

The .cache and the .config directories where created by OpenWebStart.

But this JVM could not transfer because of the following exception:

itw-javantx-2020-06-26_13_26_51.571.log:

[...]
[MESSAGE_DEBUG][Fri Jun 26 13:27:14 CEST 2020] Deleting: C:\Users\barthel\.cache\icedtea-web\jvm-cache\amazon_1.8.242.08.1\ASSEMBLY_EXCEPTION
[WARNING_ALL][Fri Jun 26 13:27:14 CEST 2020]
Fehler beim Herunterladen von 1.8* (Url=https://xxxxxxxxxxxxxxxxxxxx:443/xxxxxxxxxx/jvms.json)
java.lang.RuntimeException: Cannot install needed runtime
    at com.openwebstart.jvm.JavaRuntimeSelector.installRemoteRuntime(JavaRuntimeSelector.java:119)
    at com.openwebstart.jvm.JavaRuntimeSelector.lambda$getJavaRuntime$3(JavaRuntimeSelector.java:64)
    at java.util.Optional.map(Optional.java:215)
    at com.openwebstart.jvm.JavaRuntimeSelector.getJavaRuntime(JavaRuntimeSelector.java:64)
    at com.openwebstart.launcher.OwsJvmLauncher.getJavaRuntime(OwsJvmLauncher.java:87)
    at com.openwebstart.launcher.OwsJvmLauncher.getLocalJavaRuntimeOrExit(OwsJvmLauncher.java:67)
    at com.openwebstart.launcher.OwsJvmLauncher.launchExternal(OwsJvmLauncher.java:120)
    at com.openwebstart.launcher.OwsJvmLauncher.launchExternal(OwsJvmLauncher.java:63)
    at net.sourceforge.jnlp.Launcher.launchExternal(Launcher.java:284)
    at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:365)
    at net.sourceforge.jnlp.Launcher.access$200(Launcher.java:69)
    at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:651)
Caused by: java.io.IOException: Error in runtime download
    at com.openwebstart.jvm.LocalRuntimeManager.install(LocalRuntimeManager.java:356)
    at com.openwebstart.jvm.JavaRuntimeSelector.installRemoteRuntime(JavaRuntimeSelector.java:117)
    ... 11 more
Caused by: java.lang.RuntimeException: Error in moving file C:\Users\barthel\.cache\icedtea-web\jvm-cache\amazon_1.8.242.08.1\296818b2-74da-4397-b83b-d32e2134c5c5\bin to C:\Users\barthel\.cache\icedtea-web\jvm-cache\amazon_1.8.242.08.1
    at com.openwebstart.util.ExtractUtil.moveToDirAndReplace(ExtractUtil.java:106)
    at com.openwebstart.util.ExtractUtil.lambda$null$0(ExtractUtil.java:89)
    at java.util.Arrays$ArrayList.forEach(Arrays.java:3880)
    at com.openwebstart.util.ExtractUtil.lambda$moveJavaHomeToTarget$1(ExtractUtil.java:89)
    at java.util.Optional.ifPresent(Optional.java:159)
    at com.openwebstart.util.ExtractUtil.moveJavaHomeToTarget(ExtractUtil.java:89)
    at com.openwebstart.util.ExtractUtil.extract(ExtractUtil.java:70)
    at com.openwebstart.util.ExtractUtil.unZip(ExtractUtil.java:36)
    at com.openwebstart.jvm.LocalRuntimeManager.install(LocalRuntimeManager.java:343)
    ... 12 more
Caused by: java.nio.file.AccessDeniedException: C:\Users\barthel\.cache\icedtea-web\jvm-cache\amazon_1.8.242.08.1\296818b2-74da-4397-b83b-d32e2134c5c5\bin -> C:\Users\barthel\.cache\icedtea-web\jvm-cache\amazon_1.8.242.08.1\bin
    at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
    at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
    at sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:387)
    at sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:287)
    at java.nio.file.Files.move(Files.java:1395)
    at com.openwebstart.util.ExtractUtil.moveToDirAndReplace(ExtractUtil.java:104)
    ... 20 more
[ERROR_ALL][Fri Jun 26 13:27:14 CEST 2020]
Error-Dialog message: Es konnte keine passende JVM zum Ausführen der Anwendung gefunden werden.
java.lang.IllegalStateException: could not find any suitable runtime
    at com.openwebstart.launcher.OwsJvmLauncher.getLocalJavaRuntimeOrExit(OwsJvmLauncher.java:69)
    at com.openwebstart.launcher.OwsJvmLauncher.launchExternal(OwsJvmLauncher.java:120)
    at com.openwebstart.launcher.OwsJvmLauncher.launchExternal(OwsJvmLauncher.java:63)
    at net.sourceforge.jnlp.Launcher.launchExternal(Launcher.java:284)
    at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:365)
    at net.sourceforge.jnlp.Launcher.access$200(Launcher.java:69)
    at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:651)
[MESSAGE_DEBUG][Fri Jun 26 13:27:31 CEST 2020] Release shared lock on C:\Users\barthel\AppData\Local\Temp\barthel\netx\locks\netx_running
[MESSAGE_ALL][Fri Jun 26 13:27:31 CEST 2020] No other instances of javaws are running
[ERROR_ALL][Fri Jun 26 13:27:31 CEST 2020] Cannot clear the cache as there exists no such directory C:\Users\barthel\.cache\icedtea-web\cache

OpenWebStart-Console:

Error-Dialog message: Es konnte keine passende JVM zum Ausführen der Anwendung gefunden werden.
Fehler beim Herunterladen von 1.8* (Url=https://xxxxxxxxxxxx:443/xxxxxxxx/jvms.json)
Deleting: C:\Users\barthel\.cache\icedtea-web\jvm-cache\amazon_1.8.242.08.1\ASSEMBLY_EXCEPTION
[...]
Deleting: C:\Users\barthel\.cache\icedtea-web\jvm-cache\amazon_1.8.242.08.1\243ec310-df9d-4983-bc9a-8e52c45f6150
Deleting: C:\Users\barthel\.cache\icedtea-web\jvm-cache\amazon_1.8.242.08.1
Download of size 48298670 done
Cannot delete file C:\Users\barthel\.cache\icedtea-web\jvm-cache\amazon_1.8.242.08.1\243ec310-df9d-4983-bc9a-8e52c45f6150
Remote runtime is distributed as ZIP. Will extract it
Magic bytes detection read: [ 0x50 0x4B 0x03 0x04 0x14 ]
Downloaded of size 48298670 started
Trying to download and extract runtime JavaRuntime{version=1.8.242.08.1, vendor=Amazon.com Inc., operationSystem=WIN64}
PAC Proxies found for 'https://tacose-development.app.corpintra.net/taco.se.jres/amazon-corretto-8.242.08.1-windows-x64-jre.zip' : [HTTP @ sedciprx30-p010.de050.corpintra.net/53.190.253.214:3128, HTTP @ sedciprx31-p010.de050.corpintra.net/53.190.253.215:3128, HTTP @ sedciprx32-p010.de050.corpintra.net/53.190.253.216:3128]
PAC result for url 'https://xxxxxxxxxxxx/xxxxxxxx/amazon-corretto-8.242.08.1-windows-x64-jre.zip' -> 'PROXY sedciprx30-p010.de050.corpintra.net:3128; PROXY sedciprx31-p010.de050.corpintra.net:3128; PROXY sedciprx32-p010.de050.corpintra.net:3128'
Runtime will be installed in C:\Users\barthel\.cache\icedtea-web\jvm-cache\amazon_1.8.242.08.1
Installing remote runtime JavaRuntime{version=1.8.242.08.1, vendor=Amazon.com Inc., operationSystem=WIN64} on local cache
Remote Runtime found. Will install it to local cache
[...]
sclassen commented 4 years ago
Caused by: java.nio.file.AccessDeniedException: 
    C:\Users\barthel\.cache\icedtea-web\jvm-cache\amazon_1.8.242.08.1\296818b2-74da-4397-b83b-d32e2134c5c5\bin ->
    C:\Users\barthel\.cache\icedtea-web\jvm-cache\amazon_1.8.242.08.1\bin

The message says it failed to move the bin folder form the temporary dir (296818b2-74da-4397-b83b-d32e2134c5c5) Can you double check the permissions in the folder C:\Users\barthel\.cache\icedtea-web

barthel commented 4 years ago

I have checked the permissions several times.

I even completely deleted the folders again and OpenWebStart created them itself. I tried creating and moving the folders manually with this user and got no error message.

barthel commented 4 years ago

I know this is not a good error message. Unfortunately, I can't provide more information or look deeper into the system at this point.

The folder permissions look like they do on my local Windows VM.

Unfortunately, I cannot exclude the possibility that the administrators of the remote Windows have hidden permissions.

sclassen commented 4 years ago

Can you send a short message to openwebstart@karakun.com mentioning this issue. We have a small diagnostic tool to analyze file system permission problems

barthel commented 4 years ago

Screenshot 2020-06-26 at 15 30 24 Screenshot 2020-06-26 at 15 30 50-1

Looks ok for me.

sclassen commented 4 years ago

Yes looks good so far. Hard to tell why the initial unpacking is working but the moving to another subdir is failing

sclassen commented 4 years ago

Can you give the folder and file structure of your jvm zip archive. I am still puzzled on what can go wrong here...

barthel commented 4 years ago

The JVM ZIP is a repacked (because of #208 ) Amazon Corretto Win64 8.242.08. This JVM was repacked with macOS and works with OWS 1.1.4 but not with OWS 1.1.7 and 1.1.8.

After a re-zip with Windows 10 of the previously repacked ZIP file, it works fine with OWS 1.1.7 and 1.1.8.