Hello,
We are trying to explore APM and have setup Kibana, Elastic, and an APM Server Containers. In doing so, we have gotten the Kibana Server up, the Elastic Server talking to Kibana and it appears to be recognizing the APM Server. 'Check APM Server status' from Kibana says success. This message is questionable, because when the container is paused - the message still says success.
When we attempt to send data to the APM Server from Node, we receive an Error: connect ECONNREFUSED message. We are using the hapi framework and the following call is made in index.js before the server starts.
var apm = require('elastic-apm-node').start({
serviceName: 'apm-test-service',
secretToken: '',
serverUrl: '[name-of-server-removed]:42000',
});
we receive a logging error message but eventually receive the following message
Error: connect ECONNREFUSED [ip-address-removed]:42000
at Object._errnoException (util.js:1031:13)
at _exceptionWithHostPort (util.js:1052:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1195:14)
Also, may be helpful:
our apm-server.yml file looks like
Same here... using 3 Docker services in a swarm named respectively elasticsearch, kibana and apm. The first two are in the "elk" network, apm being both in the "elk" and "services" network. The goal is to create services being able to access apm, but no elasticsearch or kibana.
No problem whatsoever communicating from kibana to elasticsearch. It is reachable using http://elasticsearch:9200 and kibana can query it.
Same goes for apm output. When apm starts, logs show up to that effect in elasticsearch.
Problem is... node apps in the "services" network should be able to access apm via http://apm:8200 but they don't. The api responds inside an apm container, but no way to access it from any other container or even by the host system, which is configured to publish port 8200.
Yes, The APM Server docker image only listens on localhost:8200 by default.
We should probably change that, so it will listen on any interface by default.
In the mean time, to connect to APM Server from the outside, you'll need to pass this setting:
docker run -p 8200:8200 docker.elastic.co/apm/apm-server:6.2.4 -e -E apm-server.host=0.0.0.0:8200
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.