[
https://issues.apache.org/jira/browse/SYNAPSE-205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556028#action_12556028
]
Andreas Veithen commented on SYNAPSE-205:
-----------------------------------------
I'm still having the same issue with the latest sources from SVN. After
investigating what happens at the TCP/IP level, it seems that this error can be
reproduced when all of the following conditions are met:
1) The target host is up.
2) The target port is closed.
3) The target OS doesn't respond to SYN packets.
Note that:
* When condition 1 is not met, you might get "java.net.SocketException: Network
is unreachable" instead of the NPE.
* When condition 3 is not met, you will always get "java.net.ConnectException:
Connection refused".
Probably, when you tried to reproduce the problem, you were in one of these
cases.
Also note that normally a host is supposed to reply with a RST packet when the
destination port is closed. In my case, the target host is a Windows machine.
It doesn't respond at all to the SYN packets, probably due to some firewall
settings. Since no reply is received whatsoever (neither an ICMP destination
network/host/port unreachable nor a TCP RST), we are in the case where
Socket#connect would throw a java.net.SocketTimeoutException.
> NPE in HttpCoreNIOSender and "I/O reactor has been shut down"
> -------------------------------------------------------------
>
> Key: SYNAPSE-205
> URL: https://issues.apache.org/jira/browse/SYNAPSE-205
> Project: Synapse
> Issue Type: Bug
> Components: Transports
> Affects Versions: NIGHTLY
> Reporter: Andreas Veithen
> Priority: Critical
>
> When the target service is not available, a request to the proxy service
> causes the following exception:
> Exception in thread "HttpCoreNIOSender" java.lang.NullPointerException
> at
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender$3.handleError(HttpCoreNIOSender.java:460)
> at
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender$3.timeout(HttpCoreNIOSender.java:439)
> at
> org.apache.http.impl.nio.reactor.SessionRequestImpl.timeout(SessionRequestImpl.java:151)
> at
> org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processTimeouts(DefaultConnectingIOReactor.java:152)
> at
> org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:96)
> at
> org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:158)
> at
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.executeClientEngine(HttpCoreNIOSender.java:139)
> at
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender.access$000(HttpCoreNIOSender.java:68)
> at
> org.apache.synapse.transport.nhttp.HttpCoreNIOSender$1.run(HttpCoreNIOSender.java:101)
> at java.lang.Thread.run(Thread.java:613)
> Any further request then fails with "java.lang.IllegalStateException: I/O
> reactor has been shut down".
> The instruction in HttpCoreNIOSender that causes the NPE is as follows:
> MessageContext nioFaultMessageContext =
> MessageContextBuilder.createFaultMessageContext(
> mc, new AxisFault(exception.toString(), exception));
> Probably, when handleError is called by the timeout (rather than the failed)
> method, as is the case here (see stacktrace), exception is null. The
> handleError method doesn't handle this situation appropriately.
> Note that this issue is similar but not identical to the one described in
> SYNAPSE-168.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]