jacoco dump is not returning

162 views
Skip to first unread message

Gail Stewart

unread,
Aug 20, 2014, 5:03:59 PM8/20/14
to jac...@googlegroups.com
I am trying to get coverage results from tests run in tomcat.  I am using ant and the jacoco ant tasks to define the agent.
The value of the agent property is as follows, and it is passed vy JAVA_OPTS to tomcat
-javaagent:/tmp/jacocoagent6518525569979176026.jar=append=true,includes=com.demandware*:dw*:TopLevel*,output=tcpserver,address=*,port=6000

when I do netstat -ano I see the following line.
tcp        0      0 :::6000                     :::*                        LISTEN   

When ant calls the dump task it just hangs.  I don't see  data being written to the file and the call does not return to the ant script.

This is the ant call
<jacoco:dump address="*" port="${jacoco.tcpport}" reset="true" dump="${do.coverage.it}" destfile="${dw.global.jacoco.it.coverage.file}" append="true"/>
These are the values (I echo them to the log)
jacoco:dump address=* port=6000 dump=true append=true destfile=/srv/jenkins/workspace/gstewart.ecom.coverage/server/build/reports/tests/int/it-jacoco.exec

How do I troubleshoot this?  What should I be doing differently?
Thanks
Gail

Marc R. Hoffmann

unread,
Aug 21, 2014, 12:31:43 AM8/21/14
to jac...@googlegroups.com
Hi Gail,

the only thing that looks strange to me is address="*" for the dump command. I don't think this is a propert target address. You better set a actual target ip address or name (or maybe just "localhost" depending on your setup).

To troubleshoot this please create a stack dump from the hanging Ant script (CTRL+C on Windows, debugger, JConsole, jstack, etc) so you can see where it actually hangs.

Cheers,
-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.
For more options, visit https://groups.google.com/d/optout.

Gail Stewart

unread,
Aug 21, 2014, 7:46:18 AM8/21/14
to jac...@googlegroups.com
Thanks.  I will get a stack dump.  The doc says an asterisk is allowed, but I will try again with a specific ip.


--
You received this message because you are subscribed to a topic in the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jacoco/-OLAfAAX-pA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jacoco+un...@googlegroups.com.

Marc Hoffmann

unread,
Aug 21, 2014, 8:10:14 AM8/21/14
to jac...@googlegroups.com
Ups, that is an error that should be corrected in documentation. Can you
please tell me where the documentations says that "*" is allowed for the
address attribute of the dump task?

Thx,
-marc
>>> dump="${do.coverage.it [1]}"
>>> destfile="${dw.global.jacoco.it.coverage.file}" append="true"/>
>>> These are the values (I echo them to the log)
>>> jacoco:dump address=* port=6000 dump=true append=true
>>>
>>
> destfile=/srv/jenkins/workspace/gstewart.ecom.coverage/server/build/reports/tests/int/it-jacoco.exec
>>>
>>>
>>> How do I troubleshoot this?  What should I be doing differently?
>>> Thanks
>>> Gail --
>>> 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.
>>>
>>> For more options, visit https://groups.google.com/d/optout [2].
>>
>> --
>> You received this message because you are subscribed to a topic in
>> the Google Groups "JaCoCo and EclEmma Users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/jacoco/-OLAfAAX-pA/unsubscribe
>> [3].
>> To unsubscribe from this group and all its topics, send an email to
>> jacoco+un...@googlegroups.com.
>> 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.
> For more options, visit https://groups.google.com/d/optout [2].
>
>
> Links:
> ------
> [1] http://do.coverage.it
> [2] https://groups.google.com/d/optout
> [3] https://groups.google.com/d/topic/jacoco/-OLAfAAX-pA/unsubscribe

Gail Stewart

unread,
Aug 26, 2014, 4:10:02 PM8/26/14
to jac...@googlegroups.com
http://www.eclemma.org/jacoco/trunk/doc/ant.html

addressIP address or hostname to bind to when the output method is tcpserver or connect to when the output method is tcpclient. In tcpserver mode the value "*" causes the agent to accept connections on any local address.loopback interface
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages