Jars are downloaded several times during application running (and it fails)

The public knowledge pool and discussion forum of the OWS community. Do not post confidential information here!
bfolleas
Posts: 10
Joined: 16 Mar 2023, 18:35

Jars are downloaded several times during application running (and it fails)

Post by bfolleas »

Hello,

My JWS application is hosted on AWS public Cloud (it’s AWS but could be another one), for example : https://myapp.com/
The codebase of the application in jnlp is https://myapp.com/

When I run OWS, it downloads all jars, starts the application, but when I navigate into my app it tries to download jars, and my app fails.
I checked in the cache, and into the logs: the jars are correctly downloaded before starting the application. I don’t know why there is an additional download.
I suspected that the OWS cache reference jars by IP and not by dns name, because the DNS resolution of https://myapp.com/ could return several IPs.
So I did a test by replacing the codebase of my app with an IP instead of DNS name, ex : https://50.50.20.12/
Then, the application runs correctly, and in the logs I can see that the jars are no longer downloaded.

Do you think that my problem is due to DNS resolution ?

Thanks for your help

Regards

Janak Mulani
Posts: 725
Joined: 24 Mar 2020, 13:37

Re: Jars are downloaded several times during application running (and it fails)

Post by Janak Mulani »

You say the jars are downloaded and the application is started successfully but after that jars are downloaded again?

Can you please send the logs? What does your C:\Users\Janak\.cache\icedtea-web\cache\recently_used.cache look like?

Is your application using JNLP API like DownloadService?

bfolleas
Posts: 10
Joined: 16 Mar 2023, 18:35

Re: Jars are downloaded several times during application running (and it fails)

Post by bfolleas »

Hello,

Here's the logs and the recently_used.cache.
We don't use JNLP API like DownloadService.
Sometimes the app can't start due to a missing ressource in a jar OWS tries to download...but it has it in his cache.

Regards.
Attachments
recently_used.cache.log
(10.37 KiB) Downloaded 845 times
2023-04-05_10_55_53.833-ows-stage2.log
(1.03 MiB) Downloaded 807 times
2023-04-05_10_55_53.833-ows-stage1.log
(27.01 KiB) Downloaded 782 times

bfolleas
Posts: 10
Joined: 16 Mar 2023, 18:35

Re: Jars are downloaded several times during application running (and it fails)

Post by bfolleas »

Hello,

any update on my issue ?

Janak Mulani
Posts: 725
Joined: 24 Mar 2020, 13:37

Re: Jars are downloaded several times during application running (and it fails)

Post by Janak Mulani »

can you please try with the latest release 1.8.0? Please clean cache, run the app once, the run the app again and send logs from bo the runs. Please set log level to debug and also log contents of jnlp.

bfolleas
Posts: 10
Joined: 16 Mar 2023, 18:35

Re: Jars are downloaded several times during application running (and it fails)

Post by bfolleas »

Hello Janak,

here's the logs for the 2 runs.
First run failed quickly...the second one failed 1 minute later...you see exception stack traces when application fails.

Thanks.
Attachments
OWS.7z
(42.43 KiB) Downloaded 876 times

Janak Mulani
Posts: 725
Joined: 24 Mar 2020, 13:37

Re: Jars are downloaded several times during application running (and it fails)

Post by Janak Mulani »

The logs for run1 were missing in the zip file.

>
When I run OWS, it downloads all jars, starts the application, but when I navigate into my app it tries to download jars, and my app fails.
I checked in the cache, and into the logs: the jars are correctly downloaded before starting the application. I don’t know why there is an additional download.
>

For the run2, in stage2 logs: OWS is starting the app but during runtime there are NoClassDefFound exceptions for some jidesoft classes as while downloading jide-properties.jar there seems to have been a java.util.zip.ZipException: zip END header not found. It needs to be investigated why it is trying to download this.

>
I suspected that the OWS cache reference jars by IP and not by dns name, because the DNS resolution of https://myapp.com/ could return several IPs.
So I did a test by replacing the codebase of my app with an IP instead of DNS name, ex : https://50.50.20.12/
Then, the application runs correctly, and in the logs I can see that the jars are no longer downloaded.
>
In 1.8.0 we fixed caching to use the string version of the url. So are the jars still downloaded multiple times?

You say that your app works when you specify URLs with IP addresses in the jnlp file instead of URLs with DNS names. Did you try this with OWS 1.8.0? Did it work?

bfolleas
Posts: 10
Joined: 16 Mar 2023, 18:35

Re: Jars are downloaded several times during application running (and it fails)

Post by bfolleas »

Hello, the tests of the 06 june where done with OWS 1.8.0...and it failed.

Janak Mulani
Posts: 725
Joined: 24 Mar 2020, 13:37

Re: Jars are downloaded several times during application running (and it fails)

Post by Janak Mulani »

I will investigate further and come back to you.


Janak Mulani
Posts: 725
Joined: 24 Mar 2020, 13:37

Re: Jars are downloaded several times during application running (and it fails)

Post by Janak Mulani »

Hi

Would you be interested in testing the fix with your application?

Thanks

bfolleas
Posts: 10
Joined: 16 Mar 2023, 18:35

Re: Jars are downloaded several times during application running (and it fails)

Post by bfolleas »

Hello,

yes I'm interested in testing a fix

Janak Mulani
Posts: 725
Joined: 24 Mar 2020, 13:37

Re: Jars are downloaded several times during application running (and it fails)

Post by Janak Mulani »

We have fixed the jar cache key to use Url string instead of the Url. We are hoping that this would fix the problem. we are planning to make a release this week. You can try the new release.

bfolleas
Posts: 10
Joined: 16 Mar 2023, 18:35

Re: Jars are downloaded several times during application running (and it fails)

Post by bfolleas »

Thanks, I will give you my feedback

Stephan Classen
Posts: 232
Joined: 27 Mar 2020, 09:55

Re: Jars are downloaded several times during application running (and it fails)

Post by Stephan Classen »

New release 1.9.0 is now available

bfolleas
Posts: 10
Joined: 16 Mar 2023, 18:35

Re: Jars are downloaded several times during application running (and it fails)

Post by bfolleas »

Our initial tests seem to show that the bug has been fixed. We'll continue to test this version and get back to you.

Post Reply