connect closed IO error

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

connect closed IO error

dale.herrig
Hi,

I am running  jquery sub/pub  snapshot8 and  Jetty
jetty-distribution-7.4.3.v20110701

I am run three browser, IE 9,  FF 5 and latest chrome. All three
browsers receive messages and display the data.   However, is no data
is sent to the browsers after say, around 10 minutes and then data is
sent the below exception is thrown on server.

The browser's sessions are still connected.  If I refresh the page on
each and set the topic and send data again, they receive it.

Do we have to send keep alive messages to keep the connections open. If
so how often would these need to be sent.

-Dale

07:45:07.381 [Atmosphere-AsyncWrite-3] DEBUG
o.a.j.util.JerseyBroadcasterUtil - onException()
java.io.IOException: Connection closed
        at
org.atmosphere.websocket.container.Jetty8WebSocketSupport.write(Jetty8W
ebSocketSupport.java:53) ~[atmosphere-runtime-0.
8-SNAPSHOT.jar:0.8-SNAPSHOT]
        at
org.atmosphere.websocket.WebSocketHttpServletResponse$2.write(WebSocket
HttpServletResponse.java:404) ~[atmosphere-runti
me-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
        at
com.sun.jersey.spi.container.servlet.WebComponent$Writer.write(WebCompo
nent.java:305) ~[jersey-server-1.6.jar:1.6]
        at
com.sun.jersey.spi.container.ContainerResponse$CommittingOutputStream.w
rite(ContainerResponse.java:134) ~[jersey-server
-1.6.jar:1.6]
        at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
~[na:1.6.0_22]
        at
sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
~[na:1.6.0_22]
        at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
~[na:1.6.0_22]
        at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
~[na:1.6.0_22]
        at
java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
~[na:1.6.0_22]
        at java.io.BufferedWriter.flush(BufferedWriter.java:236)
~[na:1.6.0_22]
        at
com.sun.jersey.core.util.ReaderWriter.writeToAsString(ReaderWriter.java
:191) ~[jersey-core-1.6.jar:1.6]
        at
com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider.writeT
oAsString(AbstractMessageReaderWriterProvider.ja
va:128) ~[jersey-core-1.6.jar:1.6]
        at
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringP
rovider.java:88) ~[jersey-core-1.6.jar:1.6]
        at
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringP
rovider.java:58) ~[jersey-core-1.6.jar:1.6]
        at
com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.
java:306) ~[jersey-server-1.6.jar:1.6]
        at
org.atmosphere.jersey.util.JerseyBroadcasterUtil.broadcast(JerseyBroadc
asterUtil.java:59) ~[atmosphere-jersey-0.8-SNAPS
HOT.jar:0.8-SNAPSHOT]
        at
org.atmosphere.jersey.JerseyBroadcaster.broadcast(JerseyBroadcaster.jav
a:66) [atmosphere-jersey-0.8-SNAPSHOT.jar:0.8-SN
APSHOT]
        at
org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcas
ter.java:504) [atmosphere-runtime-0.8-SNAPSHOT.j
ar:0.8-SNAPSHOT]
        at
org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:523
) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPS
HOT]
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
[na:1.6.0_22]
        at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
[na:1.6.0_22]
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
[na:1.6.0_22]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecut
or.java:886) [na:1.6.0_22]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j
ava:908) [na:1.6.0_22]
        at java.lang.Thread.run(Thread.java:662) [na:1.6.0_22]
