Hi,

-javaagent:/test/jacoco/jacocoagent.jar=output=tcpserver,address="remoteAddress"

this will not work. For address you need to specify a local interface of the server, or * to bind to all interfaces.

Regards,
-marc



On 31.03.17 18:36, [email protected] wrote:
On Thursday, March 30, 2017 at 1:19:36 AM UTC-5, Marc R. Hoffmann wrote:
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>
Thanks Marc,

Please see below jacoco agent configuration:

-javaagent:/test/jacoco/jacocoagent.jar=output=tcpserver,address="remoteAddress"

Ant task:

<target name="getdata">
       <jacoco:dump address="remoteAddress" port="6300" append="false" 
destfile="${result.exec.file}"/>
     </target>

My remote server require authentication and so I can not use ant task. As per 
documentation jacoco does not provide any authentication mechanisms. So I tried 
with jacoco java API ExecutionDataClient, I am able to run and dump 
instrumented data for local server. Now I am trying the same for remote sever. 
Can you please suggest about that.

Thanks.
Jitendra Tiwari



--
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/02bc217d-0973-1cc4-4c11-328ef1146ae9%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to