Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

couchdb_changes doesn't close when shutting down logstash? #25

Open
FlorinAndrei opened this issue Feb 23, 2016 · 4 comments
Open

couchdb_changes doesn't close when shutting down logstash? #25

FlorinAndrei opened this issue Feb 23, 2016 · 4 comments
Labels

Comments

@FlorinAndrei
Copy link

See elastic/logstash#4703

logstash-2.2.2, elasticsearch-1.7.5, java-1.8.0_72-b15, ubuntu-14.04 64bit, couchdb-1.6.1

input {
  couchdb_changes {
    always_reconnect => true
    db => "vendnext_new_no_auth"
    heartbeat => 5000
    host => "couch31-prod-uswest2-aws.domain"
    port => 5984
    reconnect_delay => 10
  }
}
filter {
  mutate {
    remove_field => [ "stripe", "moneris", "roles", "_rev", "freeVendUses", "surcharge", "debugMessages" ]
    convert => [ "[doc][debugMessages]", "string"]
  }
}
output {
  elasticsearch {
    action => "index"
    hosts => "localhost:9200"
    index => "vendnext_new_no_auth_index"
    manage_template => false
    script => "domain-filter"
    script_lang => "javascript"
    script_type => "file"
  }
}

Overall it appears to work just fine. But the problems begin when I try to stop it.

"service logstash stop" stops the updates, but the logstash process does not quit. Repeating "service logstash stop" makes no difference. Logstash appears to be frozen - no updates sent to ElasticSearch, but it does not quit either.

After that, "service logstash status" reports the service as still running.

"kill $PID" doesn't kill it. The only way to kill it is "kill -9 $PID".

@ph ph added the bug label Feb 26, 2016
@teebu
Copy link

teebu commented Aug 19, 2016

Same here. logstash 2.3.4, logstash-input-couchdb_changes (2.0.4)

@DrRob
Copy link

DrRob commented Nov 20, 2016

Me too when running logstash 5.0.1 directly (not as a service), and the log says:

[2016-11-20T04:38:50,809][WARN ][logstash.runner          ] SIGINT received. Shutting down the agent.
[2016-11-20T04:38:50,815][WARN ][logstash.agent           ] stopping pipeline {:id=>"main"}
[2016-11-20T04:38:55,816][WARN ][logstash.runner          ] Received shutdown signal, but pipeline is still waiting for in-flight events
to be processed. Sending another ^C will force quit Logstash, but this may cause
data loss.
[2016-11-20T04:40:56,893][WARN ][logstash.shutdownwatcher ] {}
[2016-11-20T04:40:56,894][ERROR][logstash.shutdownwatcher ] The shutdown process appears to be stalled due to busy or blocked plugins. Check the logs for more information

@uschtwill
Copy link

Same for me running it on Docker and using docker stop -t 180 logstash. :/

@kingigi
Copy link

kingigi commented Dec 9, 2017

I am running LogStash 6.0.1 on Fedora 26 and I am seeing the same problem.
I was hoping that shutting down CouchDB would help (to force a TCP-disconnect), but it doesn't.
When I stop LogStash (/bin/systemctl stop logstash.service) and stop CouchDB after that, the plugin even keeps trying to reconnect to CouchDB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants