问题: 在配置文件中加入clientPortAddress 参数后,zkServer.sh不能正确显示zookeeper的状态,修改如下:
status)
# -q is necessary on some versions of linux where nc returns too quickly, and no stat result is output
xport=$(grep -i "^clientPort[[:space:]]*=" "$ZOOCFG" | sed -e 's/.*=//')
xhost=$(grep -i "^clientPortAddress[[:space:]]*=" "$ZOOCFG" | sed -e 's/.*=//') echo "Server is running at $xhost:$xport"
STAT=`$JAVA "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \
-cp "$CLASSPATH" $JVMFLAGS org.apache.zookeeper.client.FourLetterWordMain
$xhost $xport \
srvr 2> /dev/null \
| grep Mode`
if [ "x$STAT" = "x" ]
阅读(3096) | 评论(1) | 转发(0) |