I built my NetworkClient based on grizzly framework (2.3.24) and connection
tool (MultiTool). The NetworkClient sends once 5000 same requests to tomcat
and gets only less than 5000 responses (sometimes 4957).
java.io.EOFException caused at some responses from tomcat. How can I fix
that problem?
In log-file I found error message:
15:28:34.185 [grizzly-nio-kernel(4) SelectorRunner] INFO
de.otto.tco.nc.filter.LogWithCounterFilter - LogFilter handleWrite.
Connection=TCPNIOConnection{localSocketAddress={/10.67.195.83:51324},
peerSocketAddress={/0.0.0.0:80}} message=POST
/tco_httptestservice-3.0.0-SNAPSHOT/RequestLogging HTTP/1.1
content-lenght: 6931
logformat:WHOLE_REQUEST
Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.3.6 (java 1.5)
15:28:34.185 [grizzly-nio-kernel(4) SelectorRunner] DEBUG
org.glassfish.grizzly.nio.transport.TCPNIOTransport - TCPNIOConnection
(TCPNIOConnection{localSocketAddress={/10.67.195.83:51324},
peerSocketAddress={/0.0.0.0:80}}) (plain) write 6.932 bytes
15:28:34.185 [grizzly-nio-kernel(1) SelectorRunner] DEBUG
org.glassfish.grizzly.nio.transport.TCPNIOTransport - TCPNIOConnection
(TCPNIOConnection{localSocketAddress={/10.67.195.83:51323},
peerSocketAddress={/0.0.0.0:80}}) (allocated) read exception
java.io.EOFException
at
org.glassfish.grizzly.nio.transport.TCPNIOUtils.allocateAndReadBuffer(TCPNIOUtils.java:265)
~[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.nio.transport.TCPNIOTransport.read(TCPNIOTransport.java:583)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleRead(TCPNIOTransportFilter.java:75)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.filterchain.TransportFilter.handleRead(TransportFilter.java:173)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:526)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.strategies.SameThreadIOStrategy.executeIoEvent(SameThreadIOStrategy.java:103)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:89)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:415)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:384)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:348)
[grizzly-framework-2.3.24.jar:2.3.24]
at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:279)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
[grizzly-framework-2.3.24.jar:2.3.24]
at java.lang.Thread.run(Thread.java:745) [?:1.7.0_79]
15:28:34.185 [grizzly-nio-kernel(1) SelectorRunner] INFO
de.otto.tco.nc.filter.LogWithCounterFilter - LogFilter handleClose.
Connection=TCPNIOConnection{localSocketAddress={/10.67.195.83:51323},
peerSocketAddress={/0.0.0.0:80}} message=null count=43
15:28:34.185 [grizzly-nio-kernel(5) SelectorRunner] DEBUG
org.glassfish.grizzly.nio.DefaultSelectionKeyHandler - KEY IS REGISTERED:
sun.nio.ch.SelectionKeyImpl_at_5628c7f8
15:28:34.185 [grizzly-nio-kernel(5) SelectorRunner] INFO
de.otto.tco.nc.filter.LogWithCounterFilter - LogFilter handleConnect.
Connection=TCPNIOConnection{localSocketAddress={/10.67.195.83:51325},
peerSocketAddress={/0.0.0.0:80}} message=null count=45
15:28:34.185 [grizzly-nio-kernel(1) SelectorRunner] DEBUG
org.glassfish.grizzly.filterchain.DefaultFilterChain - GRIZZLY0013:
Exception during FilterChain execution
java.io.EOFException
at
org.glassfish.grizzly.nio.transport.TCPNIOTransport.read(TCPNIOTransport.java:597)
~[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.nio.transport.TCPNIOTransportFilter.handleRead(TCPNIOTransportFilter.java:75)
~[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.filterchain.TransportFilter.handleRead(TransportFilter.java:173)
~[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
~[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
~[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
~[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:526)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.strategies.SameThreadIOStrategy.executeIoEvent(SameThreadIOStrategy.java:103)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:89)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:415)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:384)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:348)
[grizzly-framework-2.3.24.jar:2.3.24]
at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:279)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
[grizzly-framework-2.3.24.jar:2.3.24]
at
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
[grizzly-framework-2.3.24.jar:2.3.24]
at java.lang.Thread.run(Thread.java:745) [?:1.7.0_79]
15:28:34.185 [grizzly-nio-kernel(5) SelectorRunner] INFO
de.otto.tco.nc.client.ClientCallbackImpl - Writting request message for
request ID 1195e616-877e-473e-a261-dd4b5288c434. Count of written
message=4424
15:28:34.185 [grizzly-nio-kernel(5) SelectorRunner] INFO
de.otto.tco.nc.filter.LogWithCounterFilter - LogFilter handleWrite.
Connection=TCPNIOConnection{localSocketAddress={/10.67.195.83:51325},
peerSocketAddress={/0.0.0.0:80}} message=POST
/tco_httptestservice-3.0.0-SNAPSHOT/RequestLogging HTTP/1.1
content-lenght: 6931
logformat:WHOLE_REQUEST
requestNumber:1
Accept: text/xml, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Content-Type: text/xml; charset=utf-8
Content-Length: 6428
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.3.6 (java 1.5)
15:28:34.185 [grizzly-nio-kernel(5) SelectorRunner] DEBUG
org.glassfish.grizzly.nio.transport.TCPNIOTransport - TCPNIOConnection
(TCPNIOConnection{localSocketAddress={/10.67.195.83:51325},
peerSocketAddress={/0.0.0.0:80}}) (plain) write 6.932 bytes
15:28:34.185 [grizzly-nio-kernel(4) SelectorRunner] DEBUG
org.glassfish.grizzly.nio.transport.TCPNIOTransport - TCPNIOConnection
(TCPNIOConnection{localSocketAddress={/10.67.195.83:51324},
peerSocketAddress={/0.0.0.0:80}}) (allocated) read 212 bytes
15:28:34.185 [grizzly-nio-kernel(4) SelectorRunner] INFO
de.otto.tco.nc.filter.LogWithCounterFilter - LogFilter handleRead.
Connection=TCPNIOConnection{localSocketAddress={/10.67.195.83:51324},
peerSocketAddress={/0.0.0.0:80}} message=HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=3305B4D5B0B1072824181BFBD23FBD49;
Path=/tco_httptestservice-3.0.0-SNAPSHOT/; HttpOnly
Content-Length: 0
Date: Tue, 12 Jul 2016 13:28:33 GMT
count=4.385
15:28:34.185 [grizzly-nio-kernel(4) SelectorRunner] INFO
de.otto.tco.nc.client.ClientCallbackImpl - Getting response message HTTP/1.1
200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=3305B4D5B0B1072824181BFBD23FBD49;
Path=/tco_httptestservice-3.0.0-SNAPSHOT/; HttpOnly
Content-Length: 0
Date: Tue, 12 Jul 2016 13:28:33 GMT
for request ID 3a45664a-b3f2-409a-a9b1-9e0fb3b11d0c. Count of received
response=4385
15:28:34.185 [grizzly-nio-kernel(4) SelectorRunner] DEBUG
org.glassfish.grizzly.connectionpool.MultiEndpointPool - Returning
TCPNIOConnection{localSocketAddress={/10.67.195.83:51324},
peerSocketAddress={/0.0.0.0:80}} to endpoint pool
EndpointPoolImpl_at_6c5ea088{endpoint=EndpointKey{internalKey=server_0.0.0.0_port_80,
targetEndpointAddress=/0.0.0.0:80, localEndpointAddress=null,
connectorHandler=org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler_at_}
org.glassfish.grizzly.connectionpool.EndpointKey_at_22ee7b31, corePoolSize=0,
maxPoolSize=2, poolSize=2, isClosed=false}
--
View this message in context: http://grizzly.1045725.n5.nabble.com/java-io-EOFException-caused-by-sending-to-tomcat-tp5711061.html
Sent from the Grizzly - Users mailing list archive at Nabble.com.