zoukankan      html  css  js  c++  java
  • Zookeeper群起脚本启动失败及查看状态出现:Error contacting service. It is probably not running

    1.问题:

    群起脚本启动后查看jps没有出现:QuorumPeerMain

    Zookeeper正常启动但是群起脚本查状态出现:Error contacting service. It is probably not running错误

    ZooKeeper JMX enabled by default
    Using config: /opt/module/zookeeper-3.4.10/bin/../conf/zoo.cfg
    Error contacting service. It is probably not running.

    2.原因:

    脚本没有加上source /etc/profile;

    3.正确脚本:(仅供参考,请指正)

    #! /bin/bash
    
    case $1 in
    "start"){
            for i in hadoop201 hadoop202 hadoop203
            do
                    ssh $i "source /etc/profile;/opt/module/zookeeper-3.4.10/bin/zkServer.sh start"
            done
    };;
    "stop"){
            for i in hadoop201 hadoop202 hadoop203
            do
                    ssh $i "/opt/module/zookeeper-3.4.10/bin/zkServer.sh stop"
            done
    };;
    "status"){
            for i in hadoop201 hadoop202 hadoop203
            do
                    ssh $i "source /etc/profile;/opt/module/zookeeper-3.4.10/bin/zkServer.sh status"
            done
    };;
    esac
  • 相关阅读:
    生产者与消费者
    .net 重新注册
    linux 网络之 bond 网卡模式
    Rancher
    kubernetes 集群
    centos7 网卡命名
    Redis 主从模式
    Redis 集群
    Redis
    TwemProxy Redis架构
  • 原文地址:https://www.cnblogs.com/MWCloud/p/11445835.html
Copyright © 2011-2022 走看看