produce exception "java.net.SocketException: Operation timed out (Read failed)" when read data from socket with jacocoagent

53 views
Skip to first unread message

aaron_z...@msn.com

unread,
Oct 9, 2019, 6:10:20 AM10/9/19
to JaCoCo and EclEmma Users
Hi all:

thanks in advance!

we are using jacoco to get code coverage, we are using jacocoagent and tcp mode.

we found that exception is produced which "java.net.SocketException: Operation timed out (Read failed)" as read data from socket sometimes.

but, the exception will not produce after re-deploying website sometimes.

I wish you could give me a hand. 



aaron_z...@msn.com

unread,
Oct 9, 2019, 6:16:18 AM10/9/19
to JaCoCo and EclEmma Users
exception stack:

java.net.SocketException: Operation timed out (Read failed)
at java.net.SocketInputStream.socketRead0(Native Method) ~[?:1.8.0_181]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) ~[?:1.8.0_181]
at java.net.SocketInputStream.read(SocketInputStream.java:171) ~[?:1.8.0_181]
at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[?:1.8.0_181]
at java.net.SocketInputStream.read(SocketInputStream.java:224) ~[?:1.8.0_181]
at java.io.FilterInputStream.read(FilterInputStream.java:83) ~[?:1.8.0_181]
at org.jacoco.core.data.ExecutionDataReader.read(ExecutionDataReader.java:83) ~[org.jacoco.core-0.8.3.jar:?]


在 2019年10月9日星期三 UTC+8下午6:10:20,aaron_z...@msn.com写道:

Evgeny Mandrikov

unread,
Oct 9, 2019, 6:17:12 PM10/9/19
to JaCoCo and EclEmma Users
Hi,

Don't know how anyone can help you without access to your environment and process of deployment,
because error message clearly indicates network problem,
and regarding network there is no magic in JaCoCo - it uses standard network sockets.

aaron_z...@msn.com

unread,
Oct 10, 2019, 12:23:00 AM10/10/19
to JaCoCo and EclEmma Users
thanks, i continue to check our environment, i guess environment matter, too.

在 2019年10月10日星期四 UTC+8上午6:17:12,Evgeny Mandrikov写道:

Aaron zhang

unread,
Dec 17, 2019, 11:53:12 PM12/17/19
to JaCoCo and EclEmma Users
Hi:

The error is still reproduction. 

After a period of execution time, we will get socket timeout or connection reset error.
we used wireshark to get tcp package, found all of TCP re-transmission.  

More steps:
1. We wrote a simple socket server, put it in tested server, it can work, so should not be tested server environment reason.
2. We used jacococli.jar to get coverage from same tested server, and got same error
3. Be able to telnet 6300 successfully.
4. indeed, re-deploy

Above of all, We think that error should be in agent server. but, we didn't know the reason. 

This will be the best if agent has log.

I have a doubt, if jacoco agent is always running  status, it will save more and more information in memory, when occupying memory are very big,  error will be produced, sorry, i only suspect it .

This will be the best if agent has log.

BR,
Bo






在 2019年10月9日星期三 UTC+8下午6:10:20,Aaron zhang写道:

Aaron zhang

unread,
Dec 18, 2019, 2:21:32 AM12/18/19
to JaCoCo and EclEmma Users
sorry,4. Indeed, re-deploy can resolve socket time out the error 

在 2019年12月18日星期三 UTC+8下午12:53:12,Aaron zhang写道:
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages