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

**URL:** <https://discuss.elastic.co/t/ruby-on-rails-apm-agent-isnt-sending-data-to-elk-server/248416>\
**Category:** APM\
**Tags:** ruby\
**Created:** [September 12, 2020, 6:55pm UTC](https://discuss.elastic.co/t/ruby-on-rails-apm-agent-isnt-sending-data-to-elk-server/248416 "2020-09-12T18:55:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarkMichuda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markmichuda/32/46276_2.png) [@MarkMichuda](https://discuss.elastic.co/u/MarkMichuda)\
**Post date:** [September 12, 2020, 6:55pm UTC](https://discuss.elastic.co/t/ruby-on-rails-apm-agent-isnt-sending-data-to-elk-server/248416/1 "2020-09-12T18:55:39Z")

</div>

**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

---

<div class="post-metadata">

**Author:** ![simitt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simitt/32/106406_2.png) [@simitt](https://discuss.elastic.co/u/simitt)\
**Post date:** [September 14, 2020, 6:18am UTC](https://discuss.elastic.co/t/ruby-on-rails-apm-agent-isnt-sending-data-to-elk-server/248416/2 "2020-09-14T06:18:21Z")

</div>

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`.

---

<div class="post-metadata">

**Author:** ![MarkMichuda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markmichuda/32/46276_2.png) [@MarkMichuda](https://discuss.elastic.co/u/MarkMichuda)\
**Post date:** [September 14, 2020, 3:19pm UTC](https://discuss.elastic.co/t/ruby-on-rails-apm-agent-isnt-sending-data-to-elk-server/248416/3 "2020-09-14T15:19:56Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![simitt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simitt/32/106406_2.png) [@simitt](https://discuss.elastic.co/u/simitt)\
**Post date:** [September 15, 2020, 1:03pm UTC](https://discuss.elastic.co/t/ruby-on-rails-apm-agent-isnt-sending-data-to-elk-server/248416/4 "2020-09-15T13:03:29Z")

</div>

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](https://www.elastic.co/guide/en/apm/agent/ruby/current/configuration.html#configuration-precedence) to ensure that the intended APM Server URL is used.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 13, 2020, 1:03pm UTC](https://discuss.elastic.co/t/ruby-on-rails-apm-agent-isnt-sending-data-to-elk-server/248416/5 "2020-10-13T13:03:31Z")

</div>

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