Ruby on Rails APM agent isn't sending data to ELK server

Kibana version : 7.8.0
Elasticsearch version : 7.8.0
APM Server version : 7.8.0
APM Gem Version : elastic-apm (0.4.3)
Ruby Version : ruby 2.1.2p95

We're using ELK open source monitoring for our infra. APM monitoring works fine with nodejs app. However this is not working for a ruby on rails application.

APM-server service is running fine.
There is no connectivity issue to ELK service as the metrics-beats service is sending datas fine.

Here is the logs:-

Sep 12 18:51:55 WebApp-Dev-01 apm-server[20945]: 2020-09-12T18:51:55.416Z#011ERROR#011[request]#011middleware/log_middleware.go:95#011404 page not found#011{"request_id": "d45b42f2-77fc-4ba0-9488-e92e778344c5", "method": "POST", "URL": "http://localhost:8200/v1/transactions", "content_length": 779256, "remote_address": "127.0.0.1", "user-agent": "elastic-apm/ruby 0.4.3", "response_code": 404, "error": "404 page not found"}

Any help would be much appreciated.

Thank you

Hi @MarkMichuda,
it looks like you are using a rather outdated version of the elastic-apm ruby gem - please update to a newer version (current 3.10.1). The version you are using is not compatible with the APM Server version 7.8.0.

Thanks @simitt for the quick answer.

I've upgraded ruby(from 2.1.2 to 2.3.0) as well as used the latest elastic-apm gem (3.10.1).

However my ruby app and apm-server are running fine with below error.

E, [2020-09-14T15:16:24.811221 #15937] ERROR -- : [ElasticAPM] Couldn't establish connection to APM Server:
"#<HTTP::Request::UnsupportedSchemeError: unknown scheme: >"

I've made sure that apm urls are added with http:// but still its not working. What could the issue here?

The error does indicate an invalid URL - please double check the configured URL; in case you are using multiple ways of configuration have a look at the configuration precedence to ensure that the intended APM Server URL is used.

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