zookeeper环境搭建中的几个坑[Error contacting service. It is probably not running]的分析及解决

Zookeeper简介

关于zk的介绍, zk的paxos算法, 网上已经有各位大神在写了,

本文主要写我在搭建过程中的几个极有可能遇到的坑.

Zookeeper部署中的坑

坑之一

Error contacting service. It is probably not running

在配置完zookeeper集群后,三个节点,分别启动三个节点如下:

[[email protected] bin]# zkServer.sh start

JMX enabled by default

Using config: /usr/local/zk/bin/../conf/zoo.cfg

Starting zookeeper … STARTED

在查看zookeeper状态时遇到

[[email protected] bin]# zkServer.sh status

JMX enabled by default

Using config: /usr/local/zk/bin/../conf/zoo.cfg

Error contacting service. It is probably not running.

而其他两个节点却是现实正常;

分析原因并解决:

原因之一

其原因是在编辑zoo.cfg配置文件时,指定了log的输出目录,但是却未创建。

因此需要按照里面指定的目录进行创建。


mkdir /tmp/zookeeper/log

原因之二

最后检查配置zoo.cfg配置发现是该节点的主机名写错了;先停止三个节点zookeeper服务,逐一的修改节点上zoo.cfg配置文件,在逐一的启动 ,结果显示正常;

原因之三

配置集群时数据目录下的myid文件写错,修改为正确的数值即可

PS: zk类的安装搭建过程中, 如果报错, 一定要把status中的错误贴出来, 其它的信息不容易找到答案.

时间: 2024-10-14 12:03:08

zookeeper环境搭建中的几个坑[Error contacting service. It is probably not running]的分析及解决的相关文章

启动zookeeper时,jps显示有进程,但是status查看状态时就Error contacting service. It is probably not running

转自:http://www.cnblogs.com/xiaohua92/p/5460515.html#undefined 安装zookeeper时候,可以查看进程启动,但是状态显示报错:Error contacting service. It is probably not running 安装zookeeper-3.3.2的时候,启动正常没报错,但zkServer.sh status查看状态的时候却出现错误,如下: JMX enabled by defaultUsing config: /ha

安装zookeeper时候,可以查看进程启动,但是状态显示报错:Error contacting service. It is probably not running

安装zookeeper-3.3.2的时候,启动正常没报错,但zkServer.sh status查看状态的时候却出现错误,如下: JMX enabled by defaultUsing config: /hadoop/zookeeper/bin/../conf/zoo.cfgError contacting service. It is probably not running. jps查看进程,却发现进程已启动 7313  QuorumPeerMain 在网上查阅资料一共有三种解决方法: 1,

zookeeper错误Error contacting service. It is probably not running.

./zkServer.sh start启动成功,并且使用jps能看zookeeper的进程. ./zkServer.sh status缺报错,Error contacting service. It is probably not running. 好多地方说和防火墙有关系 我的解决办法是先看一下2181是否被占用,如果没有被占用查看8080端口是否会占用 zookeeper有一个内嵌的管理控制台是通过jetty启动,会占用8080端口 通过查看zookeeper的官方文档,发现有3种解决途径:

zookeeper 集群 Cannot open channel to X at election address Error contacting service. It is probably not running.

zookeeper集群   启动 1.问题现象. 启动每一个都提示  STARTED 但是查看 status时全部节点都报错 [[email protected] bin]# sh zkServer.sh  start ZooKeeper JMX enabled by default Using config: /usr/local/zookeeper-3.4.8/bin/../conf/zoo.cfg Starting zookeeper ... STARTED [[email protect

在配置zookeeper遇到Error contacting service. It is probably not running

在配置完zookeeper集群后,三个节点,分别启动三个节点如下: [[email protected] bin]# zkServer.sh startJMX enabled by defaultUsing config: /usr/local/zk/bin/../conf/zoo.cfgStarting zookeeper ... STARTED 在查看zookeeper状态时遇到 [[email protected] bin]# zkServer.sh statusJMX enabled b

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 prob

zookeeper集群查看状态时报错Error contacting service. It is probably not running的一些坑以及解决办法

最近在搭建mq集群时候需要用到,zookeeper,可是启动的时候显示成功了,查看状态的时候却报错了: 碰到这个问题也是研究好好半天才解决,这里就总结出一个快速解决办法! 首先,必须看日志: 报错信息一般是当前目录下这个文件中,打开查看是什么原因,基本上我碰见的两种:一种是端口占用,一种是找不到路由: 还有一种就是端口占用了,netstat -znpl |grep 2181 查看一下并关闭这个进程,默认端口是2181,zoo.cfg可配置 !!!!这里提示一下,zoo_sample.cfg必须改

zookeeper启动时报Cannot open channel to X at election address Error contacting service. It is probably not running.

配置storm集群的时候出现如下异常: 2016-06-26 14:10:17,484 [myid:1] - WARN [SyncThread:1:[email protected]] - fsync-ing the write ahead log in SyncThread:1 took 1340ms which will adversely effect operation latency. See the ZooKeeper troubleshooting guide 2016-06-26

zookeeper环境搭建与启动

解压 [[email protected] zookeeper-3.4.6]# tar zxvf zookeeper-3.4.6.tar.gz [[email protected] zookeeper-3.4.6]# pwd /home/zookeeper/zookeeper-3.4.6 [[email protected] zookeeper-3.4.6]# 新建目录: [[email protected] zookeeper-3.4.6]# mkdir data 进入目录:cd conf /