What I am trying to achieve:
Send a high volume of http requests to a third party server
Issue:
Intermittently, I am facing this issue I am having a hard time understanding.
Again, this is intermittent only.
2023-05-16 08:33:01 1 DEBUG --- [main] [,] o.a.h.impl.nio.client.MainClientExec : [exchange: 1] start execution
2023-05-16 08:33:01 1 DEBUG --- [main] [,] o.a.h.c.protocol.RequestAddCookies : CookieSpec selected: default
2023-05-16 08:33:01 1 DEBUG --- [main] [,] o.a.h.c.protocol.RequestAuthCache : Re-using cached 'basic' auth scheme for https://third-party-server.com:9200
2023-05-16 08:33:01 1 DEBUG --- [main] [,] o.a.h.c.protocol.RequestAuthCache : No credentials for preemptive authentication
2023-05-16 08:33:01 1 DEBUG --- [main] [,] o.a.h.i.n.c.InternalHttpAsyncClient : [exchange: 1] Request connection for {s}->https://third-party-server.com:9200
2023-05-16 08:33:01 1 DEBUG --- [main] [,] o.a.h.i.n.c.PoolingNHttpClientConnectionManager : Connection request: [route: {s}->https://third-party-server.com:9200][total kept alive: 0; route allocated: 0 of 10; total allocated: 0 of 30]
2023-05-16 08:33:11 1 DEBUG --- [pool-5-thread-1] [,] o.a.h.i.n.c.PoolingNHttpClientConnectionManager : Connection request failed
java.net.NoRouteToHostException: No route to host
at java.base/sun.nio.ch.Net.pollConnect(Native Method)
at java.base/sun.nio.ch.Net.pollConnectNow(Unknown Source)
at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:174)
at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:148)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:351)
at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:221)
at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)
at java.base/java.lang.Thread.run(Unknown Source)
2023-05-16 08:33:11 1 DEBUG --- [pool-5-thread-1] [,] o.a.h.i.n.c.InternalHttpAsyncClient : [exchange: 1] connection request failed
Note:
Other projects use different http client, such as Netty, Okhttp etc, when they fire requests at the same timestamp, no issue
Question:
May I ask what does it mean?
Is it the third party server issue? Or me the client?
What can I do in order to avoid this? What can I do to further debug this issue?