Hi,
how did you configure the JaCoCo agent on the server? By default it only
binds to the loopback interface only and is therefore not accessible
from remote hosts. To bind to all hosts you need to configure address=*
for the agent. See documentation:
|address| IP 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/
http://www.jacoco.org/jacoco/trunk/doc/agent.html
With netstat -a you can verify to which interface the agent actually
binds (look for lines with "LISTEN").
Regards,
-marc
On 30.03.17 04:56, [email protected] wrote:
Hi,
I need a urgent to generate jacoco remote by accessing a server running
remotely. Somehow, I can access that server without authentication. I am trying
jacoco on the fly instrumentation (output=tcpserver) and trying to dump
instrumented data by running a ant task from local machine. Please see be
build.xml. Somehow I am not able to connect remote server.
I would highly appreciate any help regarding that.
<project name="JaCoCo" xmlns:jacoco="antlib:org.jacoco.ant">
<property name="result.exec.file" value="jacoco.exec"/>
<property name="server" value="remote server if" />
<property name="port" value ="6300" />
<taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
<classpath path="jacocoant.jar"/>
</taskdef>
<target name="get_data">
<jacoco:dump address="${server}" port="${port}" reset="true" append="false"
destfile="${result.exec.file}"/>
</target>
</project>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/614b00f8-8cc4-c831-a081-598e667c9ba3%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.