# Frequently modifing the configuration of syslog output plugin randomly cause stalling\_threads\_info

**URL:** <https://discuss.elastic.co/t/frequently-modifing-the-configuration-of-syslog-output-plugin-randomly-cause-stalling-threads-info/175082>\
**Category:** Logstash\
**Created:** [April 3, 2019, 1:13am UTC](https://discuss.elastic.co/t/frequently-modifing-the-configuration-of-syslog-output-plugin-randomly-cause-stalling-threads-info/175082 "2019-04-03T01:13:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tony21177](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tony21177/32/56161_2.png) [@tony21177](https://discuss.elastic.co/u/tony21177)\
**Post date:** [April 3, 2019, 1:13am UTC](https://discuss.elastic.co/t/frequently-modifing-the-configuration-of-syslog-output-plugin-randomly-cause-stalling-threads-info/175082/1 "2019-04-03T01:13:43Z")

</div>

Hello,  
My program will frequently modify the configure of syslog output plugin,  
the host may be reachable or unreachable.  
I try many times,and it works well,but randomly the log threw out stalling\_threads\_info.  
At the same time forwarding also fail,the configure and error message are below.  
It seems like the worker encounter some race conditions so the thread stall?

I found the pattern that cause this issue:  
after i configure the unreachable tcp host,the error message shows syslog tcp output exception.  
Then the stalling thread info logs shows up!

**logstash environment parameters**  
config.reload.automatic=true  
config.reload.interval=5

**Conguration:**  
output {  
syslog {  
appname =\> "%{appname}"  
facility =\> "%{facility}"  
severity =\> "%{severity}"  
host =\> "192.168.2.2"  
port =\> 3000  
protocol =\> "tcp"  
}

syslog {  
appname =\> "%{appname}"  
facility =\> "%{facility}"  
severity =\> "%{severity}"  
host =\> "192.168.1.1"  
port =\> 514  
protocol =\> "udp"  
}  
}

**TCP WARN logs:**  
syslog tcp output exception: closing, reconnecting and resending event {:host=\>"10.0.0.3", :port=\>5, :exception=\>#\<Errno::ECONNREFUSED: Connection refused - connect(2) for "10.0.0.3" port 5\>, :backtrace=\>["org/jruby/ext/socket/RubyTCPSocket.java:134:in `initialize'", "org/jruby/RubyIO.java:875:in`new'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-syslog-3.0.5/lib/logstash/outputs/syslog.rb:209:in `connect'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-syslog-3.0.5/lib/logstash/outputs/syslog.rb:177:in`publish'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-codec-plain-3.0.6/lib/logstash/codecs/plain.rb:40:in `encode'", "/usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/logstash-output-syslog-3.0.5/lib/logstash/outputs/syslog.rb:147:in`receive'", "/usr/share/logstash/logstash-core/lib/logstash/outputs/base.rb:89:in `block in multi_receive'", "org/jruby/RubyArray.java:1734:in`each'", "/usr/share/logstash/logstash-core/lib/logstash/outputs/base.rb:89:in `multi_receive'", "org/logstash/config/ir/compiler/OutputStrategyExt.java:114:in`multi\_receive'", "org/logstash/config/ir/compiler/AbstractOutputDelegatorExt.java:97:in `multi_receive'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:373:in`block in output\_batch'", "org/jruby/RubyHash.java:1343:in `each'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:372:in`output\_batch'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:324:in `worker_loop'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline.rb:287:in`block in start\_workers'"], :event=\>#LogStash::Event:0x67d24825}

**WARN logs:**

[2019-04-03T00:54:13,593][WARN][org.logstash.execution.ShutdownWatcherExt] {"inflight\_count"=\>0, "stalling\_threads\_info"=\>{"other"=\>[{"thread\_id"=\>126, "name"=\>"[main]\<syslog", "current\_call"=\>"[...]/vendor/bundle/jruby/2.3.0/gems/logstash-input-syslog-3.4.1/lib/logstash/inputs/syslog.rb:119:in `join'"}], ["LogStash::Filters::Mutate", {"update"=>{"program"=>"aaa"}, "id"=>"3db2c3ef3a506ad16d0b96c0be1c43fbe6084c63c77b97a1ecd4e6af174ac6fe"}]=>[{"thread_id"=>121, "name"=>"[main]>worker0", "current_call"=>"[...]/logstash-core/lib/logstash/pipeline.rb:373:in`multi\_receive'"}, {"thread\_id"=\>122, "name"=\>"[main]\>worker1", "current\_call"=\>"[...]/logstash-core/lib/logstash/pipeline.rb:373:in `multi_receive'"}, {"thread_id"=>123, "name"=>"[main]>worker2", "current_call"=>"[...]/vendor/bundle/jruby/2.3.0/gems/logstash-output-syslog-3.0.5/lib/logstash/outputs/syslog.rb:209:in`new'"}, {"thread\_id"=\>124, "name"=\>"[main]\>worker3", "current\_call"=\>"[...]/logstash-core/lib/logstash/pipeline.rb:373:in `multi\_receive'"}]}}

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [April 3, 2019, 1:49pm UTC](https://discuss.elastic.co/t/frequently-modifing-the-configuration-of-syslog-output-plugin-randomly-cause-stalling-threads-info/175082/2 "2019-04-03T13:49:21Z")

</div>

I am not sure, but I think this is expected. The syslog input does not really get going until it connects to the TCP server. Restarting the input before it connects does not work. I cannot tell whether that is a bug or not.

---

<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:** [May 1, 2019, 1:49pm UTC](https://discuss.elastic.co/t/frequently-modifing-the-configuration-of-syslog-output-plugin-randomly-cause-stalling-threads-info/175082/3 "2019-05-01T13:49:25Z")

</div>

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