# Logstash hanged, cant be even restarted, Elastic output plugin might be the rascal?

**URL:** <https://discuss.elastic.co/t/logstash-hanged-cant-be-even-restarted-elastic-output-plugin-might-be-the-rascal/294732>\
**Category:** Logstash\
**Created:** [January 18, 2022, 7:19pm UTC](https://discuss.elastic.co/t/logstash-hanged-cant-be-even-restarted-elastic-output-plugin-might-be-the-rascal/294732 "2022-01-18T19:19:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stillfreem](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stillfreem/32/85628_2.png) [@stillfreem](https://discuss.elastic.co/u/stillfreem)\
**Post date:** [January 18, 2022, 7:19pm UTC](https://discuss.elastic.co/t/logstash-hanged-cant-be-even-restarted-elastic-output-plugin-might-be-the-rascal/294732/1 "2022-01-18T19:19:16Z")

</div>

Hi,

I've a configuration that reads from a file and gets its content to a data stream in Elastic.  
My setup is like that:

I have a conf file under `/etc/logstash/conf.d/` that listens on a port to get the logs and writes them to the file in question.

```auto
input {
    syslog {
      host => "127.0.0.1"
      port => 5005
    }
}

filter
{
        if [program] =~ "box_Firewall" {}
        else { drop{} }
}

output
        {
                stdout{}
                file
                {
                        path => "/var/log/barracuda-firewall.log"
                }
        }

```

I have a second conf file that I start manually using `/usr/share/logstash/bin/logstash -f myconf.conf` and this one is reading the file and get the events to Elastic.

```auto
input {
        file
             {
             path => "/var/log/barracuda-firewall.log"
             start_position => beginning
             }
        stdin{}
}

filter
{
        mutate { rename => { "[host]" => "[host][name]" } }
}

output
{
        elasticsearch
        {
                cloud_id => "XXX"
                cloud_auth => "XXX"
                index => "logs-barracuda-custom-default"
                ssl => true
                ssl_certificate_verification => false
                cacert => "/usr/local/share/ca-certificates/ca_elasticsearch.crt"
                http_compression => true
                manage_template => false
                action => "create"
                pipeline => "test1"
        }
}

```

Now, the first time I manually started the second conf, it worked and I stopped it to review m ylogs in Elastic that looks just exactly I wanted them, the second time I manually started the conf file something happened and I started receiving errors and Logstash seems to have freeze.

Currently, I cant even restart it using `systemctl restart logstash` as the command would just hang.  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/0/707585fc4d9dcd63ebd6f63063bd421ac63a75aa.png)

In the logs I can see the following ERRORS

`Jan 18 20:03:47 daesoc01 logstash[2765162]: [2022-01-18T20:03:47,782][INFO][logstash.outputs.elasticsearch][elastic][b1701058e8062b09183c724fca435cfc55d34ddef7a2704e2c79696cbd4d3d4e] Retrying failed action {:status=>500, :action=>[>"create", {:_id=>nil, :_index=>"logs-barracuda-custom-default", :routing=>nil, :pipeline=>"test1"}, {"@version"=>"1", "path"=>"/var/log/barracuda-firewall.log", "message"=>"{\"@version\":\"1\",\"logsource\":\"127.0.0.1\",\"facility\>`

`Jan 18 20:03:47 daesoc01 logstash[2765162]: [2022-01-18T20:03:47,782][INFO][logstash.outputs.elasticsearch][elastic][b1701058e8062b09183c724fca435cfc55d34ddef7a2704e2c79696cbd4d3d4e] Retrying individual bulk actions that failed or were rejected by the previous bulk request {:count=>6}`

---

<div class="post-metadata">

**Author:** ![stillfreem](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stillfreem/32/85628_2.png) [@stillfreem](https://discuss.elastic.co/u/stillfreem)\
**Post date:** [January 18, 2022, 7:26pm UTC](https://discuss.elastic.co/t/logstash-hanged-cant-be-even-restarted-elastic-output-plugin-might-be-the-rascal/294732/2 "2022-01-18T19:26:22Z")

</div>

This one is constanly showing up and I guess this is my proglem, but why is that and how to restart Logstash remains mystery tome, please help me out here 🙂

```auto
[2022-01-18T20:25:07,941][INFO][logstash.outputs.elasticsearch] Retrying individual bulk actions that failed or were rejected by the previous bulk request {:count=>6}

```

Also the logstash service is on Deactivating state

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/d/3dd63ce8972e5da51faae86afab0e8b5547050fb.png)

---

<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:** [February 15, 2022, 7:26pm UTC](https://discuss.elastic.co/t/logstash-hanged-cant-be-even-restarted-elastic-output-plugin-might-be-the-rascal/294732/3 "2022-02-15T19:26:54Z")

</div>

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