-
-
Notifications
You must be signed in to change notification settings - Fork 629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: Curl bug triggered if partially downloaded and can never finish download #1288
Comments
Optional retries won't fix this issue, right? As SDKman uses Does running |
Right, you'd have to delete the sdk before the retry. |
I think cURL's https://daniel.haxx.se/blog/2022/03/11/remove-leftovers-on-curl-error/ I'll see if I can hack something together. |
Thx...that looks promising. Seems like that should just be the default 😄 "curl’s 246th command line option" 😹 |
Hi @kenyee, I've dived into this a bit deeper and have run into a wall with this. Even though How did I discover that it breaks? When I tried to run this in the above experimental branch it failed because the github runner's version of curl didn't have this feature. If I can't even get this to build on CI, I'm certainly not going to roll it out to the greater public. In the meantime, I suggest using the |
That's unfortunate...checked that it's 7.87 on MacOSX but Jammy Ubuntu is on 7.81 (https://packages.ubuntu.com/jammy/curl). But yes, we'll look into baking in the java version into our jenkins images to prevent this from happening in the future. Thanks for looking at it! |
Retrying feels a bit wrong and I don't think we should go down that route 😛 Anyway, sorry I couldn't be of more help and thanks again for making us aware of it! |
Closing this issue because we can't adopt the curl flag. |
|
Bug report
If the download fails partway through, a curl bug is triggered and sdkman never manages to download the new JDK, etc. and you see this curl error:
HTTP server doesn't seem to support byte ranges. Cannot resume.
To reproduce
Tell sdkman to download a new Zulu JDK image. Kill the process partway through so you get a partial file.
Try doing "sdk env install" again and you should see the above error.
I found this old Stackoverflow issue that links the curl bug:
https://stackoverflow.com/questions/23586214/curl-33-http-server-doesnt-seem-to-support-byte-ranges-cannot-resume
Probably should add a retry or optional retry for the curl?
System info
OS (e.g. Windows, Linux, Mac, Cygwin, WSL, etc.) and version
OSX Mac 23.4.0
Shell and version (e.g.
bash --version
/zsh --version
)% zsh --version
zsh 5.9 (x86_64-apple-darwin23.0)
The output of
sdk version
SDKMAN!
script: 5.18.2
native: 0.1.3
The text was updated successfully, but these errors were encountered: