Pārlūkot izejas kodu

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
Mohammad Arshad 4 gadi atpakaļ
vecāks
revīzija
51be692523
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 5 0
      bin/zkServer.sh

+ 5 - 0
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