Overview
We are using Spring Boot 3.5.7 and using Netty to call a downstream system over HTTP (a json HTTP APT) via WebClient.
We create HttpClient and use proxyWithSystemProperties() to let Netty create ProxyProvider using Java System Properties at the application startup.
Because application is running in k8s with istio proxy it was observed that if istio proxy is not ready / available proxyWithSystemProperties() create ProxyProvider with "unresolved" proxy address.
It use AddressUtils.createResolved (builder.host, builder.port) to do that.
In this scenario because proxy has failed to resolve early the HttpClient when used later in the application does not work. It throws exception java.nio.channels. UnresolvedAddressException: null
Is there any way to let Netty know not to resolve proxy early when used proxyWithSystemProperties() ?
Thanks
Expected Behavior
Ideally the proxy name resolution should be delayed until the proxy is actually used for invoking say HTTP API.
When we set proxy explicitly (i.e. NOT using proxyWithSystemProperties()) then early resolution does not happen and the actual resolution is done when the HTTP call is made.
Actual Behavior
If proxyWithSystemProperties() is used and specified (-Dhttps.proxyHost=xyz) proxy (xyz) is not available / resolvable then the created ProxyProvider is useless and when used later via HTTPClient to invoke HTTP call it fails with java.nio.channels. UnresolvedAddressException: null
Possible Solution
Delay resolution of proxy when proxyWithSystemProperties() is used or provide proxyWithSystemProperties (resolve=false) to allow consumers to specify it ???
Your Environment
- Reactor version(s) used:
- Other relevant libraries versions (eg. netty",...): reactor netty 1.2.11 spring-boot-starter-parent 3.5.7
- JVM version (java-version'): openjdk version "21"
- OS and version (eg. uname -a): Win 11