You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by ph...@apache.org on 2013/10/24 07:11:41 UTC
svn commit: r1535278 - in /zookeeper/trunk: CHANGES.txt bin/zkServer.sh
Author: phunt
Date: Thu Oct 24 05:11:40 2013
New Revision: 1535278
URL: http://svn.apache.org/r1535278
Log:
ZOOKEEPER-1744. clientPortAddress breaks "zkServer.sh status" (Nick Ohanian via phunt)
Modified:
zookeeper/trunk/CHANGES.txt
zookeeper/trunk/bin/zkServer.sh
Modified: zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/trunk/CHANGES.txt?rev=1535278&r1=1535277&r2=1535278&view=diff
==============================================================================
--- zookeeper/trunk/CHANGES.txt (original)
+++ zookeeper/trunk/CHANGES.txt Thu Oct 24 05:11:40 2013
@@ -462,6 +462,9 @@ BUGFIXES:
ZOOKEEPER-1557. jenkins jdk7 test failure in
testBadSaslAuthNotifiesWatch (Eugene Koontz via phunt)
+ ZOOKEEPER-1744. clientPortAddress breaks "zkServer.sh status"
+ (Nick Ohanian via phunt)
+
IMPROVEMENTS:
ZOOKEEPER-1170. Fix compiler (eclipse) warnings: unused imports,
Modified: zookeeper/trunk/bin/zkServer.sh
URL: http://svn.apache.org/viewvc/zookeeper/trunk/bin/zkServer.sh?rev=1535278&r1=1535277&r2=1535278&view=diff
==============================================================================
--- zookeeper/trunk/bin/zkServer.sh (original)
+++ zookeeper/trunk/bin/zkServer.sh Thu Oct 24 05:11:40 2013
@@ -173,7 +173,12 @@ restart)
;;
status)
# -q is necessary on some versions of linux where nc returns too quickly, and no stat result is output
- clientPort=`grep "^[[:space:]]*clientPort" "$ZOOCFG" | sed -e 's/.*=//'`
+ clientPortAddress=`grep "^[[:space:]]*clientPortAddress[^[:alpha:]]" "$ZOOCFG" | sed -e 's/.*=//'`
+ if ! [ $clientPortAddress ]
+ then
+ clientPortAddress="localhost"
+ fi
+ clientPort=`grep "^[[:space:]]*clientPort[^[:alpha:]]" "$ZOOCFG" | sed -e 's/.*=//'`
if ! [ $clientPort ]
then
echo "Client port not found in static config file. Looking in dynamic config file."
@@ -188,8 +193,8 @@ status)
fi
echo "Client port found: $clientPort"
STAT=`"$JAVA" "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \
- -cp "$CLASSPATH" $JVMFLAGS org.apache.zookeeper.client.FourLetterWordMain localhost \
- $clientPort srvr 2> /dev/null \
+ -cp "$CLASSPATH" $JVMFLAGS org.apache.zookeeper.client.FourLetterWordMain \
+ $clientPortAddress $clientPort srvr 2> /dev/null \
| grep Mode`
if [ "x$STAT" = "x" ]
then