Describe the bug
When configured with TLS, the redis-shutdown script ignores the TLS port number
To reproduce
Start Redis with port=0 and tls-port=6379. redis-shutdown attempts to connect to server on port 0 and fails.
Expected behavior
The TLS configuration should be recognized, and redis-cli should be passed the --tls option as well as the correct port number.
Additional information
(This script seems pretty dated, also doesn't work with ACL users.)
I got it working with TLS by changing one line and adding two others:
PORT=`awk '/^[[:blank:]]*(tls-)?port/ { print $2 }' $CONFIG_FILE | tail -n1`
TLS=`awk '/^[[:blank:]]*tls-port/ { print $2 }' $CONFIG_FILE | tail -n1`
...
[ -z "$TLS" ] || ADDITIONAL_PARAMS="$ADDITIONAL_PARAMS --tls"
Comment From: zuiderkwast
I can't find this script in the repo. Where did you find it?
Comment From: miken32
Oh I installed via RPM, looks like it's added by RHEL. https://src.fedoraproject.org/rpms/redis/blob/main/f/redis-shutdown
I should have checked first before assuming it was part of the codebase!