Browse Source

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)
Mohammad Arshad 4 years ago
parent
commit
aa20b0e80a
1 changed files with 5 additions and 0 deletions
  1. 5 0
      bin/zkServer.sh

+ 5 - 0
bin/zkServer.sh

@@ -266,6 +266,11 @@ status)
       if [ "$secureClientPort" ] ; then
       if [ "$secureClientPort" ] ; then
         isSSL="true"
         isSSL="true"
         clientPort=$secureClientPort
         clientPort=$secureClientPort
+        clientPortAddress=`$GREP "^[[:space:]]*secureClientPortAddress[^[:alpha:]]" "$ZOOCFG" | sed -e 's/.*=//'`
+        if ! [ $clientPortAddress ]
+        then
+            clientPortAddress="localhost"
+        fi
       else
       else
         echo "Unable to find either secure or unsecure client port in any configs. Terminating."
         echo "Unable to find either secure or unsecure client port in any configs. Terminating."
         exit 1
         exit 1