Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 661982 - net-misc/kafka-bin: Service fails to stop
Summary: net-misc/kafka-bin: Service fails to stop
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-24 15:24 UTC by Michael Seifert
Modified: 2018-08-04 11:06 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Seifert 2018-07-24 15:24:15 UTC
When Kafka is stopped via its init.d script, it sometimes fails.

When the user calls "/etc/init.d/kafka stop", start-stop-daemon sends SIGTERM to Kafka. Kafka then performs a graceful shutdown which may take some time. If the shutdown was not successful within 5 seconds, start-stop-daemon errors out, claiming that the process refused to stop. The service status is "crashed", although Kafka was shut down properly.

The fact that the service "crashes" is just an annoyance, but things get worse when configuration management tools like Ansible are involved.

I suggest that the init.d script explicitly implements the stop() command and retries for a longer time period. The init script of fail2ban was adjusted in a similar fashion due to the same behavior:
https://github.com/fail2ban/fail2ban/pull/1648

Any other suggestions how to approach this?

Reproducible: Sometimes

Steps to Reproduce:
1. /etc/init.d/kafka stop

Actual Results:  
 * Stopping kafka ...
 * start-stop-daemon: 1 process refused to stop
 * Failed to stop kafka                                                                                                                                                                                                                                                  
 * ERROR: kafka failed to stop

Expected Results:  
Service stops successfully