07:45:07.372 [qtp998462082-42] INFO
com.osi.pubsub.resource.JQueryPubSub -

 Broadcastable 'publishNx' Message for Topic: topci  Message Size: 289
{"id":8362,"Status":"UPDATED","Count":"2","Time
Updated":"14:32:05","Description":"","AMO
Name":"MarkIpCust1","System":"robo_93_sy
s","Alert Name":"AlertDefTestTwoX","Date Updated":"2011-07-07","Time
Created":"14:05:13","Severity":"Major","Date Created":"2011-0
7-07","AMO Class":"Customer"}


07:45:07.407 [Atmosphere-AsyncWrite-2] DEBUG
o.a.j.util.JerseyBroadcasterUtil - onException()
java.io.IOException: Connection closed
        at
org.atmosphere.websocket.container.Jetty8WebSocketSupport.write(Jetty8W
ebSocketSupport.java:53) ~[atmosphere-runtime-0.
8-SNAPSHOT.jar:0.8-SNAPSHOT]
        at
org.atmosphere.websocket.WebSocketHttpServletResponse$2.write(WebSocket
HttpServletResponse.java:404) ~[atmosphere-runti
me-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
        at
com.sun.jersey.spi.container.servlet.WebComponent$Writer.write(WebCompo
nent.java:305) ~[jersey-server-1.6.jar:1.6]
        at
com.sun.jersey.spi.container.ContainerResponse$CommittingOutputStream.w
rite(ContainerResponse.java:134) ~[jersey-server
-1.6.jar:1.6]
        at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
~[na:1.6.0_22]
        at
sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
~[na:1.6.0_22]
        at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
~[na:1.6.0_22]
        at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
~[na:1.6.0_22]
        at
java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
~[na:1.6.0_22]
        at java.io.BufferedWriter.flush(BufferedWriter.java:236)
~[na:1.6.0_22]
        at
com.sun.jersey.core.util.ReaderWriter.writeToAsString(ReaderWriter.java
:191) ~[jersey-core-1.6.jar:1.6]
        at
com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider.writeT
oAsString(AbstractMessageReaderWriterProvider.ja
va:128) ~[jersey-core-1.6.jar:1.6]
        at
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringP
rovider.java:88) ~[jersey-core-1.6.jar:1.6]
        at
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringP
rovider.java:58) ~[jersey-core-1.6.jar:1.6]
        at
com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.
java:306) ~[jersey-server-1.6.jar:1.6]
        at
org.atmosphere.jersey.util.JerseyBroadcasterUtil.broadcast(JerseyBroadc
asterUtil.java:59) ~[atmosphere-jersey-0.8-SNAPS
HOT.jar:0.8-SNAPSHOT]
        at
org.atmosphere.jersey.JerseyBroadcaster.broadcast(JerseyBroadcaster.jav
a:66) [atmosphere-jersey-0.8-SNAPSHOT.jar:0.8-SN
APSHOT]
        at
org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcas
ter.java:504) [atmosphere-runtime-0.8-SNAPSHOT.j
ar:0.8-SNAPSHOT]
        at
org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:523
) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPS
HOT]
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
[na:1.6.0_22]
        at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
[na:1.6.0_22]
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
[na:1.6.0_22]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecut
or.java:886) [na:1.6.0_22]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j
ava:908) [na:1.6.0_22]
        at java.lang.Thread.run(Thread.java:662) [na:1.6.0_22]
07:45:07.436 [Atmosphere-AsyncWrite-3] DEBUG
o.a.j.util.JerseyBroadcasterUtil - onException()
java.io.IOException: Connection closed
        at
org.atmosphere.websocket.container.Jetty8WebSocketSupport.write(Jetty8W
ebSocketSupport.java:53) ~[atmosphere-runtime-0.
8-SNAPSHOT.jar:0.8-SNAPSHOT]
        at
org.atmosphere.websocket.WebSocketHttpServletResponse$2.write(WebSocket
HttpServletResponse.java:404) ~[atmosphere-runti
me-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
        at
com.sun.jersey.spi.container.servlet.WebComponent$Writer.write(WebCompo
nent.java:305) ~[jersey-server-1.6.jar:1.6]
        at
com.sun.jersey.spi.container.ContainerResponse$CommittingOutputStream.w
rite(ContainerResponse.java:134) ~[jersey-server
-1.6.jar:1.6]
        at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
~[na:1.6.0_22]
        at
sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
~[na:1.6.0_22]
        at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
~[na:1.6.0_22]
        at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
~[na:1.6.0_22]
        at
java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
~[na:1.6.0_22]
        at java.io.BufferedWriter.flush(BufferedWriter.java:236)
~[na:1.6.0_22]
        at
com.sun.jersey.core.util.ReaderWriter.writeToAsString(ReaderWriter.java
:191) ~[jersey-core-1.6.jar:1.6]
        at
com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider.writeT
oAsString(AbstractMessageReaderWriterProvider.ja
va:128) ~[jersey-core-1.6.jar:1.6]
        at
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringP
rovider.java:88) ~[jersey-core-1.6.jar:1.6]
        at
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringP
rovider.java:58) ~[jersey-core-1.6.jar:1.6]
        at
com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.
java:306) ~[jersey-server-1.6.jar:1.6]
        at
