Ruby Agent Failed posting (EOFError)

I am not sure what is wrong with my current setup. I get the following log when I am trying to send an event.

2018-05-31 18:00:37.435499 D [57163:70296031926600] Rails -- [ElasticAPM] Booting worker
2018-05-31 18:00:53.980171 F [57163:70296130955860 log.rb:33] Rails -- [ElasticAPM] Failed posting: #<EOFError: end of file reached>
2018-05-31 18:00:53.980306 D [57163:70296130955860] Rails -- [ElasticAPM]

I've setup elasticsearch, kibana, and apm server in docker. In Kibana the Check APM Server status does return success.

My yml

server_url: 'http://localhost:8200'
enabled_environments:
  - 'production'
  - 'development'

curl url returns empty response

$ curl http://localhost:8200
curl: (52) Empty reply from server

Hi,
at the moment the APM Server docker image listens on localhost:8200 by default. This is going to be changed in the future, so that the APM Server will listen on all interfaces.

For now you can pass the following setting for connecting to the APM Server:

docker run -p 8200:8200 docker.elastic.co/apm/apm-server:6.2.4 -e -E apm-server.host=0.0.0.0:8200

Another possibility is to change the apm-server.host setting accordingly in the apm-server.yml and bind-mount it . See Running APM Server on Docker.

I hope this helps!

What Silvia said. Also; the EOFErrors usually come from (too) large payloads. These can be shrunk significantly by turning on sampling with config.transaction_sample_rate = 0.1 for example.

Thanks. I've updated apm-server.yml to include it and it now works

apm-server:
  host: 0.0.0.0:8200

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