We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I set a proxy on my Http Client using the .host and .port setters, I get an UnresolvedAddressException.
.host
.port
UnresolvedAddressException
Code:
HttpClient.builder() .options(ops -> ops .host("jsonplaceholder.typicode.com") .port(80) .proxy(proxyOps -> proxyOps.host("36.76.105.159").port(53281).type(ClientProxyOptions.Proxy.HTTP).build())) .build();
Exception:
java.nio.channels.UnresolvedAddressException: null at sun.nio.ch.Net.checkAddress(Net.java:101) ~[na:1.8.0_131] at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:622) ~[na:1.8.0_131] at io.netty.util.internal.SocketUtils$3.run(SocketUtils.java:83) ~[netty-common-4.1.13.Final.jar:4.1.13.Final] at io.netty.util.internal.SocketUtils$3.run(SocketUtils.java:80) ~[netty-common-4.1.13.Final.jar:4.1.13.Final] at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_131] at io.netty.util.internal.SocketUtils.connect(SocketUtils.java:80) ~[netty-common-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.socket.nio.NioSocketChannel.doConnect(NioSocketChannel.java:337) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.connect(AbstractNioChannel.java:254) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.DefaultChannelPipeline$HeadContext.connect(DefaultChannelPipeline.java:1266) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:545) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:530) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.connect(CombinedChannelDuplexHandler.java:497) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.ChannelOutboundHandlerAdapter.connect(ChannelOutboundHandlerAdapter.java:47) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.CombinedChannelDuplexHandler.connect(CombinedChannelDuplexHandler.java:298) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:545) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:530) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.handler.proxy.ProxyHandler.connect(ProxyHandler.java:181) ~[netty-handler-proxy-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:545) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:530) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.ChannelOutboundHandlerAdapter.connect(ChannelOutboundHandlerAdapter.java:47) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:545) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:530) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.ChannelDuplexHandler.connect(ChannelDuplexHandler.java:50) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:545) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:530) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:512) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.DefaultChannelPipeline.connect(DefaultChannelPipeline.java:985) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.AbstractChannel.connect(AbstractChannel.java:255) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.bootstrap.Bootstrap$3.run(Bootstrap.java:252) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) ~[netty-common-4.1.13.Final.jar:4.1.13.Final] at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403) ~[netty-common-4.1.13.Final.jar:4.1.13.Final] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462) ~[netty-transport-4.1.13.Final.jar:4.1.13.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) ~[netty-common-4.1.13.Final.jar:4.1.13.Final] at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_131]
Using the .address setter, everything works fine:
.address
HttpClient.builder() .options(ops -> ops .host("jsonplaceholder.typicode.com") .port(80) .proxy(proxyOps -> proxyOps.address(InetSocketAddress.createUnresolved("36.76.105.159", 53281)).type(ClientProxyOptions.Proxy.HTTP).build())) .build();
0.7.0.M1
The text was updated successfully, but these errors were encountered:
#141 should address this
Sorry, something went wrong.
6d8304f
violetagg
No branches or pull requests
When I set a proxy on my Http Client using the
.host
and.port
setters, I get anUnresolvedAddressException
.Code:
Exception:
Using the
.address
setter, everything works fine:Reactor Netty version
0.7.0.M1
The text was updated successfully, but these errors were encountered: