如何解决需要帮助来关闭Logstash
我在这种情况下陷入困境(logstash没有关闭)。查看下面的详细信息
设置:->
Elastic和Logstash托管在同一服务器上。 Filebeat已加载到另一台服务器上。 Filebeat将数据发送到logstash,logstash将数据发送到elastic。将它们安装为系统服务(Ubuntu)。
Elastisearch Version --> 7.6.2
Logstash version --> 7.7.0
我已经用logstash加载了2条管道,检查了数据正在发送到Elastic。同时,我需要在其中一个管道中进行更新,无法停止(重新启动)logstash。
正如我检查的那样,其中一个管道存在一些问题,并且其数据未转发到Elastic。现在,每当我要关闭/停止logstash时,它就会卡住/挂起。 (不知道该说些什么。)
现在我已尝试关闭/重新启动
systemctl stop/restart logstash
logstash服务状态输出
systemctl status logstash
输出
● logstash.service - logstash
Loaded: loaded (/etc/systemd/system/logstash.service; disabled; vendor preset: enabled)
Active: deactivating (stop-sigterm) since Tue 2020-09-15 15:18:17 UTC; 19h ago
Main PID: 14298 (java)
Tasks: 40 (limit: 19141)
CGroup: /system.slice/logstash.service
└─14298 /usr/bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.awt.headless=true
Sep 15 15:30:26 Server logstash[14298]: [2020-09-15T15:30:26,238][INFO ][logstash.outputs.elasticsearch][pipeline1][8820ca4] retrying failed action with response code: 403 ({"type"=>"security_exception","reason"=>"action [indices:admin/create] is unauthorized
Sep 15 15:30:26 Server logstash[14298]: [2020-09-15T15:30:26,239][INFO ][logstash.outputs.elasticsearch][pipeline1][88a920ca4] retrying failed action with response code: 403 ({"type"=>"security_exception",240][INFO ][logstash.outputs.elasticsearch][pipeline1][88531a20ca4] Retrying individual bulk actions that failed or were rejected by the previous bulk request. {:count=>3}
Sep 15 15:30:30 Server logstash[14298]: [2020-09-15T15:30:30,894][WARN ][org.logstash.execution.ShutdownWatcherExt] {"inflight_count"=>0,"stalling_threads_info"=>{"other"=>[{"thread_id"=>43,"name"=>"[dem_logging_test]<beats","current_call"=>"[...]/vendor/bundle/jruby/2.5.0/gems/logstash-input-beats-6.0.9-java/lib/logstash/inputs/beats.rb:197:in `run'"} ["LogStash::Filters::Mutate",{"remove_field"=>["agent","host"] id"=>"df6bb998587313a3f737f399367d9ac0bbd9a962a64828c64ee0df7680f2f430"}]=>[{"thread_id"=>35,"name"=>"[dem_logging_test]>worker0","current_call"=>"[...]/vendor/bundle/jruby/2.5.0/gems/stud-0.0.23/lib/stud/interval.rb:89:in `sleep'"} {"thread_id"=>37,"name"=>"[dem_logging_test]>worker1","current_call"=>"...
Sep 15 15:30:35 Server logstash[14298]: [2020-09-15T15:30:35,911][WARN ][org.logstash.execution.ShutdownWatcherExt] {"inflight_count"=>0,"current_call"=>"...
尝试了其他方法:->
pkill -9/-14 PID
但没有运气。
我知道有一些运行中的数据正在阻止logstash关闭。我从弹性上检查了此document,但没有帮助。
有提到的选项allow.unsafe_shutdown,而我没有使用过。
Logstash日志:
[2020-09-15T15:30:40,928][WARN ][org.logstash.execution.ShutdownWatcherExt] {"inflight_count"=>0,"current_call"=>"[...]/vendor/bundle/jruby/2.5.0/gems/logstash-input-beats-6.0.9-java/lib/logstash/inputs/beats.rb:197:in `run'"}],["LogStash::Filters::Mutate","host"],"id"=>"df6bb998587313a3f737f399367d9ac0bbd9a962a64828c64ee0df7680f2f430"}]=>[{"thread_id"=>35,"current_call"=>"[...]/vendor/bundle/jruby/2.5.0/gems/stud-0.0.23/lib/stud/interval.rb:89:in `sleep'"},{"thread_id"=>37,{"thread_id"=>39,"name"=>"[dem_logging_test]>worker2",{"thread_id"=>40,"name"=>"[dem_logging_test]>worker3","current_call"=>"[...]/vendor/bundle/jruby/2.5.0/gems/stud-0.0.23/lib/stud/interval.rb:89:in `sleep'"}]}}
[2020-09-15T15:30:45,945][WARN ][org.logstash.execution.ShutdownWatcherExt] {"inflight_count"=>0,"current_call"=>"[...]/vendor/bundle/jruby/2.5.0/gems/stud-0.0.23/lib/stud/interval.rb:89:in `sleep'"}]}}
[2020-09-15T15:30:50,963][WARN ][org.logstash.execution.ShutdownWatcherExt] {"inflight_count"=>0,"current_call"=>"[...]/vendor/bundle/jruby/2.5.0/gems/stud-0.0.23/lib/stud/interval.rb:89:in `sleep'"}]}}
[2020-09-15T15:30:55,980][WARN ][org.logstash.execution.ShutdownWatcherExt] {"inflight_count"=>0,"current_call"=>"[...]/vendor/bundle/jruby/2.5.0/gems/stud-0.0.23/lib/stud/interval.rb:89:in `sleep'"}]}}
我想停止此logstash服务,有日志记录说URL无效,没有实时连接,正在进行中的数据,但是现在我想将其关闭。
有什么想法吗?还有任何想法我将来如何避免。
非常感谢
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。