Skip to content

setup-java sometimes fails with Trying to resolve the latest version from remote Error: error code: 522 #963

@findepi

Description

@findepi

Description:

setup-java sometimes fails with Trying to resolve the latest version from remote Error: error code: 522

Task version:

v4

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:

https://github.com/trinodb/trino/actions/runs/19728712540/job/56524963199?pr=27470

Run actions/setup-java@v4
  with:
    distribution: temurin
    java-version: 26-ea
    java-package: jdk
    check-latest: false
    server-id: github
    server-username: GITHUB_ACTOR
    server-password: GITHUB_TOKEN
    overwrite-settings: true
    job-status: success
    token: ***
  env:
    CONTINUOUS_INTEGRATION: true
    MAVEN: ./mvnw
    MAVEN_OPTS: -Xmx512M -XX:+ExitOnOutOfMemoryError
    MAVEN_INSTALL_OPTS: -Xmx3G -XX:+ExitOnOutOfMemoryError
    MAVEN_FAST_INSTALL: -B -V -T 1C -DskipTests -Dmaven.source.skip=true -Dair.check.skip-all
    MAVEN_COMPILE_COMMITS: -B --quiet -T 1C -DskipTests -Dmaven.source.skip=true -Dair.check.skip-all=true -Dmaven.javadoc.skip=true --no-snapshot-updates --no-transfer-progress
    MAVEN_GIB: -P gib -Dgib.referenceBranch=refs/remotes/origin/master
    MAVEN_TEST: -B -Dmaven.source.skip=true -Dair.check.skip-all --fail-at-end -P gib -Dgib.referenceBranch=refs/remotes/origin/master
    TESTCONTAINERS_PULL_PAUSE_TIMEOUT: 600
    SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
    CI_SKIP_SECRETS_PRESENCE_CHECKS: 
    SECRETS_PRESENT: 
    PTL_TMP_DOWNLOAD_PATH: /tmp/pt_java_downloads
Installed distributions
  Trying to resolve the latest version from remote
  Error: error code: 522

Expected behavior:

I expect setup-java to retry on network failures such as this one.

Actual behavior:

setup-java fails, the whole workflow job fails

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions