'agent tcpserver' failed to open the port

23 views
Skip to first unread message

青梅煮酒

unread,
Sep 11, 2021, 7:00:07 AM9/11/21
to JaCoCo and EclEmma Users
my demo:

demo.png

use 'ss -tanl' 
no 6330
ss.png
curl 80
curl.png
so dump failed
cli.png
what did I do wrong
Message has been deleted

青梅煮酒

unread,
Sep 11, 2021, 7:04:16 AM9/11/21
to JaCoCo and EclEmma Users
java -jar demo-0.0.1-SNAPSHOT.jar -javaagent:/root/jacoco-0.8.7/lib/jacocoagent.jar=includes=*,output=tcpserver,port=6330,address=127.0.0.1,append=true

青梅煮酒

unread,
Sep 11, 2021, 7:06:25 AM9/11/21
to JaCoCo and EclEmma Users
the startup command in the picture seems to have some problems, but I try again with the correct command, which is still the case

Marc Hoffmann

unread,
Sep 11, 2021, 11:36:23 AM9/11/21
to JaCoCo and EclEmma Users
Hi,

the -javaagent parameter needs to be defined before the -jar option to be recognised as a VM option. Everything after the -jar option is considered a program parameter and simply passed to the main() method.

Therfore the correct command line is:

java -javaagent:/root/jacoco-0.8.7/lib/jacocoagent.jar=includes=*,output=tcpserver,port=6330,address=127.0.0.1,append=true -jar demo-0.0.1-SNAPSHOT.jar 

Regards,
-marc

On 11. Sep 2021, at 13:00, 青梅煮酒 <qingm...@gmail.com> wrote:

my demo:

<demo.png>

use 'ss -tanl' 
no 6330
<ss.png>
curl 80
<curl.png>
so dump failed
<cli.png>
what did I do wrong

--
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/426e6c7c-e560-4911-8155-22872f9baa4bn%40googlegroups.com.
<cli.png><curl.png><demo.png><ss.png>

青梅煮酒

unread,
Sep 12, 2021, 8:45:46 PM9/12/21
to JaCoCo and EclEmma Users
thank you very much. I'm an operation and maintenance engineer, so I don't know much about Java

thanks again
Reply all
Reply to author
Forward
0 new messages