There are lots of reasons, and unfortunatelly they have different ways to
detect. Here are a few:
- proxy setting (if a system or application proxy is set it might resolve
addresses differently in one or the other)
- ipv6 preference: when the host has v4 and v6 addresses the prio in java
How do you know the keepalive packets have not been sent? Did you run a
tcpdump?
The socket API (java and apache) traditionally does not support to configure
the keepalive times, they only allow to turn it on.
BTW: still think tcp keepalives are not what you want to rely on and might not
Thank you. I updated Apache HttpClient version as you described. However,
it didn't help, TCP KeepAlive packets were not sent between client and
server.
If correctly understand, the problem is that I cannot edit TCP KeepAlive
timouts in HttpClient or even in Apache httpd server. It works only if I
Every once in a while, it seems that my apache HTTP client seems to resolve a
host name different that when I use the command line. We had done some
infrastructure work (months ago) and some of our internal domain names had
changed. Now, everything will work fine, until all of a sudden it