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
  • 相关阅读:
    [Linux]软件目录
    [Linux]查看Linux内核及发行版本
    [S7706]华为ACL
    [S7706]华为配置DHCP
    QML-密码管理器
    QML-AES加解密小工具
    LaTex中文article模板(支持代码、数学、TikZ)
    Memo-Tech
    VIM学习笔记
    CodeForces 674C Levels and Regions
  • 原文地址:https://www.cnblogs.com/MWCloud/p/11445835.html
Copyright © 2011-2022 走看看