Elastic agents are failing to connect with elastic apm server

I Have configured Elastic APM on filebeat server. In Java_OPTS configured jar file. How ever i am seeing 2 errors when the agent is trying to make POST calls.

Feb 13 06:15:37 ip-10-0-1-5.us-west-2.compute.internal server[14039]: 2023-02-13 06:15:37,676 [elastic-apm-server-reporter] ERROR co.elastic.apm.agent.report.AbstractIntakeApiHandler - Error trying to connect to APM Server at  http://10.0.1.180:8200/intake/v2/events. Although not necessarily related to SSL, some related SSL configurations corresponding the current connection are logged at INFO level.

FEb 13 06:15:37 ip-10-0-1-5.us-west-2.compute.internal server[14039]: 2023-02-13 06:15:37,677 [elastic-apm-server-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Failed to handle event of type TRANSACTION with this error: Connection refused (Connection refused)

How ever i am able to connect from agent node, on 8200 port it is giving me 200 codes.

curl -v http://10.0.1.180:8200/
*   Trying 10.0.1.180:8200...
* Connected to 10.0.1.180 (10.0.1.180) port 8200 (#0)
> GET / HTTP/1.1
> Host: 10.0.1.180:8200
> User-Agent: curl/7.79.1
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json
< X-Content-Type-Options: nosniff
< Date: Mon, 13 Feb 2023 11:46:56 GMT
< Content-Length: 125
< 
{
  "build_date": "2021-07-29T19:55:24Z",
  "build_sha": "af26b5a744b6af9bcccb04fade6435241ab91f43",
  "version": "7.14.0"
}
* Connection #0 to host 10.0.1.180 left intact

Have you done that curl from the same host that is running the agent?

yes.. from the same host.

Is the jvm running directly on the host or in a container on that host?

I am running on the AWS beanstalk EC2 instance, it is directly running on the host.

What is the agent version and configuration, is there a proxy in the comms there, can you run the agent in DEBUG and look for errors, are you only seeing those two lines or does this error repeat, there should be regular comms attempts from the agent not just once

It's really strange!!!
Actually i have 2 setup running 1 in QA running as standalone mode (This is where i am seeing the above issue).

In prod set up i am using cluster mode there my application able to connect with APM interface as soon as i hit the url.

This is resolved.

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