hydraulic-software / conveyor

Gradle plugin, user guide and discussion forums for Conveyor
https://conveyor.hydraulic.dev
Apache License 2.0
123 stars 9 forks source link

Could not locate a linker JDK for Java 22 - is this a valid major version? [404] #113

Closed ennerf closed 3 months ago

ennerf commented 4 months ago

Description

I'm using the latest conveyor 14.2, but I keep getting errors that JLink for Java 22 was not found.

I tried various versions listed in the conveyor jdk-table:

image

e.g.

include required("/stdlib/jdk/22.0/openjdk.conf")

conveyor make site downloads the JDKs correctly, but eventually it fails on the JLink step with

image

Relevant Log section

It looks like the adoptopenjdk urls don't work for 22

L4 T72  00:00:04.67 [Download JLink] CachedBuildTask|  # Download JLink v2

  Download Java 22 for host machine windows.amd64 from Adoptium API:
  General Availability: https://api.adoptopenjdk.net/v3/binary/latest/22/ga/windows/x64/jdk/hotspot/normal/adoptopenjdk
  Early Access: https://api.adoptopenjdk.net/v3/binary/latest/22/ea/windows/x64/jdk/hotspot/normal/adoptopenjdk

  ## Dependencies

  * jdk-inputs: Java major version 22

