Skip to content

Logstash 1.5RC2 fails to stop if redis input is used #2871

@Mister-X-

Description

@Mister-X-

When I use redis as input, it fails to stop using service logstash stop (which sends kill -TERM $PID).

When debugging, here is what I get when sending SIGTERM to the process (not started with service):

SIGTERM received. Shutting down the pipeline. {:level=>:warn, :file=>"logstash/agent.rb", :line=>"127", :method=>"execute"}
Sending shutdown signal to input thread {:thread=>#<Thread:0x3c8c03ae run>, :level=>:info, :file=>"logstash/pipeline.rb", :line=>"249", :method=>"shutdown"}

And it waits forever, doing nothing. I can send more SIGTERM and more of those appear on the screen.

Additionally, I noticed the following a few lines above, when it was logging and I don't know if it's related or not:

Starting stale files cleanup cycle {:files=>{"/var/log/logstash/output.log"=>#<IOWriter:0x6fcc6d1e @active=true, @io=#<File:/var/log/logstash/output.log>>}, :level=>:info, :file=>"logstash/outputs/file.rb", :line=>"196", :method=>"close_stale_files"}

Here is the first config file:

input {
}

filter {
    mutate {
        add_field => {
        "received_at" => "%{@timestamp}"
        "received_from" => "%{host}"
        }
    }
}

output {
    elasticsearch { host => localhost }
    file {
        path => "/var/log/logstash/output.log"
    }
}

I know it could be simplified and some stuff in there do not make much sense but I was testing Logstash (and that's the config I had when the bug happened) and you can reproduce the bug every single time with this config.

Here is the second config file:

input {
        redis {
                host => "192.168.110.143"
                data_type => 'list'
                key => 'logstash:redis'
                type => 'redis-input'
                password => 'howaboutthisverylongpassword?'
        }
}

Another side note is that it seems that the redis plugin only works for the first few minutes. I just changed 2 lines in the configuration file for redis (from the package install on Ubuntu 14.04.2 LTS 64 bit). Let me know if you need the redis config file.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions