kafka connect未在sigterm上停止

wa7juj8i  于 2021-06-08  发布在  Kafka
关注(0)|答案(0)|浏览(284)

当systemd触发默认终止信号(sigterm)时,kafka connect不会完全停止。查看日志,我可以看到各个连接器任务和其他几个服务都说它们正在停止,然后报告它们实际上已经停止,除了“herder”:

[2017-08-02 17:50:06,372] INFO Kafka Connect stopping (org.apache.kafka.connect.runtime.Connect:68)
[2017-08-02 17:50:06,377] INFO Stopping REST server (org.apache.kafka.connect.runtime.rest.RestServer:154)
[2017-08-02 17:50:06,652] INFO Stopped ServerConnector@4218500f{HTTP/1.1}{0.0.0.0:8083} (org.eclipse.jetty.server.ServerConnector:306)
[2017-08-02 17:50:06,908] INFO Stopped o.e.j.s.ServletContextHandler@616fe72b{/,null,UNAVAILABLE} (org.eclipse.jetty.server.handler.ContextHandler:865)
[2017-08-02 17:50:06,929] INFO REST server stopped (org.apache.kafka.connect.runtime.rest.RestServer:165)
[2017-08-02 17:50:06,935] INFO Herder stopping (org.apache.kafka.connect.runtime.standalone.StandaloneHerder:76)
[2017-08-02 17:50:06,941] INFO Stopping task payments-kinesis-sink-0 (org.apache.kafka.connect.runtime.Worker:341)
[2017-08-02 17:50:06,950] INFO WorkerSinkTask{id=payments-kinesis-sink-0} Committing offsets (org.apache.kafka.connect.runtime.WorkerSinkTask:262)
[2017-08-02 17:50:07,025] INFO Stopping connector payments-kinesis-sink (org.apache.kafka.connect.runtime.Worker:218)
[2017-08-02 17:50:07,032] INFO Stopped connector payments-kinesis-sink (org.apache.kafka.connect.runtime.Worker:229)
[2017-08-02 17:50:07,068] INFO Worker stopping (org.apache.kafka.connect.runtime.Worker:122)
[2017-08-02 17:50:07,081] INFO Stopped FileOffsetBackingStore (org.apache.kafka.connect.storage.FileOffsetBackingStore:68)
[2017-08-02 17:50:07,082] INFO Worker stopped (org.apache.kafka.connect.runtime.Worker:142)

发生这种情况时,进程将挂起,直到systemd TimeoutStopSec 达到持续时间,然后发送sigkill。
为了暂时解决这个问题,我刚刚降低了超时时间,但是在我们投入生产之前,我想让事情正确地关闭。
我试着翻阅了源代码,但我不能确定它挂在哪里。
有没有具体办法阻止Kafka连接?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题