L5 T71  00:00:04.67 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libjava.so [finished, took 1 msec]
L4 T72  00:00:04.67 [Download JLink] LocalDiskCache|  ✖︎ Cache miss for e37dc4ddddaa8055 [# Download JLink v2]
L5 T72  00:00:04.67 [Download JLink] WgetKt     |  wget https://api.adoptopenjdk.net/v3/binary/latest/22/ga/windows/x64/jdk/hotspot/normal/adoptopenjdk    (as hydraulic.conveyor.app.ConveyorApplication)
L5 T71  00:00:04.68 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libjavajpeg.so [finished, took 1 msec]
L5 T71  00:00:04.68 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libjawt.so [finished, took 0 msec]
L5 T71  00:00:04.69 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libjdwp.so [finished, took 2 msec]
L5 T71  00:00:04.70 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libjimage.so [finished, took 1 msec]
L5 T71  00:00:04.71 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libjli.so [finished, took 0 msec]
L5 T71  00:00:04.71 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libjsig.so [finished, took 0 msec]
L5 T71  00:00:04.72 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libjsound.so [finished, took 0 msec]
L5 T71  00:00:04.73 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libjsvml.so [finished, took 3 msec]
L5 T71  00:00:04.74 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting liblcms.so [finished, took 2 msec]
L5 T71  00:00:04.75 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting lible.so [finished, took 1 msec]
L5 T71  00:00:04.76 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libmanagement.so [finished, took 0 msec]
L5 T71  00:00:04.76 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libmanagement_agent.so [finished, took 0 msec]
L5 T71  00:00:04.77 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libmanagement_ext.so [finished, took 0 msec]
L5 T71  00:00:04.78 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libmlib_image.so [finished, took 3 msec]
L5 T71  00:00:04.79 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libnet.so [finished, took 0 msec]
L5 T71  00:00:04.79 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libnio.so [finished, took 0 msec]
L5 T71  00:00:04.80 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libprefs.so [finished, took 0 msec]
L5 T70  00:00:04.80 [JDK Inputs for macOS Intel] ArchivesKt|  Extracting src.zip [finished, took 212 msec]
L5 T73  00:00:04.80 [JDK Inputs for macOS ARM] ArchivesKt|  Extracting src.zip [finished, took 215 msec]
L5 T71  00:00:04.81 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting librmi.so [finished, took 0 msec]
L5 T70  00:00:04.81 [JDK Inputs for macOS Intel] ArchivesKt|  Extracting jspawnhelper [finished, took 0 msec]
L5 T71  00:00:04.81 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libsaproc.so [finished, took 1 msec]
L5 T73  00:00:04.81 [JDK Inputs for macOS ARM] ArchivesKt|  Extracting jspawnhelper [finished, took 0 msec]
L5 T70  00:00:04.82 [JDK Inputs for macOS Intel] ArchivesKt|  Extracting libosxsecurity.dylib [finished, took 0 msec]
L5 T73  00:00:04.82 [JDK Inputs for macOS ARM] ArchivesKt|  Extracting libosxsecurity.dylib [finished, took 0 msec]
L5 T71  00:00:04.82 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libsctp.so [finished, took 0 msec]
L5 T70  00:00:04.82 [JDK Inputs for macOS Intel] ArchivesKt|  Extracting libextnet.dylib [finished, took 0 msec]
L5 T71  00:00:04.82 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libsimdsort.so [finished, took 0 msec]
L5 T73  00:00:04.82 [JDK Inputs for macOS ARM] ArchivesKt|  Extracting libextnet.dylib [finished, took 0 msec]
L5 T70  00:00:04.83 [JDK Inputs for macOS Intel] ArchivesKt|  Extracting libjaas.dylib [finished, took 0 msec]
L5 T73  00:00:04.83 [JDK Inputs for macOS ARM] ArchivesKt|  Extracting libjaas.dylib [finished, took 0 msec]
L5 T71  00:00:04.83 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libsplashscreen.so [finished, took 2 msec]
L5 T70  00:00:04.84 [JDK Inputs for macOS Intel] ArchivesKt|  Extracting liblcms.dylib [finished, took 2 msec]
L5 T73  00:00:04.84 [JDK Inputs for macOS ARM] ArchivesKt|  Extracting liblcms.dylib [finished, took 2 msec]
L5 T71  00:00:04.84 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libsyslookup.so [finished, took 0 msec]
L5 T71  00:00:04.84 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libverify.so [finished, took 1 msec]
L5 T70  00:00:04.85 [JDK Inputs for macOS Intel] ArchivesKt|  Extracting libverify.dylib [finished, took 2 msec]
L5 T73  00:00:04.85 [JDK Inputs for macOS ARM] ArchivesKt|  Extracting libverify.dylib [finished, took 2 msec]
L5 T70  00:00:04.85 [JDK Inputs for macOS Intel] ArchivesKt|  Extracting psfont.properties.ja [finished, took 0 msec]
L5 T73  00:00:04.85 [JDK Inputs for macOS ARM] ArchivesKt|  Extracting psfont.properties.ja [finished, took 0 msec]
L5 T71  00:00:04.85 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libzip.so [finished, took 0 msec]
L5 T70  00:00:04.86 [JDK Inputs for macOS Intel] ArchivesKt|  Extracting libj2gss.dylib [finished, took 0 msec]
L5 T73  00:00:04.86 [JDK Inputs for macOS ARM] ArchivesKt|  Extracting libj2gss.dylib [finished, took 0 msec]
L5 T70  00:00:04.86 [JDK Inputs for macOS Intel] ArchivesKt|  Extracting libsaproc.dylib [finished, took 0 msec]
L5 T73  00:00:04.86 [JDK Inputs for macOS ARM] ArchivesKt|  Extracting libsaproc.dylib [finished, took 0 msec]
L5 T72  00:00:05.33 [Download JLink] WgetKt     |  wget https://api.adoptopenjdk.net/v3/binary/latest/22/ea/windows/x64/jdk/hotspot/normal/adoptopenjdk    (as hydraulic.conveyor.app.ConveyorApplication)
L5 T71  00:00:05.35 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting modules [finished, took 490 msec]
L5 T73  00:00:05.35 [JDK Inputs for macOS ARM] ArchivesKt|  Extracting modules [finished, took 483 msec]
L5 T70  00:00:05.35 [JDK Inputs for macOS Intel] ArchivesKt|  Extracting modules [finished, took 485 msec]
L5 T71  00:00:05.35 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting psfont.properties.ja [finished, took 0 msec]
L5 T73  00:00:05.36 [JDK Inputs for macOS ARM] ArchivesKt|  Extracting classlist [finished, took 0 msec]
L5 T71  00:00:05.36 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting psfontj2d.properties [finished, took 0 msec]
L5 T70  00:00:05.36 [JDK Inputs for macOS Intel] ArchivesKt|  Extracting classlist [finished, took 0 msec]
L5 T71  00:00:05.36 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting blocked.certs [finished, took 0 msec]
L5 T71  00:00:05.36 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting cacerts [finished, took 0 msec]
L5 T73  00:00:05.37 [JDK Inputs for macOS ARM] ArchivesKt|  Extracting libjava.dylib [finished, took 1 msec]
L5 T71  00:00:05.37 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting default.policy [finished, took 0 msec]
L5 T70  00:00:05.37 [JDK Inputs for macOS Intel] ArchivesKt|  Extracting libjava.dylib [finished, took 1 msec]
L5 T73  00:00:05.37 [JDK Inputs for macOS ARM] ArchivesKt|  Extracting libawt.dylib [finished, took 2 msec]
L5 T70  00:00:05.38 [JDK Inputs for macOS Intel] ArchivesKt|  Extracting libawt.dylib [finished, took 3 msec]
L5 T71  00:00:05.38 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting public_suffix_list.dat [finished, took 1 msec]
L5 T73  00:00:05.38 [JDK Inputs for macOS ARM] ArchivesKt|  Extracting libosx.dylib [finished, took 0 msec]
L5 T70  00:00:05.38 [JDK Inputs for macOS Intel] ArchivesKt|  Extracting libosx.dylib [finished, took 0 msec]
L5 T73  00:00:05.39 [JDK Inputs for macOS ARM] ArchivesKt|  Extracting libosxapp.dylib [finished, took 1 msec]
L5 T70  00:00:05.39 [JDK Inputs for macOS Intel] ArchivesKt|  Extracting libosxapp.dylib [finished, took 1 msec]
L5 T71  00:00:05.43 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting classes.jsa [finished, took 46 msec]
L5 T73  00:00:05.44 [JDK Inputs for macOS ARM] ArchivesKt|  Extracting classes_nocoops.jsa [finished, took 46 msec]
L5 T70  00:00:05.44 [JDK Inputs for macOS Intel] ArchivesKt|  Extracting classes_nocoops.jsa [finished, took 46 msec]
L5 T71  00:00:05.48 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting classes_nocoops.jsa [finished, took 46 msec]
L5 T71  00:00:05.49 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libjsig.so [finished, took 0 msec]
L5 T73  00:00:05.50 [JDK Inputs for macOS ARM] ArchivesKt|  Extracting libjvm.dylib [finished, took 57 msec]
L5 T70  00:00:05.51 [JDK Inputs for macOS Intel] ArchivesKt|  Extracting libjvm.dylib [finished, took 65 msec]
L4 T72  00:00:05.52 [Download JLink] LocalDiskCache|  Cache build operation for e37dc4ddddaa8055 ended exceptionally: hydraulic.utils.error.UserError: Could not locate a linker JDK for Java 22 - is this a valid major version? [404]
L4 T72  00:00:05.52 [Download JLink] BuildSystemScheduler|  Done: Download JLink
L4 T1   00:00:05.52 [] BuildSystemScheduler     |  Build failed. Interrupting tasks and waiting for termination before halting.
L4 T73  00:00:05.52 [JDK Inputs for macOS ARM] LocalDiskCache|  Cache build operation for 60c5087bffaf3777 ended exceptionally: java.io.IOException: Extraction failed whilst reading ./jdk-22.jdk/Contents/Home/lib/server/libjvm.dylib
L4 T73  00:00:05.52 [JDK Inputs for macOS ARM] BuildSystemScheduler|  Done: JDK Inputs for macOS ARM
L4 T70  00:00:05.53 [JDK Inputs for macOS Intel] LocalDiskCache|  Cache build operation for 6cbb17deda8b6a04 ended exceptionally: java.io.IOException: Extraction failed whilst reading ./jdk-22.jdk/Contents/Home/lib/server/libjvm.dylib
L4 T70  00:00:05.54 [JDK Inputs for macOS Intel] BuildSystemScheduler|  Done: JDK Inputs for macOS Intel
L5 T71  00:00:05.58 [JDK Inputs for Linux Intel] ArchivesKt|  Extracting libjvm.so [finished, took 84 msec]
L4 T71  00:00:05.59 [JDK Inputs for Linux Intel] LocalDiskCache|  Cache build operation for a5bb554b816f047f ended exceptionally: java.io.IOException: Extraction failed whilst reading jdk-22/lib/server/libjvm.so
L4 T71  00:00:05.59 [JDK Inputs for Linux Intel] BuildSystemScheduler|  Done: JDK Inputs for Linux Intel
L4 T1   00:00:05.59 [] ProgressLogger           |  Finished after 3.26 seconds: Building
L5 T1   00:00:05.59 [] ProgressPacer            |  dev.hydraulic.progress.utils.ProgressPacer$$Lambda$373/0x00000008004b58e8@568750b7
L4 T1   00:00:05.59 [] BuildSystemScheduler     |  Ran 77 tasks.
L4 T1   00:00:05.60 [] LocalDiskCache           |  Disk cache changed in size (excluding hard links) by 4.96 KB
L5 T1   00:00:05.60 [] DirectoryLock            |  Successfully unlocked C:\Users\Florian\AppData\Local\Packages\Conveyor_fg3qp2cw01ypp\LocalCache\Local\Hydraulic\Conveyor\Cache\LOCKED
L5 T1   00:00:05.60 [] LocalDiskCache           |  Disk cache is closed.
L1 T1   00:00:05.74 [] ExceptionHandler         |  User error, reported on the console:
  Task failed: Download JLink: Could not locate a linker JDK for Java 22 - is this a valid major version? [404]
    at hydraulic.conveyor.tasks.jvm.LinkerJDKTask.downloadAdoptOpenJDK(Unknown Source)
    at hydraulic.conveyor.tasks.jvm.LinkerJDKTask.build(Unknown Source)
    at hydraulic.factory.tasks.cached.CachedBuildTask$load$block$1.invoke(Unknown Source)
    at hydraulic.factory.tasks.cached.CachedBuildTask$load$block$1.invoke(Unknown Source)
    at hydraulic.factory.tasks.cached.CachedBuildTask.load$lambda$4(Unknown Source)
    at hydraulic.diskcache.LocalDiskCache.buildEntry(Unknown Source)
    at hydraulic.diskcache.LocalDiskCache.synchronizedBuild(Unknown Source)
    at hydraulic.diskcache.LocalDiskCache.synchronizedBuild$default(Unknown Source)
    at hydraulic.diskcache.LocalDiskCache.get(Unknown Source)
    at hydraulic.factory.tasks.cached.CachedBuildTask.load$hydraulic_factory(Unknown Source)
    at hydraulic.factory.builds.BuildSystemScheduler$executeTask$$inlined$executeWithNamedThreadAndLogging$1.call(Unknown Source)
    at hydraulic.utils.concurrency.Threading.runWithLoggingScope(Unknown Source)
    at hydraulic.factory.builds.BuildSystemScheduler.executeTask(Unknown Source)
    at hydraulic.factory.builds.BuildSystemScheduler.parallelScheduler$lambda$5(Unknown Source)
    at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at hydraulic.factory.builds.BuildSystemScheduler$WorkerThread.run(Unknown Source)

L4 T1   00:00:05.74 [] AppFrameworkInstance     |  Execution complete in 5.507 seconds
mikehearn commented 4 months ago

Maybe Adoptium are having issues. I just tried that URL using wget and it served me a JDK, not a 404. Replica issues perhaps?

ennerf commented 4 months ago

Maybe. I just tried again, but I still get the same error for both urls. The urls for 21 work fine.

wget https://api.adoptopenjdk.net/v3/binary/latest/22/ga/windows/x64/jdk/hotspot/normal/adoptopenjdk

--2024-05-30 16:55:15--  https://api.adoptopenjdk.net/v3/binary/latest/22/ga/windows/x64/jdk/hotspot/normal/adoptopenjdk
Resolving api.adoptopenjdk.net (api.adoptopenjdk.net)... 2606:4700::6811:4a51, 2606:4700::6811:4b51, 104.17.74.81, ...
Connecting to api.adoptopenjdk.net (api.adoptopenjdk.net)|2606:4700::6811:4a51|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2024-05-30 16:55:16 ERROR 404: Not Found.
mikehearn commented 4 months ago

I can't reproduce this so I filed a ticket with the API folks to investigate.

mikehearn commented 3 months ago

@ennerf Are you still having this issue? The AdoptOpenJDK API folks can't reproduce this failure; maybe it was a temporary flake.

ennerf commented 3 months ago

Yes, it seems to be some georeplication issue. I'm still getting the issue when running from Austria, but it works when I try to download it through our US office. Same computer with and without VPN:

Austria

> wget https://api.adoptopenjdk.net/v3/binary/latest/22/ga/windows/x64/jdk/hotspot/normal/adoptopenjdk
--2024-06-06 12:22:19--  https://api.adoptopenjdk.net/v3/binary/latest/22/ga/windows/x64/jdk/hotspot/normal/adoptopenjdk
Resolving api.adoptopenjdk.net (api.adoptopenjdk.net)... 104.17.75.81, 104.17.74.81, 2606:4700::6811:4b51, ...
Connecting to api.adoptopenjdk.net (api.adoptopenjdk.net)|104.17.75.81|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2024-06-06 12:22:20 ERROR 404: Not Found.

US East (VPN)

> wget https://api.adoptopenjdk.net/v3/binary/latest/22/ga/windows/x64/jdk/hotspot/normal/adoptopenjdk
--2024-06-06 12:25:45--  https://api.adoptopenjdk.net/v3/binary/latest/22/ga/windows/x64/jdk/hotspot/normal/adoptopenjdk
Resolving api.adoptopenjdk.net (api.adoptopenjdk.net)... 104.17.75.81, 104.17.74.81, 2606:4700::6811:4b51, ...
Connecting to api.adoptopenjdk.net (api.adoptopenjdk.net)|104.17.75.81|:443... connected.
HTTP request sent, awaiting response... 307 Temporary Redirect
Location: https://github.com/adoptium/temurin22-binaries/releases/download/jdk-22.0.1%2B8/OpenJDK22U-jdk_x64_windows_hotspot_22.0.1_8.zip [following]
--2024-06-06 12:25:46--  https://github.com/adoptium/temurin22-binaries/releases/download/jdk-22.0.1%2B8/OpenJDK22U-jdk_x64_windows_hotspot_22.0.1_8.zip
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/677419466/d91e461b-d57b-4238-9a11-436de290d91b?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240606%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240606T102548Z&X-Amz-Expires=300&X-Amz-Signature=6cd49f4c3d7cbbd244a220a1ef4f453ad05adf92d0a6e1c2d9dc1cfb8f317ff2&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=677419466&response-content-disposition=attachment%3B%20filename%3DOpenJDK22U-jdk_x64_windows_hotspot_22.0.1_8.zip&response-content-type=application%2Foctet-stream [following]
--2024-06-06 12:25:47--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/677419466/d91e461b-d57b-4238-9a11-436de290d91b?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240606%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240606T102548Z&X-Amz-Expires=300&X-Amz-Signature=6cd49f4c3d7cbbd244a220a1ef4f453ad05adf92d0a6e1c2d9dc1cfb8f317ff2&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=677419466&response-content-disposition=attachment%3B%20filename%3DOpenJDK22U-jdk_x64_windows_hotspot_22.0.1_8.zip&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.111.133, 185.199.109.133, 185.199.108.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 203356730 (194M) [application/octet-stream]
Saving to: ‘adoptopenjdk’

adoptopenjdk                         100%[====================================================================>] 193.94M  22.4MB/s    in 10s

2024-06-06 12:25:58 (19.2 MB/s) - ‘adoptopenjdk’ saved [203356730/203356730]
mikehearn commented 3 months ago

They fixed it their end, so it should be resolved now. We'll look at migrating to the new/same/different API they offer.