Error trying to connect to APM Server

Kibana version:
7.16.3

Elasticsearch version:
7.16.3

APM Server version:
7.16.3

APM Agent language and version:
Java, 1.30.1

Fresh install or upgraded from other version?
Fresh

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
I have spring boot project with apm-agent dependency, i started my app but there is error - Connection refused, I cannot connect to APM server. Also i'm thinking about apm server certificate, should I add it somewhere?

application.properties:
image
init function:


@Configuration:

Provide logs and/or server output (if relevant):
ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Error trying to connect to APM Server at http://localhost:8200/intake/v2/events. Although not necessarily related to SSL, some related SSL configurations corresponding the current connection are logged at INFO level.
ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Failed to handle event of type JSON_WRITER with this error: Connection refused (Connection refused)
java.net.ConnectException: Connection refused (Connection refused)

Hi and welcome to our forum :wave:

Since you are using HTTP to communicate with the APM Server, it shouldn't be related to SSL/TLS.
Most likely the APM Server is not reachable at http://localhost:8200 from your application host. Try curl to verify it is accessible from where the agent is deployed first.
Also, check out our troubleshooting guide.

If you did add the agent as a dependency, then you should remove it. If you added the apm-agent-attach as a dependency, then that's OK.

Make sure to go over our setup guide and the rest of the agent documentation.
I hope you can find most answers there, let us know if not.

Hello again,
So maybe I will share my configuration with more details.
I'm using maven,java and spring
This is my apm-agent attach dependency:
image
Checking with guide I also have application.properties:


Here i got my Config:

In which i have method with attaching properties:

And I still have my problem

:point_up:

And if i change to HTTPS connection where I should add my certs considering I'm using agent attach dependency in spring boot? :slight_smile:

Seriously, check out our docs, they are a good resource

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.