org.atmosphere.jersey.util.JerseyBroadcasterUtil.broadcast(JerseyBroadc
asterUtil.java:59) ~[atmosphere-jersey-0.8-SNAPS
HOT.jar:0.8-SNAPSHOT]
        at
org.atmosphere.jersey.JerseyBroadcaster.broadcast(JerseyBroadcaster.jav
a:66) [atmosphere-jersey-0.8-SNAPSHOT.jar:0.8-SN
APSHOT]
        at
org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcas
ter.java:504) [atmosphere-runtime-0.8-SNAPSHOT.j
ar:0.8-SNAPSHOT]
        at
org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:523
) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPS
HOT]
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
[na:1.6.0_22]
        at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
[na:1.6.0_22]
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
[na:1.6.0_22]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecut
or.java:886) [na:1.6.0_22]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j
ava:908) [na:1.6.0_22]
        at java.lang.Thread.run(Thread.java:662) [na:1.6.0_22]
07:45:07.452 [Atmosphere-AsyncWrite-2] DEBUG
o.a.j.util.JerseyBroadcasterUtil - onException()
java.io.IOException: Connection closed
        at
org.atmosphere.websocket.container.Jetty8WebSocketSupport.write(Jetty8W
ebSocketSupport.java:53) ~[atmosphere-runtime-0.
8-SNAPSHOT.jar:0.8-SNAPSHOT]
        at
org.atmosphere.websocket.WebSocketHttpServletResponse$2.write(WebSocket
HttpServletResponse.java:404) ~[atmosphere-runti
me-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
        at
com.sun.jersey.spi.container.servlet.WebComponent$Writer.write(WebCompo
nent.java:305) ~[jersey-server-1.6.jar:1.6]
        at
com.sun.jersey.spi.container.ContainerResponse$CommittingOutputStream.w
rite(ContainerResponse.java:134) ~[jersey-server
-1.6.jar:1.6]
        at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
~[na:1.6.0_22]
        at
sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
~[na:1.6.0_22]
        at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
~[na:1.6.0_22]
        at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
~[na:1.6.0_22]
        at
java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
~[na:1.6.0_22]
        at java.io.BufferedWriter.flush(BufferedWriter.java:236)
~[na:1.6.0_22]
        at
com.sun.jersey.core.util.ReaderWriter.writeToAsString(ReaderWriter.java
:191) ~[jersey-core-1.6.jar:1.6]
        at
com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider.writeT
oAsString(AbstractMessageReaderWriterProvider.ja
va:128) ~[jersey-core-1.6.jar:1.6]
        at
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringP
rovider.java:88) ~[jersey-core-1.6.jar:1.6]
        at
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringP
rovider.java:58) ~[jersey-core-1.6.jar:1.6]
        at
com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.
java:306) ~[jersey-server-1.6.jar:1.6]
        at
org.atmosphere.jersey.util.JerseyBroadcasterUtil.broadcast(JerseyBroadc
asterUtil.java:59) ~[atmosphere-jersey-0.8-SNAPS
HOT.jar:0.8-SNAPSHOT]
        at
org.atmosphere.jersey.JerseyBroadcaster.broadcast(JerseyBroadcaster.jav
a:66) [atmosphere-jersey-0.8-SNAPSHOT.jar:0.8-SN
APSHOT]
        at
org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcas
ter.java:504) [atmosphere-runtime-0.8-SNAPSHOT.j
ar:0.8-SNAPSHOT]
        at
org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:523
) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPS
HOT]
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
[na:1.6.0_22]
        at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
[na:1.6.0_22]
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
[na:1.6.0_22]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecut
or.java:886) [na:1.6.0_22]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j
ava:908) [na:1.6.0_22]
        at java.lang.Thread.run(Thread.java:662) [na:1.6.0_22]
07:45:07.474 [Atmosphere-AsyncWrite-3] DEBUG
o.a.j.util.JerseyBroadcasterUtil - onException()
java.io.IOException: Connection closed
        at
org.atmosphere.websocket.container.Jetty8WebSocketSupport.write(Jetty8W
ebSocketSupport.java:53) ~[atmosphere-runtime-0.
8-SNAPSHOT.jar:0.8-SNAPSHOT]
        at
org.atmosphere.websocket.WebSocketHttpServletResponse$2.write(WebSocket
HttpServletResponse.java:404) ~[atmosphere-runti
me-0.8-SNAPSHOT.jar:0.8-SNAPSHOT]
        at
