以下是我用zkServer.sh status 后报的错,我从网上手了 都说zkServer.sh 里的nc问题但是我的就没有
JMX enabled by default
Using config: /usr/local/zk/bin/../conf/zoo.cfg
Error contacting service. It is probably not running.
下面是我zkServer.sh里的部分:
status)
# -q is necessary on some versions of linux where nc returns too quickly, and no stat result is output
STAT=`$JAVA "-Dzookeeper.log.dir=${ZOO_LOG_DIR}" "-Dzookeeper.root.logger=${ZOO_LOG4J_PROP}" \
-cp "$CLASSPATH" $JVMFLAGS org.apache.zookeeper.client.FourLetterWordMain localhost \
$(grep "^[[:space:]]*clientPort" "$ZOOCFG" | sed -e 's/.*=//') srvr 2> /dev/null \
| grep Mode`
if [ "x$STAT" = "x" ]
then
echo "Error contacting service. It is probably not running."
exit 1
else
echo $STAT
exit 0
fi
;;
刚开始学zookeeper该怎么解决啊