centos 如何强制停止logstash?

t8e9dugd  于 2022-11-07  发布在  Logstash
关注(0)|答案(2)|浏览(388)

我在服务器上通过SSH启动了logstash,但是连接到Elasticsearch时出现错误。当我尝试按CTRL+C时,Logstash没有停止,并且现在仍在运行。我如何强制它停止?
我的服务器运行CentOS5

Got error to send bulk of actions to elasticsearch server at localhost : blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];[SERVICE_UNAVAILABLE/2/no master]; {:level=>:error}
Failed to flush outgoing items {:outgoing_count=>552, :exception=>org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];[SERVICE_UNAVAILABLE/2/no master];, :backtrace=>["org.elasticsearch.cluster.block.ClusterBlocks.globalBlockedException(org/elasticsearch/cluster/block/ClusterBlocks.java:151)", "org.elasticsearch.cluster.block.ClusterBlocks.globalBlockedRaiseException(org/elasticsearch/cluster/block/ClusterBlocks.java:141)", "org.elasticsearch.action.bulk.TransportBulkAction.executeBulk(org/elasticsearch/action/bulk/TransportBulkAction.java:210)", "org.elasticsearch.action.bulk.TransportBulkAction.access$000(org/elasticsearch/action/bulk/TransportBulkAction.java:73)", "org.elasticsearch.action.bulk.TransportBulkAction$1.onFailure(org/elasticsearch/action/bulk/TransportBulkAction.java:148)", "org.elasticsearch.action.support.TransportAction$ThreadedActionListener$2.run(org/elasticsearch/action/support/TransportAction.java:137)", "java.util.concurrent.ThreadPoolExecutor.runWorker(java/util/concurrent/ThreadPoolExecutor.java:1145)", "java.util.concurrent.ThreadPoolExecutor$Worker.run(java/util/concurrent/ThreadPoolExecutor.java:615)", "java.lang.Thread.run(java/lang/Thread.java:745)"], :level=>:warn}
SIGTERM received. Shutting down the pipeline. {:level=>:warn}
^CSIGINT received. Shutting down the pipeline. {:level=>:warn}
^CSIGINT received. Shutting down the pipeline. {:level=>:warn}
^CSIGINT received. Shutting down the pipeline. {:level=>:warn}
^CSIGINT received. Shutting down the pipeline. {:level=>:warn}
yyhrrdl8

yyhrrdl81#

尝试

initctl stop logstash

或者如果不起作用

systemctl stop logstash

或者如果这也不起作用

/etc/init.d/logstash stop


ps -aux|grep logstash

以获取所有logstash进程,并将它们作为

kill -9 <process-id>
uxhixvfz

uxhixvfz2#

你也可以做

sudo systemctl status logstash

此命令还提供有用的附加信息和日志。
将PID写入Main PID:,然后执行YATIN GUPTA

sudo kill -9 <PID>

相关问题