com.sun.jersey.spi.container.servlet.WebComponent$Writer.write(WebCompo
nent.java:305) ~[jersey-server-1.6.jar:1.6]
        at
com.sun.jersey.spi.container.ContainerResponse$CommittingOutputStream.w
rite(ContainerResponse.java:134) ~[jersey-server
-1.6.jar:1.6]
        at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
~[na:1.6.0_22]
        at
sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
~[na:1.6.0_22]
        at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
~[na:1.6.0_22]
        at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
~[na:1.6.0_22]
        at
java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
~[na:1.6.0_22]
        at java.io.BufferedWriter.flush(BufferedWriter.java:236)
~[na:1.6.0_22]
        at
com.sun.jersey.core.util.ReaderWriter.writeToAsString(ReaderWriter.java
:191) ~[jersey-core-1.6.jar:1.6]
        at
com.sun.jersey.core.provider.AbstractMessageReaderWriterProvider.writeT
oAsString(AbstractMessageReaderWriterProvider.ja
va:128) ~[jersey-core-1.6.jar:1.6]
        at
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringP
rovider.java:88) ~[jersey-core-1.6.jar:1.6]
        at
com.sun.jersey.core.impl.provider.entity.StringProvider.writeTo(StringP
rovider.java:58) ~[jersey-core-1.6.jar:1.6]
        at
com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.
java:306) ~[jersey-server-1.6.jar:1.6]
        at
org.atmosphere.jersey.util.JerseyBroadcasterUtil.broadcast(JerseyBroadc
asterUtil.java:59) ~[atmosphere-jersey-0.8-SNAPS
HOT.jar:0.8-SNAPSHOT]
        at
org.atmosphere.jersey.JerseyBroadcaster.broadcast(JerseyBroadcaster.jav
a:66) [atmosphere-jersey-0.8-SNAPSHOT.jar:0.8-SN
APSHOT]
        at
org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcas
ter.java:504) [atmosphere-runtime-0.8-SNAPSHOT.j
ar:0.8-SNAPSHOT]
        at
org.atmosphere.cpr.DefaultBroadcaster$3.run(DefaultBroadcaster.java:523
) [atmosphere-runtime-0.8-SNAPSHOT.jar:0.8-SNAPS
HOT]
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
[na:1.6.0_22]
        at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
[na:1.6.0_22]
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
[na:1.6.0_22]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecut
or.java:886) [na:1.6.0_22]
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.j
ava:908) [na:1.6.0_22]
        at java.lang.Thread.run(Thread.java:662) [na:1.6.0_22]
2011-07-07 08:03:02.228:INFO::Graceful shutdown
SelectChannelConnector@0.0.0.0:9090 STARTED
2011-07-07 08:03:02.249:INFO::Graceful shutdown
o.e.j.s.h.ContextHandler{/javadoc,file:/C:/opt/jetty/jetty-distribution
-7.4.3.v201
10701/javadoc}
2011-07-07 08:03:02.249:INFO::Graceful shutdown
o.e.j.w.WebAppContext{/,file:/C:/Users/dgh1/AppData/Local/Temp/jetty-0.
0.0.0-9090-
alert-pubsub.war-_-any-/webapp/},C:\opt\jetty\jetty-distribution-7.4.3.
v20110701/webapps/alert-pubsub.war
2011-07-07 08:03:03.265:INFO::stopped
o.e.j.w.WebAppContext{/,file:/C:/Users/dgh1/AppData/Local/Temp/jetty-0.
0.0.0-9090-alert-pubs
ub.war-_-any-/webapp/},C:\opt\jetty\jetty-distribution-7.4.3.v20110701/
webapps/alert-pubsub.war
2011-07-07 08:03:03.307:INFO::stopped
o.e.j.s.h.ContextHandler{/javadoc,file:/C:/opt/jetty/jetty-distribution
-7.4.3.v20110701/java
doc}
Reply | Threaded
Open this post in threaded view
|

Re: connect closed IO error

jfarcand
Administrator
Salut,

sound like a bug to me as Jetty should propagate the disconnect events and this exception should never occurs. I will take a look and see what I can do. Can you file a bug here:

   http://java.net/jira/secure/CreateIssue!default.jspa

Thanks

-- Jeanfrancois