zoukankan      html  css  js  c++  java
  • Error contacting service. It is probably not running.

    平台:centos-6.3-i386

       jdk-7u51

            storm 0.9.1

       python 2.6.6

         hadoop 1.2.1

    运行zookeeperd后显示启动成功:


    JMX enabled by default
    Using config: /data/programfiles/zookeeper-3.4.5/bin/../conf/zoo.cfg
    Starting zookeeper ... STARTED


    但用bin/zkServer.sh status查看,反馈如下:


    JMX enabled by default
    Using config: /data/programfiles/zookeeper-3.4.5/bin/../conf/zoo.cfg
    Error contacting service. It is probably not running.


    很奇怪,我用netstat -lntup查了一下端口,没发现2181端口被启用


    查了zookeeper.out日志,发现如下的错误:


    2014-04-16 11:59:54,425 [myid:] - ERROR [main:ZooKeeperServerMain@63] - Unexpected exception, exiting abnormally
    java.net.BindException: Address already in use
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Net.java:344)
        at sun.nio.ch.Net.bind(Net.java:336)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:199)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67)
        at org.apache.zookeeper.server.NIOServerCnxnFactory.configure(NIOServerCnxnFactory.java:95)
        at org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:110)
        at org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:86)
        at org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:52)
        at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:116)
        at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)

    从错误信息来看,是端口被使用了,但我用netstat -lntup是没被使用的,再用 lsof -i:2181,发现了2181端口果然被占用了


    [root@ programfiles]# lsof -i:2181
    COMMAND     PID USER   FD   TYPE     DEVICE SIZE/OFF NODE NAME
    memcached 15843 root   56u  IPv4 1650939492      0t0  TCP .:11213->.:eforward (ESTABLISHED)
    php-cgi   28154  www    7u  IPv4 1650939491      0t0  TCP .:eforward->.:11213 (ESTABLISHED)


    接下来就很好办了,启用另外一个端口就ok了

  • 相关阅读:
    js运算符优先级
    整理HTML的一些基础
    NSIS学习-Push&Pop(转发)
    NSIS学习-标记
    关于python中文报错的解决办法
    JDK和JRE的区别-zz
    ZZ-selenium RC for python环境搭建
    庞果网(最小操作数)
    python win32com在读取word文档时,遇到的问题
    python 如何将ppt和word转化为txt文档
  • 原文地址:https://www.cnblogs.com/mrchige/p/5907860.html
Copyright © 2011-2022 走看看