Connecting to localhost/127.0.0.1:8720 Connection refused

44 views
Skip to first unread message

Swaroop Jagadeesh

unread,
Oct 16, 2020, 7:01:07 AM10/16/20
to JaCoCo and EclEmma Users
Hi everyone,

I'm using jacoco with port forwarding on k8s and my use-case is that my services run on kube, there a port listens and stores coveragedump, I’m forwarding that port from kube to a local port on Jenkins, but when I’m collecting data from local port, it says connection refused.
I’m forwarding data on 36320, 36321 & 36323 of kube to 8720, 8721 & 8722 respectively. On these ports, jacoco agent is listening to our services.

Commands I'm using:

Port Forward:
kubectl port-forward -n test-ns --pod-running-timeout=4h $(kubectl get pods -n test-ns -o=name | grep test-env) 8721:36321 &

Take Data Dump:
mvn -s $JENKINS_HOME/.m2/amap-new_settings.xml -Dsettings.security=$JENKINS_HOME/.m2/settings-security.xml -Pcoverage jacoco:dump@integration-test -Dapp.host=localhost -Dapp.port=8721 -Dskip.dump=false

I suspect that there's some issue with the communication between the ports, but I'm unable to put a finger on the problem.

Please let me know what the issue could be or how I can troubleshoot it further. Thanks in advance.

Regards,
Swaroop

Reply all
Reply to author
Forward
0 new messages