Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Client tries to connect to ipv6 host when bound to ipv4 interface

Hi there,
with jetty 11, we bind the http client to an ipv4 address as follows:

httpClient.setBindAddress(new InetSocketAddress(serverConfig.getIpv4Address(), 0));

We lately noticed, that this client can't connect to certain websites:

java.util.concurrent.ExecutionException: Could not connect to[2001:67c:26b4:2:21e:bff:fec7:87a]:443 <[2001:67c:26b4:2:21e:bff:fec7:87a]:443>	at org.eclipse.jetty.client.util.FutureResponseListener.getResult(	at org.eclipse.jetty.client.util.FutureResponseListener.get(	at org.eclipse.jetty.client.HttpRequest.send(	at org.eclipse.jetty.client.HttpClient.GET(	at org.eclipse.jetty.client.HttpClient.GET(
It seems like the client that was bound to the ipv4 address tries to connect to the ipv6 address of <> which is impossible.

Did we miss something or is this a bug?


Back to the top