Lab 5.2: Connection refused running for java application - PetClinicApplication

This is an error in the Lab version:

Steps to reproduce:

  1. login to lab
  2. ssh petclinic-server
  3. pkill java
  4. run the java application (refer Lab 5.2: Services Layer of the Lab Guide: Elastic Observability Engineer

The following error is encountered and Kibana shows no data in APM for
INFO PetClinicApplication - Started PetClinicApplication in 27.884 seconds (JVM running for 58.674)

2021-02-04 02:00:44.057 [elastic-apm-server-reporter] ERROR - Failed to handle event of type METRICS with this error: Connection refused (Connection refused)

2021-02-04 02:00:44.057 [elastic-apm-server-reporter] INFO - Backing off for 1 seconds (+/-10%)

2021-02-04 02:01:14.059 [elastic-apm-server-reporter] ERROR - Failed to handle event of type METRICS with this error: Connection refused (Connection refused)

Any clues?

Hi @Stud21 ,

I don't know (nor can access) this lab environment, but you should be able to find help in the troubleshooting section of our documentation.

This kind of error often appears when Kibana / APM server / Elasticsearch is not running, thus maybe if Elasticsearch was running on the same host your pkill command also terminated Elasticsearch process.

HI Sylvan,
I had Elasticsearch and Kibana working at the time; no issues. However, as stated in the tutorial I followed the steps to view the data in Kibana-APM, I could only view the petclinic-node. I was not able to view the petclicnic-java and even the petclinic-address-finder links as stated in training (shown below).

Seems like the connection was broken or not allowed. Anyone in Infra you can check there with?


FYI I've transferred this topic to a different section so that you can get help on the Training material/environment.

Hi @Stud21

it looks like the address-finder container is not running. Please try restarting it with the following command line: docker restart address-finder.


Hi @Stud21

if you are still having issues after restarting the Java application that is probably because the APM Server is not running or has a misconfiguration.

Please check steps 4, 5, and 6 from lab 5.1 to make sure APM Server is running and has the same configuration from exercises.


Hi Andre,
Running docker restart address-finder worked.

1 Like