[
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: java.net.SocketException: Could not connect to www.dan.me.uk/[2001:67c:26b4:2:21e:bff:fec7:87a]:443 <http://www.dan.me.uk/[2001:67c:26b4:2:21e:bff:fec7:87a]:443> at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:113) at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:96) at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:771) at org.eclipse.jetty.client.HttpClient.GET(HttpClient.java:351) at org.eclipse.jetty.client.HttpClient.GET(HttpClient.java:336)
It seems like the client that was bound to the ipv4 address tries to connect to the ipv6 address of www.dan.me.uk <http://www.dan.me.uk> which is impossible.
Did we miss something or is this a bug?
Best,
Matthias