Can we push the data to server after several hours using the current tcpclient mode?

72 views
Skip to first unread message

van basten

unread,
Oct 21, 2016, 1:27:07 AM10/21/16
to JaCoCo and EclEmma Users

The problem for our environment is the network very unstable, alwasy lost connection after one hour.

As you know, for tcpclient mode, the socket between jacoco agent and the server is always connected.

Why we do not use the tcpserver mode? since we do not know how many machines installed jacoco agent, we need use the tcpclient mode to automatically connect to the server, then we can know.

any unclear, please let me know.

Marc R. Hoffmann

unread,
Oct 21, 2016, 2:29:23 AM10/21/16
to jac...@googlegroups.com
Hi,

to get an better picture what actually happens: Can you please provide the Java exceptions that JaCoCo prints to syserr when the connection gets disconnected?

So what behavior do you expect from JaCoCo in tcpclientmode? Reconnect after failure?

Regards,
-marc
--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/36132c30-7f92-40fe-8cdf-0237286a148e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

van basten

unread,
Oct 21, 2016, 2:56:19 AM10/21/16
to JaCoCo and EclEmma Users
Attached the server code. at line 154, "while (reader.read()) {" it will throw

java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(SocketInputStream.java:196)
        at java.net.SocketInputStream.read(SocketInputStream.java:122)
        at java.net.SocketInputStream.read(SocketInputStream.java:210)
        at java.io.DataInputStream.readByte(DataInputStream.java:265)
        at org.jacoco.core.data.ExecutionDataReader.read(ExecutionDataReader.java:82)
        at ExecutionDataServerWithDumpTimer$Handler.run(ExecutionDataServerWithDumpTimer.java:152)
        at java.lang.Thread.run(Thread.java:812)

as you can see, the reader keep the connection, always read the data from jacoco agent. my question is if reconnection, will the bytes that already read into the the server lost? since these data did not flush into the local file, also for the data not sent successfully will still store on the agent? 



在 2016年10月21日星期五 UTC+8下午2:29:23,Marc R. Hoffmann写道:
ExecutionDataServerWithDumpTimer.java

van basten

unread,
Oct 21, 2016, 3:00:01 AM10/21/16
to JaCoCo and EclEmma Users
also the data should be broken, not in block.

在 2016年10月21日星期五 UTC+8下午2:56:19,van basten写道:

Marc Hoffmann

unread,
Oct 21, 2016, 6:54:34 AM10/21/16
to jac...@googlegroups.com
Hi,

I was asking for the exception seen on stderr on the application under
test (where the JaCoCo agent is running).

Regards,
-marc
>>> [1].
>>> For more options, visit https://groups.google.com/d/optout [2].
>
> --
> You received this message because you are subscribed to the Google
> Groups "JaCoCo and EclEmma Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jacoco+un...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jacoco/ba5a196d-61fb-4975-9d91-db6fba481375%40googlegroups.com
> [3].
> For more options, visit https://groups.google.com/d/optout.
>
>
> Links:
> ------
> [1]
> https://groups.google.com/d/msgid/jacoco/36132c30-7f92-40fe-8cdf-0237286a148e%40googlegroups.com?utm_medium=email&utm_source=footer
> [2] https://groups.google.com/d/optout
> [3]
> https://groups.google.com/d/msgid/jacoco/ba5a196d-61fb-4975-9d91-db6fba481375%40googlegroups.com?utm_medium=email&utm_source=footer
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages