Yelp / kafka-utils

Apache License 2.0
313 stars 127 forks source link

kafka-rolling-restart --cluster-type kafka does not respond #261

Open tariq452 opened 3 years ago

tariq452 commented 3 years ago

Hi I tried run Kafka-rolling-restart --cluster-type Kafka but does not respond

image my kafka config image

I don't know where should I check or trace it debuging

himynameisalan commented 3 years ago

Same issue

matt448 commented 2 years ago

I ran into this same problem. For me it turned out that my ssh user didn't have sudo setup for no password. The user executing the stop and start commands needed an entry in the /etc/sudoers file with the NOPASSWD option.

It was a little tough to figure out because there were no errors from the rolling restart script. It would just hang at 'Stopping' on the first broker. To troubleshoot I changed stop and start options to do something simple:

kafka-rolling-restart --cluster-type kafka  --start-command "echo > /tmp/testing-start" --stop-command "echo > /tmp/testing-stop"

and I saw that the script was indeed connecting over ssh and was executing the stop command (the file /tmp/testing-stop was created). Then seeing in the help output "(do not include sudo)" for start/stop overrides it led me to the conclusion that the problem was with sudo requiring a password. After configuring password-less sudo for my user on all the brokers the script worked perfect.

It might be a good idea to add something to the documentation about needing password-less sudo on the brokers.