# Trouble sending GELF event - Graylog

**URL:** <https://discuss.elastic.co/t/trouble-sending-gelf-event-graylog/219048>\
**Category:** Logstash\
**Created:** [February 12, 2020, 4:57pm UTC](https://discuss.elastic.co/t/trouble-sending-gelf-event-graylog/219048 "2020-02-12T16:57:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![djbrunoatimix](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@djbrunoatimix](https://discuss.elastic.co/u/djbrunoatimix)\
**Post date:** [February 12, 2020, 4:57pm UTC](https://discuss.elastic.co/t/trouble-sending-gelf-event-graylog/219048/1 "2020-02-12T16:57:55Z")

</div>

Hello guys,

Could someone help me? I am having some issue when trying to push data to Graylog.

At the moment I am testing my environment, and everything is working properly.

Filebeat -\> Logstash -\> Graylog -\> Elasticsearch

Here are my highlights:  
When I turn my Logstash instance off and few minutes later on again, Filebeat resends the data and it works fine.

When I turn my Elasticsearch instance off and few minutes later on again, Logstash resends the data and it works fine.

The problem is when I turn my Graylog off. Then my Logstash starts receiving the error:  
Trouble sending GELF event ........ (MY-MESSAGE-HERE)......... :error=\>#\<Errno::ECONNREFUSED: Connection refused - connect(2) for "localhost" port 5041\>}

This is fine, I am expecting this error to happen, but Logstash is not trying to resend the data when I turn my Graylog on again.

Could someone help me?

My Logstash Persistent Queue is also activated with the config:

# ------------ Queuing Settings --------------

queue.type: persisted  
queue.page\_capacity: 64mb  
queue.max\_bytes: 1024mb  
queue.checkpoint.writes: 1

---

<div class="post-metadata">

**Author:** ![djbrunoatimix](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@djbrunoatimix](https://discuss.elastic.co/u/djbrunoatimix)\
**Post date:** [February 20, 2020, 1:00pm UTC](https://discuss.elastic.co/t/trouble-sending-gelf-event-graylog/219048/2 "2020-02-20T13:00:16Z")

</div>

Unfortunately, Logstash and Graylog will not work how I was expecting.

Logstash and Graylog can't issue an ACK sign.

The way I solved my problem was adding a RabbitMQ in the middle and configuring Logstash to send the logs to the RabbitMQ, in order to consume the messages with Graylog.

---

<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:** [March 19, 2020, 1:00pm UTC](https://discuss.elastic.co/t/trouble-sending-gelf-event-graylog/219048/3 "2020-03-19T13:00:16Z")

</div>

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