报错背景:

zookeeper安装完成之后,启动之后正常,但是查看log文件zookeeper.log时发现报错。

报错现象:

-- ::, [myid:] - INFO  [WorkerSender[myid=]:QuorumPeer$QuorumServer@] - Resolved hostname: 192.168.52.27 to address: /192.168.52.27
-- ::, [myid:] - INFO [WorkerReceiver[myid=]:FastLeaderElection@] - Notification: (message format version), (n.leader), 0x1000000b2 (n.zxid), 0x1 (n.round), LOOKING (n.state), (n.sid), 0x6 (n.peerEpoch) LOOKING (my state)
-- ::, [myid:] - WARN [WorkerSender[myid=]:QuorumCnxManager@] - Cannot open channel to at election address /192.168.52.27:
java.net.ConnectException: 拒绝连接 (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:)
at java.net.Socket.connect(Socket.java:)
at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:)
at org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(QuorumCnxManager.java:)
at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.process(FastLeaderElection.java:)
at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.run(FastLeaderElection.java:)
at java.lang.Thread.run(Thread.java:)
-- ::, [myid:] - INFO [WorkerSender[myid=]:QuorumPeer$QuorumServer@] - Resolved hostname: 192.168.52.27 to address: /192.168.52.27
-- ::, [myid:] - INFO [/192.168.52.28::QuorumCnxManager$Listener@] - Received connection request /192.168.52.27:
-- ::, [myid:] - INFO [WorkerReceiver[myid=]:FastLeaderElection@] - Notification: (message format version), (n.leader), 0x1000000b2 (n.zxid), 0x1 (n.round), LOOKING (n.state), (n.sid), 0x6 (n.peerEpoch) LOOKING (my state)
-- ::, [myid:] - INFO [WorkerReceiver[myid=]:FastLeaderElection@] - Notification: (message format version), (n.leader), 0x1000000b2 (n.zxid), 0x1 (n.round), LOOKING (n.state), (n.sid), 0x6 (n.peerEpoch) LOOKING (my state)

报错原因:

如果是刚启动zookeeper报出这个错误,然后不再不错,那就是正常现象。是由于有的节点启动,而有的节点还没有启动,这段时间已经启动的节点就会去努力寻找没有启动的节点,就会报出这样的错误。这是一种正常现象,无需多虑。

如果启动很长时间之后还在报错,可以尝试下面的饿解决方案。

报错解决:

修改每个节点的zoo.cfg文件中的相对应的server.x=0.0.0.0:2888:3888

修改完成后重启zookeeper,报错消失。

报错:WARN [WorkerSender[myid=1]:QuorumCnxManager@584] - Cannot open channel to 2 at election address /x.x.x.x:3888的更多相关文章

  1. WARN [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:QuorumCnxManager@584] - Cannot open channel to 4 at election address Slave3.Hadoop/xxx.xxx.xxx.xxx

    这些日子为这个错误苦恼很久了,网上找到的各种方法都试了一遍,还是没能解决. 安装好zookeeper后,运行zkServer.sh start 显示正常启动,但运行zkServer.sh status ...

  2. zookeeper 集群配置采坑 Connection refused WARN [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:QuorumCnxManager@584] - Cannot open channel to 3 at election address slave2/192.168.127.133:3888

    坑一: Cannot open channel to at election address slave1/ java.net.ConnectException: Connection refused ...

  3. pytorch报错:ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1,512,1,1])

    1.pytorch报错:ValueError: Expected more than 1 value per channel when training, got input size torch.S ...

  4. open数据库报错ERROR at line 1: ORA-03113: end-of-file on communication channel Process ID: 3880 Session ID: 125 Serial number: 3

    1.今天打开数据时,失败,报错 ERROR at line 1:ORA-03113: end-of-file on communication channelProcess ID: 3880Sessi ...

  5. 服务器部署_nginx报错: [warn] conflicting server name "www.test.com" on 0.0.0.0:80, ignored

    今天修改nginx配置文件nginx.conf之后,启动nginx就会报错.经仔细检查是重复配置了 server元素导致, 当nginx检测到重复的 server_name item.test.com ...

  6. 【原创】大叔经验分享(13)spark运行报错WARN Utils: Service 'sparkDriver' could not bind on port 0. Attempting port 1.

    本地运行spark报错 18/12/18 12:56:55 WARN Utils: Service 'sparkDriver' could not bind on port 0. Attempting ...

  7. elasticsearch报错[WARN ][bootstrap ] Unable to lock JVM Memory: error=12,reason=Cannot allocate memory,解决

    早上在服务器上安装elasticsearch集群,在其中的一台上面安装好elasticsearch之后安装了一些插件,其中一个插件是marvel,结果可能是新版本不支持这个插件,就没有安装成功,也就索 ...

  8. hadoop报错WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

    19/06/14 10:44:58 WARN common.Util: Path /opt/hadoopdata/hdfs/name should be specified as a URI in c ...

  9. JMeter3.0启动日志报错WARN - org.jmeterplugins.repository.Plugin: Unable to load class解决方法

    解决方法: 通过sh find-in-jars 'HlsSampler' -d /data/apache-jmeter-3.0/lib/ext/确定这个class文件在哪个jar包 由于find-in ...

随机推荐

  1. 使用safe-rm替换rm命令,防止误删除

    1.下载safe源码包: wget https://launchpad.net/safe-rm/trunk/0.12/+download/safe-rm-0.12.tar.gz 2.解压safe-rm ...

  2. RANSEC算法

    移步:https://blog.csdn.net/u010128736/article/details/53422070 clc;clear;close all; %%%二维直线拟合 %%%生成随机数 ...

  3. Qt文件读写操作

    原文地址:https://www.cnblogs.com/flowingwind/p/8336159.html QFile Class 1.read读文件 加载文件对象  QFile file(&qu ...

  4. Processing 2.1.1 无法使用video和movie问题解决方案

    升级到2.1.1后,尝试着运行了一下sample中的video和movie,结果都报错,上网搜了一下,找到解决方法. 1. 首先来看movie的错误,如下: JNA: Callback org.gst ...

  5. C# 坦克大战笔记(1)

    1.游戏对象父类:GameObject 成员: 游戏对象的X,Y坐标,高度,宽度,方向,对象,以及生命值. 绘制游戏对象的抽象方法Draw(); 绘制对象移动的方法Move() 返回矩形的方法,用于碰 ...

  6. driud 异常

    异常如下: 十二月 25, 2017 11:37:14 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin警告: [SetProper ...

  7. Android中为何使用Log而不用System.out

    Android中为何使用Log而不用System.out System.out除了使用方便一点以外有以下缺点:日志不可控制,打印时间无法确定,不能添加过滤器,日志没有级别之分. 使用Log比如想打印一 ...

  8. Java NIO?看这一篇就够了!

    现在使用NIO的场景越来越多,很多网上的技术框架或多或少的使用NIO技术,譬如Tomcat,Jetty.学习和掌握NIO技术已经不是一个JAVA攻城狮的加分技能,而是一个必备技能.在前面2篇文章< ...

  9. OpenFOAM显示残差

    本文主要讲解两种方法用来显示OpenFOAM的计算残差,一种是采用OpenFOAM自带的foamMonitor来输出残差,另一种就是大家经常看见的采用pyFoam来输出残差.不管采用哪一种方法都必须安 ...

  10. K8S Kubernetes 架构

    Kubernetes最初源于谷歌内部的Borg,提供了面向应用的容器集群部署和管理系统. Kubernetes架构 Kubernetes借鉴了Borg的设计理念,比如Pod.Service.Label ...