Modify

Opened 3 years ago

Closed 3 years ago

Last modified 19 months ago

#22037 closed defect (fixed)

"Projekt Java-EarlyAccess-Update-JDK" fails downloading Java with 404

Reported by: mdk Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: java19 Cc:

Description

The Jenkins Job "Projekt Java-EarlyAccess-Update-JDK" fails with 404 on downloading
https://download.java.net/java/early_access/jdk19/12/GPL/openjdk-19-ea+12_linux-x64_bin.tar.gz

Attachments (0)

Change History (12)

comment:1 by mdk, 3 years ago

And also "Java-EarlyAccess-JOSM" for Java19 is failing with

We cannot run Java, please ensure you have Java installed.
  We have tried to execute /opt/jdk-19/bin/java but failed.

comment:2 by taylor.smock, 3 years ago

Looking at the download page, the URL should be https://download.java.net/java/early_access/jdk19/19/GPL/openjdk-19-ea+19_linux-x64_bin.tar.gz.

This appears to be a problem with the script we use ( https://github.com/sormuras/bach/blob/master/install-jdk.sh -- we download this from https://raw.githubusercontent.com/sormuras/bach/master/install-jdk.sh ).

Looking at the tickets, bach/250, it looks like the master branch is intended to be deleted soon -- they also changed their default branch to main (like many other projects).

Furthermore, it looks like that script is no longer supported (see bach/248). It has been removed from their main branch.

So we should either (a) fork the script and update it ourselves, (b) switch to a different method of getting Java builds (in bach/250, jabba and sdkman were mentioned).

Of the two alternatives to the script, it looks like sdkman is better -- I'm not seeing any Java 19 releases from jabba remote-ls anyway.

Right now, I'm not particularly enamoured with sdkman either -- it isn't very script friendly. It would be doable, but unwise (IMO) to attempt to script it.

Examples with sdkman:

Java 18 GA

$ sdk install java 18-open

Java 19 EA

$ sdk install java $(sdk list java | awk -F'|' '/19/ && /open/ {print $6}' | head -n1)
Downloading: java 19.ea.19-open

In progress...

Repackaging Java 19.ea.19-open...

Done repackaging...

Installing: java 19.ea.19-open
Done installing!

Do you want java 19.ea.19-open to be set as default? (Y/n):

Interactive question! But this can be fixed with echo "sdkman_auto_answer=true" > ~/.sdkman/etc/config.

comment:3 by taylor.smock, 3 years ago

I've taken a look at the script we use.

We pretty much have to change a few lines in https://github.com/sormuras/bach/blob/releases/11/install-jdk.properties:

  • install-jdk.properties

     
    22#
    33# JDK 19
    44#
    5 19-linux-aarch64=https://download.java.net/java/early_access/jdk19/12/GPL/openjdk-19-ea+12_linux-aarch64_bin.tar.gz
    6 19-linux-x64=https://download.java.net/java/early_access/jdk19/12/GPL/openjdk-19-ea+12_linux-x64_bin.tar.gz
     519-linux-aarch64=https://download.java.net/java/early_access/jdk19/20/GPL/openjdk-19-ea+20_linux-aarch64_bin.tar.gz
     619-linux-x64=https://download.java.net/java/early_access/jdk19/20/GPL/openjdk-19-ea+20_linux-x64_bin.tar.gz
    7719-linux-x64-musl=https://download.java.net/java/early_access/alpine/5/binaries/openjdk-19-ea+5_linux-x64-musl_bin.tar.gz
    8 19-macos-aarch64=https://download.java.net/java/early_access/jdk19/12/GPL/openjdk-19-ea+12_macos-aarch64_bin.tar.gz
    9 19-macos-x64=https://download.java.net/java/early_access/jdk19/12/GPL/openjdk-19-ea+12_macos-x64_bin.tar.gz
    10 19-windows-x64=https://download.java.net/java/early_access/jdk19/12/GPL/openjdk-19-ea+12_windows-x64_bin.zip
     819-macos-aarch64=https://download.java.net/java/early_access/jdk19/20/GPL/openjdk-19-ea+20_macos-aarch64_bin.tar.gz
     919-macos-x64=https://download.java.net/java/early_access/jdk19/20/GPL/openjdk-19-ea+20_macos-x64_bin.tar.gz
     1019-windows-x64=https://download.java.net/java/early_access/jdk19/20/GPL/openjdk-19-ea+20_windows-x64_bin.zip
    1111
    1212#
    1313# JDK 18

We'd also have to change the download link in https://github.com/sormuras/bach/blob/releases/11/install-jdk.sh for the properties file.

comment:4 by taylor.smock, 3 years ago

Keywords: java19 added

comment:5 by stoecker, 3 years ago

Simply copy the stuff to our SVN and relink to it?

comment:6 by stoecker, 3 years ago

Ah, I handled it locally on the server. Let's see...

in reply to:  5 comment:7 by taylor.smock, 3 years ago

Replying to stoecker:

Simply copy the stuff to our SVN and relink to it?

Definitely an option. I'm OK with that, with the caveat that we're going to have to maintain it, and I had to (effectively) hand-edit the install-jdk.properties file.

It does look like there might be an automated way to update the properties file.

It looks like we'll want, at minimum:

Last edited 3 years ago by taylor.smock (previous) (diff)

comment:8 by taylor.smock, 3 years ago

Resolution: fixed
Status: newclosed

comment:9 by mdk, 3 years ago

The same problem occurs again since 20.7.2022 while downloading https://download.java.net/java/early_access/jdk19/20/GPL/openjdk-19-ea+20_linux-x64_bin.tar.gz

comment:10 by taylor.smock, 3 years ago

Yep. Rather unfortunately, both stoecker and Don-vip aren't very active right now (life happens), and only someone with server admin access can fix it, at this time. I think.

I believe stoecker copied the files I linked into the Jenkins instance, but it doesn't look like we are running the ShowJdkBuilds.java script automatically.

TBH, we should either put it in svn somewhere (either source:josm/trunk/scripts or someplace in source:osm/applications/editors/josm) or have it set up to run automatically when Java-EarlyAccess-Update-JDK fails.

comment:11 by stoecker, 3 years ago

If you assign or CC me in tickets I'll see and react.

I updated the install-jdk.properties for Java 19 and Java 20 EA 10.

comment:12 by stoecker, 19 months ago

Ok. I disabled Early access and switched Java 11 to Java 17 for JOSM and Plugins.

Remains to add java 20 and 21 and enabled these as well.

Ooops. Wrong ticket. See #23218

Last edited 19 months ago by stoecker (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.