Kibana version:
8.11.1
Elasticsearch version:
8.11.1
APM Server version:
8.11.1
APM Agent language and version:
Nodejs v17.9.1 && elastic-apm-node 4.2.0
Browser version:
Original install method (e.g. download page, yum, deb, from source, etc.) and version:
Docker-compose
Fresh install or upgraded from other version?
Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.
Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
I configured ES, KIBANA and APM-SERVER with docker-compose. When Im trying to run app it throws: "APM Server transport error (503): Unexpected APM Server response when polling config\nAgent configuration infrastructure is not ready. Please retry later."
Steps to reproduce:
- Nodejs code:
var apm = require("elastic-apm-node").start({
serviceName: "my-service-name",
secretToken: "",
serverUrl: "http://127.0.0.1:8200",
environment: "my-environment",
});
- node index.js
Errors in browser console (if relevant):
Provide logs and/or server output (if relevant):
Nodejs Express app logs:
{"log.level":"info","@timestamp":"2023-11-30T19:20:54.100Z","log.logger":"elastic-apm-node","ecs.version":"8.10.0","agentVersion":"4.2.0","env":{"pid":31404,"proctitle":"node","os":"linux 4.15.0-213-generic","arch":"x64","host":"joerecra-HP-ProBook-450-G5","timezone":"UTC-0500","runtime":"Node.js v14.15.1"},"config":{"environment":{"source":"start","value":"my-environment"},"logLevel":{"source":"default","value":"info","commonName":"log_level"},"serverUrl":{"source":"start","value":"http://127.0.0.1:8200/","commonName":"server_url"},"secretToken":{"source":"start","value":"[REDACTED]","commonName":"secret_token"},"serviceName":{"source":"start","value":"my-service-name","commonName":"service_name"},"serviceVersion":{"source":"default","value":"1.0.0","commonName":"service_version"}},"activationMethod":"require","message":"Elastic APM Node.js Agent v4.2.0"} {"log.level":"error","@timestamp":"2023-11-30T19:20:54.220Z","log.logger":"elastic-apm-node","ecs.version":"8.10.0","message":"APM Server transport error (503): Unexpected APM Server response when polling config\nAgent configuration infrastructure is not ready. Please retry later."}
curl -v -X POST http://localhost:8200/
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8200 (#0)
> POST / HTTP/1.1
> Host: localhost:8200
> User-Agent: curl/7.58.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< X-Content-Type-Options: nosniff
< Date: Thu, 30 Nov 2023 19:28:34 GMT
< Content-Length: 151
<
{
"build_date": "2023-11-07T18:53:29Z",
"build_sha": "f0dee4830530d39e136f3e88ee45ab20cfacc241",
"publish_ready": false,
"version": "8.11.1"
}
{"log.level":"info","@timestamp":"2023-11-30T19:17:20.728Z","log.origin":{"file.name":"beatcmd/beat.go","file.line":139},"message":"Home path: [/usr/share/apm-server] Config path: [/usr/share/apm-server] Data path: [/usr/share/apm-server/data] Logs path: [/usr/share/apm-server/logs]","service.name":"apm-server","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2023-11-30T19:17:20.728Z","log.origin":{"file.name":"beatcmd/beat.go","file.line":146},"message":"Beat ID: fcaa31e3-06d9-4b52-bb83-8961b6b86b7d","service.name":"apm-server","ecs.version":"1.6.0"}
{"log.level":"info","@timestamp":"2023-11-30T19:17:20.728Z","log.logger":"esclientleg","log.origin":{"file.name":"eslegclient/connection.go","file.line":122},"message":"elasticsearch url: https://elasticsearch:9200","service.name":"apm-server","ecs.version":"1.6.0"}
Some apm-server logs errors:
{"log.level":"info","@timestamp":"2023-11-30T19:26:34.143Z","log.logger":"request","log.origin":{"file.name":"middleware/log_middleware.go","file.line":61},"message":"request accepted","service.name":"apm-server","url.original":"/intake/v2/events","http.request.method":"POST","user_agent.original":"apm-agent-nodejs/4.2.0 (my-service-name 1.0.0)","source.address":"192.168.224.1","http.request.id":"bcd0cca7-4f70-459b-b314-66cb4f6769b9","event.duration":10001863299,"http.response.status_code":202,"ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2023-11-30T19:26:36.875Z","log.logger":"agentcfg","log.origin":{"file.name":"agentcfg/elasticsearch.go","file.line":150},"message":"refresh cache error: context deadline exceeded","service.name":"apm-server","ecs.version":"1.6.0"}
{"log.level":"error","@timestamp":"2023-11-30T19:26:44.518Z","log.logger":"beater","log.origin":{"file.name":"beater/waitready.go","file.line":64},"message":"precondition failed: x509: certificate signed by unknown authority","service.name":"apm-server","ecs.version":"1.6.0"}