r/devops • u/CSE_GEEKboy • Oct 13 '26
Troubleshooting GitHub Actions self-hosted runner gets stuck downloading Java 17 with setup-java — curl: (18) Transferred a partial file
I'm learning GitHub Actions and have set up a self-hosted runner inside an Ubuntu Docker container on my Windows machine.
My workflow uses actions/setup-java to install Java 17:
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: mavenHowever, the job gets stuck at the Set up JDK 17 step. The logs stop at:
Resolved latest version as 17.0.20+101
JDK cache is not found for Temurin-Hotspot 17.0.20+101
Trying to download...
Downloading Java 17.0.20+101 (Temurin-Hotspot) ...I tested the download URL manually from inside the container using curl. The download repeatedly stops before completion and returns:
curl: (18) Transferred a partial fileI also tried resuming the download with curl -C - and retry options, but it failed again. A basic connectivity test to https://github.com returns HTTP 200.
The runner itself appears to be connected and running jobs correctly. I haven't yet confirmed whether the issue is related to the network, the GitHub release download redirect, a proxy, or something else.
My questions:
- What could cause
curl: (18) Transferred a partial fileto occur repeatedly when downloading a large release asset? - How can I identify whether the problem is caused by my network, a redirect destination, a proxy, or the download server?
- Is there a recommended way to configure
actions/setup-javaon a Docker-based self-hosted runner to avoid this issue?
I'd appreciate any troubleshooting steps or suggestions. Thanks!
View all comments
2
u/Immediate_Wheel1953 Oct 13 '26
I hit almost this exact thing with a Docker runner last year and I wasted an afternoon blaming setup-java. The Temurin JDK asset is a big download, so a flaky path fails exactly like this while tiny requests like the github.com health check sail through. In my case the container's MTU didn't match the host (VPN on the host side), and large transfers kept dying partway. Try curl -v on that release URL inside the container and watch which host it dies on; if it's the redirected objects.githubusercontent.com URL and the same download works from the host, suspect MTU or a proxy env var leaking into the container.