synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeewantha Dharmaparakrama <>
Subject Why is "java.nio.channels.ClosedChannelException" thrown from Nio Reactor?
Date Mon, 19 Aug 2013 08:48:45 GMT
Hi All,

I have an intermittent issue with Synapse where it prints the following
exception in its Error logs.

[2013-08-15 16:57:28,710] ERROR - SourceHandler Unexpected I/O error:
at org.apache.http.impl.nio.reactor.SessionOutputBufferImpl.flush(
at org.apache.http.impl.nio.DefaultNHttpServerConnection.produceOutput(
at org.apache.synapse.transport.http.conn.LoggingNHttpServerConnection.produceOutput(
at org.apache.synapse.transport.passthru.ServerIODispatch.onOutputReady(
at org.apache.synapse.transport.passthru.ServerIODispatch.onOutputReady(
at org.apache.http.impl.nio.reactor.AbstractIODispatch.outputReady(
at org.apache.http.impl.nio.reactor.BaseIOReactor.writable(
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$

What happens is for some reason, the corresponding SocketChannel is closed
but still some IO operation is done on it. Once this exception is caught
from httpcore-nio, it will be passed to *
org.apache.http.nio.NHttpServerEventHandler* implementation
* ) and will be printed on Synapse Error logs. Since this is an
intermittent issue,
I tried to reproduce this programmatically but failed [1]. What can be the
practical reason for this Error? Can this be deliberately reproduced with


Thanks in advance,

View raw message