I have a server running on a remote computer and have installed the APM agent on another computer with Flask installed. But for some reason I keep getting this error on the client:
Connection to APM Server timed out (url:http://134.446.25.12:8200'/v1/transactions, timeout: None seconds)
Failed to submit message: ''
Here is the sample flask code that I'm trying to run:
from flask import Flask
from elasticapm.contrib.flask import ElasticAPM
from flask import abort
one possible cause is that the apm-server on your other machine isn't bound to listen to external connections. By default, the apm-server only binds to localhost. You can change that by using the -E apm-server.host option:
./apm-server -e -E apm-server.host=0.0.0.0:8200
Note however that this will expose your apm-server to any other machine that can reach that IP address, so we suggest to use https and a secret token to secure your apm-server. See https://www.elastic.co/guide/en/apm/server/current/security.html for more information.
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.