You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by ar...@apache.org on 2021/03/27 17:09:32 UTC

[zookeeper] branch branch-3.7 updated: ZOOKEEPER-3887: In SSL-only server zkServer.sh status command should use secureClientPortAddress instead of clientPortAddress

This is an automated email from the ASF dual-hosted git repository.

arshad pushed a commit to branch branch-3.7
in repository https://gitbox.apache.org/repos/asf/zookeeper.git


The following commit(s) were added to refs/heads/branch-3.7 by this push:
     new 862d846  ZOOKEEPER-3887: In SSL-only server zkServer.sh status command should use secureClientPortAddress instead of clientPortAddress
862d846 is described below

commit 862d846d25a4a53e46e576b9d69f3a2f4c144761
Author: Mohammad Arshad <ar...@apache.org>
AuthorDate: Sat Mar 27 22:41:02 2021 +0530

    ZOOKEEPER-3887: In SSL-only server zkServer.sh status command should use secureClientPortAddress instead of clientPortAddress
    
    Author: Mohammad Arshad <ar...@apache.org>
    
    Reviewers: Mate Szalay-Beko <sy...@apache.org>
    
    Closes #1654 from arshadmohammad/ZOOKEEPER-3887-master
    
    (cherry picked from commit 51be692523b65afc21cfb0edaa4a5e60ab996aa2)
    Signed-off-by: Mohammad Arshad <ar...@apache.org>
---
 bin/zkServer.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/bin/zkServer.sh b/bin/zkServer.sh
index a4aa9f3..c02dfc0 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