diff options
author | Mohammad Arshad <arshad@apache.org> | 2021-03-27 22:41:02 +0530 |
---|---|---|
committer | Mate Szalay-Beko <mszalay@cloudera.com> | 2022-05-17 10:27:27 +0200 |
commit | aa20b0e80ab9afc9043f716a06b1c862a6125092 (patch) | |
tree | 8b61dc93c49e88d50d318caa0400df8dbfae9ec8 | |
parent | 90322afd4301af461175ef2f0fb1539593fb2f77 (diff) | |
download | zookeeper-aa20b0e80ab9afc9043f716a06b1c862a6125092.tar.gz |
ZOOKEEPER-3887: In SSL-only server zkServer.sh status command should use secureClientPortAddress instead of clientPortAddress
Author: Mohammad Arshad <arshad@apache.org>
Reviewers: Mate Szalay-Beko <symat@apache.org>
Closes #1654 from arshadmohammad/ZOOKEEPER-3887-master
(cherry picked from commit 51be692523b65afc21cfb0edaa4a5e60ab996aa2)
Signed-off-by: Mohammad Arshad <arshad@apache.org>
(cherry picked from commit 4946c582fa002803075bf32d0c2fec638c8f9a45)
-rwxr-xr-x | bin/zkServer.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/zkServer.sh b/bin/zkServer.sh index 816a12de5..5e16ac698 100755 --- a/bin/zkServer.sh +++ b/bin/zkServer.sh @@ -266,6 +266,11 @@ status) if [ "$secureClientPort" ] ; then isSSL="true" clientPort=$secureClientPort + clientPortAddress=`$GREP "^[[:space:]]*secureClientPortAddress[^[:alpha:]]" "$ZOOCFG" | sed -e 's/.*=//'` + if ! [ $clientPortAddress ] + then + clientPortAddress="localhost" + fi else echo "Unable to find either secure or unsecure client port in any configs. Terminating." exit 1 |