-
Notifications
You must be signed in to change notification settings - Fork 1.1k
issues with apache httpclient 5.1.x #1789
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
Comments
Same issue - thanks for taking time to report (although i still burned many hours isolating JVM crashes)
|
@peterdnight i switched to the zerodep client - it seems to be a shaded httpclient5 so it does not clash with the version i have in the remaining part of my application. I guess that is the safer bet for future updates and i will stick to it. |
After reading through the other issue I have a short reproducer:
The second list images hangs forever. |
So the connection staleness check in org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager seems to block forever. It is triggered (with default configuration) after 2 seconds of inactivity. If you change that to -1 the check is disabled and the code above does not block. you can call this method after creating the client to change the value:
So I guess a change in com.github.dockerjava.httpclient5.ApacheDockerHttpClientImpl will be required to set this value. |
The connection staleness check in apache httpclient seems to rely on modifying the socket timeout to 1 ms then trying to read something and resetting the timeout back to the original value. I guess that this fails in our case - the timeout is not reset and thus the read blocks forever (as the original timeout was 0). |
@dimovelev - i feel your pain. fyi - if you are curious regarding my use case, check out my docker tutorial: |
Should be fixed in 3.2.13 |
Uh oh!
There was an error while loading. Please reload this page.
When I switch the httpclient version from 5.0.x to 5.1.x, docker-java has problems communicating with docker - the process hangs with such a stack trace:
OS: Windows 10 with Docker Desktop
Docker-Java: 3.2.11 and 3.2.12
JDK: Corretto 17.0.1
Some commands seem to succeed but sooner or later one hangs forever. So far I have not been able to create a small reproducer - executing e.g. listImages in a loop did not produce the issue.
The text was updated successfully, but these errors were encountered: