Giter VIP home page Giter VIP logo

Comments (5)

trentm avatar trentm commented on June 25, 2024

The first log message:

"APM Server transport error: error fetching APM Server version: timeout (30000ms) fetching APM Server version"

is saying that the APM agent running in your app got a timeout talking to your configured APM Server URL.
The very first log message from the APM agent will include a dump of its configuration -- which will show what it things its serverUrl value is.

For some reason, that serverUrl is not responding to requests. It looks like it is connecting to that URL, otherwise the error would be ECONNREFUSED.

Are you able to manually run a command from the same machine/VM/container where the APM agent is running? If so, this should be the equivalent of the first request the APM agent is attempting:

curl -v $serverUrl/

A possibility could be that your APM server is down, but I'm not positive. Are you able to look at your APM server logs?

from apm-agent-nodejs.

kizzuc25 avatar kizzuc25 commented on June 25, 2024

hi
If you run the curl command in docker by specifying the IP and port of the APM server, you can see the response.
However, I cannot retrieve server information using the command you sent.
Do I need to specify a serverUrl value?

thank you

from apm-agent-nodejs.

trentm avatar trentm commented on June 25, 2024

Do I need to specify a serverUrl value?

Yes, you need to fill that in with the URL for your APM server. For example, the APM server URL for a deployment of mine on cloud.elastic.co is https://trentm-deployment17.apm.us-west1.gcp.cloud.es.io. For me, running that command gives a response like this:

% curl -i https://trentm-deployment17.apm.us-west1.gcp.cloud.es.io/
HTTP/2 200
date: Tue, 21 May 2024 21:28:53 GMT
x-cloud-request-id: TqX8ENw4QQeycOWecjqMwg
x-content-type-options: nosniff
x-found-handling-cluster: e1271517748b49929a101be02c2966c3
x-found-handling-instance: instance-0000000000
content-length: 0

from apm-agent-nodejs.

kizzuc25 avatar kizzuc25 commented on June 25, 2024

My apm server doesn't have a specific url.
I am also making requests via IP from apm/client in a different environment.
However, other environments are normal.

# curl -i http://10.10x.x0.x35:8200
HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
Date: Wed, 22 May 2024 01:59:49 GMT
Content-Length: 150

{
  "build_date": "2023-01-31T04:33:06Z",
  "build_sha": "71a8b4c241eb5b4609862c8354d2aa2270f6c568",
  "publish_ready": true,
  "version": "7.17.9"
}

from apm-agent-nodejs.

trentm avatar trentm commented on June 25, 2024

If you run the curl command in docker by specifying the IP and port of the APM server, you can see the response.

Can you confirm that the IP and port that works for you is the same as the serverUrl you are using for the Node.js APM agent config in that Docker container?

I'm not sure what else to say. The APM agent is configured with a URL to talk to the APM server (https://www.elastic.co/guide/en/apm/agent/nodejs/current/configuration.html#server-url). From within that container that is running your app, a simple HTTP GET request to that URL fails.

from apm-agent-nodejs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.