Oleg,
I think this might be a bug. When I only set the
IOReactor.ConnectTimeout, the ConnectTimeout will be set to the
sessionRequest.
But in the method processPendingRequest(), the value of ConnectTimeout in the
sessionRequest will be reset to 0.
Whybert
At 2014-08-26 03:03:43, "Oleg Kalnichevski" <[email protected]> wrote:
>On 25/08/14 16:51 , whybert wrote:
>> 2014/08/25 22:49:05:698 CST [DEBUG] MainClientExec - [exchange: 1] start
>> execution
>> 2014/08/25 22:49:05:709 CST [DEBUG] RequestAddCookies - CookieSpec selected:
>> best-match
>> 2014/08/25 22:49:05:719 CST [DEBUG] RequestAuthCache - Auth cache not set in
>> the context
>> 2014/08/25 22:49:05:719 CST [DEBUG] InternalHttpAsyncClient - [exchange: 1]
>> Request connection for {}->http://1.1.1.1:80
>> 2014/08/25 22:49:05:721 CST [DEBUG] PoolingNHttpClientConnectionManager -
>> Connection request: [route: {}->http://1.1.1.1:80][total kept alive: 0;
>> route allocated: 0 of 2; total allocated: 0 of 20]
>> 2014/08/25 22:49:26:729 CST [DEBUG] PoolingNHttpClientConnectionManager -
>> Connection request failed <java.net.ConnectException: Connection timed out:
>> no further information>java.net.ConnectException: Connection timed out: no
>> further information
>> at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
>> at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
>> at
>> org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:173)
>> at
>> org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:147)
>> at
>> org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348)
>> at
>> org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:189)
>> at
>> org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.doExecute(CloseableHttpAsyncClientBase.java:67)
>> at
>> org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase.access$000(CloseableHttpAsyncClientBase.java:38)
>> at
>> org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:57)
>> at java.lang.Thread.run(Unknown Source)
>>
>>
>> 2014/08/25 22:49:26:731 CST [DEBUG] InternalHttpAsyncClient - [exchange: 1]
>> connection request failed
>> 2014/08/25 22:49:26:732 CST [DEBUG] PoolingNHttpClientConnectionManager -
>> Connection manager is shutting down
>> 2014/08/25 22:49:26:737 CST [DEBUG] PoolingNHttpClientConnectionManager -
>> Connection manager shut down
>> 21008
>> java.net.ConnectException: Connection timed out: no further information
>>
>>
>>
>>>> It took 21 seconds to get a ConnectException while the ConnectTimeout was
>>>> 2 seconds.
>>>> Could you help me to look at this problem? Thanks!
>>>>
>>>
>>> Whybert
>>>
>
>Whybert
>
>If you look at the stack trace and correlate it with the source code
>you'll see that the exception was thrown from a native
>SocketChannelImpl#checkConnect method after the underlying channel was
>selected as connectable by the I/O selector (see
>DefaultConnectingIOReactor#processEvent method). This looks like a
>platform specific issue to me, which might be a bug (or a feature) of
>the JRE or of the underlying OS TCP/IP stack.
>
>Oleg
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [email protected]
>For additional commands, e-mail: [email protected]
>