summaryrefslogtreecommitdiff
path: root/bin/zkServer.sh
diff options
context:
space:
mode:
authorMohammad Arshad <arshad@apache.org>2021-03-27 22:41:02 +0530
committerMohammad Arshad <arshad@apache.org>2021-03-27 22:41:02 +0530
commit51be692523b65afc21cfb0edaa4a5e60ab996aa2 (patch)
tree630409ccc0dd92f7f0de66add780f5f6c92a9b2e /bin/zkServer.sh
parent461aada6b015078b9a14f787dd1f526488490df9 (diff)
downloadzookeeper-51be692523b65afc21cfb0edaa4a5e60ab996aa2.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
Diffstat (limited to 'bin/zkServer.sh')
-rwxr-xr-xbin/zkServer.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/zkServer.sh b/bin/zkServer.sh
index c91216b36..1a3cd359c 100755
--- a/bin/zkServer.sh
+++ b/bin/zkServer.sh
@@ -276,6 +276,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