zookeeper Error contacting service. It is probably not running

通过命令zkServer.sh start之后,显示STARTED

通过client测试报错  无法连接 连接关闭

Connecting to localhost:2181
2020-03-29 12:44:31,855 [myid:] - INFO  [main:Environment@100] - Client environment:zookeeper.version=3.4.13-2d71af4dbe22557fda74f9a9b4309b15a7487f03, built on 06/29/2018 04:05 GMT
2020-03-29 12:44:31,857 [myid:] - INFO  [main:Environment@100] - Client environment:host.name=backup01
2020-03-29 12:44:31,857 [myid:] - INFO  [main:Environment@100] - Client environment:java.version=1.8.0_172
2020-03-29 12:44:31,858 [myid:] - INFO  [main:Environment@100] - Client environment:java.vendor=Oracle Corporation
2020-03-29 12:44:31,858 [myid:] - INFO  [main:Environment@100] - Client environment:java.home=/usr/local/java/jdk1.8.0_172/jre
2020-03-29 12:44:31,858 [myid:] - INFO  [main:Environment@100] - Client environment:java.class.path=/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../build/classes:/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../build/lib/*.jar:/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../lib/slf4j-log4j12-1.7.25.jar:/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../lib/slf4j-api-1.7.25.jar:/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../lib/netty-3.10.6.Final.jar:/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../lib/log4j-1.2.17.jar:/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../lib/jline-0.9.94.jar:/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../lib/audience-annotations-0.5.0.jar:/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../zookeeper-3.4.13.jar:/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../src/java/lib/*.jar:/usr/local/hadoop/zookeeper/zookeeper-3.4.13/bin/../conf:
2020-03-29 12:44:31,858 [myid:] - INFO  [main:Environment@100] - Client environment:java.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
2020-03-29 12:44:31,858 [myid:] - INFO  [main:Environment@100] - Client environment:java.io.tmpdir=/tmp
2020-03-29 12:44:31,858 [myid:] - INFO  [main:Environment@100] - Client environment:java.compiler=<NA>
2020-03-29 12:44:31,858 [myid:] - INFO  [main:Environment@100] - Client environment:os.name=Linux
2020-03-29 12:44:31,858 [myid:] - INFO  [main:Environment@100] - Client environment:os.arch=amd64
2020-03-29 12:44:31,866 [myid:] - INFO  [main:Environment@100] - Client environment:os.version=3.10.0-862.el7.x86_64
2020-03-29 12:44:31,866 [myid:] - INFO  [main:Environment@100] - Client environment:user.name=root
2020-03-29 12:44:31,866 [myid:] - INFO  [main:Environment@100] - Client environment:user.home=/root
2020-03-29 12:44:31,866 [myid:] - INFO  [main:Environment@100] - Client environment:user.dir=/usr/local/hadoop/zookeeper/zookeeper-3.4.13
2020-03-29 12:44:31,867 [myid:] - INFO  [main:ZooKeeper@442] - Initiating client connection, connectString=localhost:2181 sessionTimeout=30000 watcher=org.apache.zookeeper.ZooKeeperMain$MyWatcher@277050dc
2020-03-29 12:44:31,885 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error)
Welcome to ZooKeeper!
JLine support is enabled
2020-03-29 12:44:31,997 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@879] - Socket connection established to localhost/0:0:0:0:0:0:0:1:2181, initiating session
2020-03-29 12:44:32,019 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1162] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
[zk: localhost:2181(CONNECTING) 0] 2020-03-29 12:44:33,522 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2020-03-29 12:44:33,525 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@879] - Socket connection established to localhost/127.0.0.1:2181, initiating session
2020-03-29 12:44:33,530 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1162] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2020-03-29 12:44:35,480 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error)
2020-03-29 12:44:35,481 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@879] - Socket connection established to localhost/0:0:0:0:0:0:0:1:2181, initiating session
2020-03-29 12:44:35,485 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1162] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2020-03-29 12:44:37,542 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error)
2020-03-29 12:44:37,542 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@879] - Socket connection established to localhost/0:0:0:0:0:0:0:1:2181, initiating session
2020-03-29 12:44:37,544 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1162] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2020-03-29 12:44:38,754 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error)
2020-03-29 12:44:38,754 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@879] - Socket connection established to localhost/0:0:0:0:0:0:0:1:2181, initiating session
2020-03-29 12:44:38,756 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1162] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2020-03-29 12:44:40,281 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2020-03-29 12:44:40,281 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@879] - Socket connection established to localhost/127.0.0.1:2181, initiating session
2020-03-29 12:44:40,283 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1162] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2020-03-29 12:44:41,886 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error)
2020-03-29 12:44:41,887 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@879] - Socket connection established to localhost/0:0:0:0:0:0:0:1:2181, initiating session
2020-03-29 12:44:41,890 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1162] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2020-03-29 12:44:43,559 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2020-03-29 12:44:43,560 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@879] - Socket connection established to localhost/127.0.0.1:2181, initiating session
2020-03-29 12:44:43,562 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1162] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2020-03-29 12:44:45,106 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
2020-03-29 12:44:45,107 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@879] - Socket connection established to localhost/127.0.0.1:2181, initiating session
2020-03-29 12:44:45,109 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1162] - Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2020-03-29 12:44:47,098 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@1029] - Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error)
2020-03-29 12:44:47,098 [myid:] - INFO  [main-SendThread(localhost:2181):ClientCnxn$SendThread@879] - Socket connection established to localhost/0:0:0:0:0:0:0:1:2181, initiating session

我就很纳闷明明已经启动为啥查看状态报这个错呢

Error contacting service. It is probably not running

问题分析

我们可以通过bin目录下面的zookeeper.out来查看问题原因

为啥连接被拒绝

其实这个本身没有问题,因为这是集群的,要全部启动起来才能选举leader follower observer  因为还有两台没有启动 所以不能进行通信选举,我们只需要将另外两台启动起来就可以了

这个其实没有问题的,我以前的文章也写过,只是时间久了忘记了

这个以前集群安装启动的文章分布式Zookeeper安装搭建详解_ywl470812087的博客-CSDN博客

里面有个细节在第七步骤中 每台机器上分别启动,哎到这里我觉得自己太粗心大意,不知道各位有没有这样的情况,不知道这篇文章能不能帮到你

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/576494.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

引言

推荐系统从0到1_引言什么是推荐&#xff1f;什么是推荐系统&#xff1f;推荐系统的应用什么是推荐&#xff1f; 说起推荐&#xff0c;就不得不说搜索。搜索这里指信息检索&#xff0c;在大量的信息中&#xff0c;我们需要找到自己需要的信息&#xff0c;就用到了搜索引擎&…

JNI的方式调用DLL(SO)(上)

最近有个项目要调用原有的DLL文件&#xff0c;本来准备使用JNA&#xff0c;可是客户不同意&#xff0c;非要使用JNI的方式。万般无奈之下&#xff0c;只能重新使用JNI&#xff0c;现将JAVA调用动态链接库的一般方法总结如下。 JNI是Java Native Interface&#xff08;JAVA本地调…

搭建推荐系统所需要的材料

搭建推荐系统所需要的材料人力物力推荐系统的原材料物品流量最后人力物力 在上一小节中《推荐系统的必要性》里已经讨论过一个推荐业务团队需要哪些人员储备&#xff0c;需要什么核心技术等。这里在重点说下物力&#xff0c;即机器资源设备。 往往从头开始搭建这样一个团队&a…

kafka:topic为什么要进行分区?副本机制是如何做的?

kafka为什么要在topic里加入分区的概念&#xff1f;如果没有分区,topic中的segment消息写满后,直接给订阅者不是也可以吗&#xff1f; Kafka可以将主题划分为多个分区&#xff08;Partition&#xff09;&#xff0c;会根据分区规则选择把消息存储到哪个分区中&#xff0c;只要如…

将某字符串切割成阵列并排序列出

老师布置的另外一道题是将字符串"a;b;d;z;y;u"切割成阵列并排序列出。老师出这题也许是让Insus.NET掌握或复习Array.Sort()函数&#xff0c;不管怎样&#xff0c;先按自己的想法实现&#xff0c;然后是等老师的意见。protected void Page_Load(object sender, EventA…

关于管理,这5大误区你越早知道越好

关于管理&#xff0c;这5大误区你越早知道越好 原创&#xff1a; 陈春花 管理的常识 绝大部分人都感觉自己已经非常努力地工作&#xff0c;但结果却不尽如人意&#xff0c;到底问题出在哪里&#xff1f; 就让北京大学国家发展研究院管理学教授、北大国发院BiMBA商学院院长陈春…

大数据技术之 Kafka (第 3 章 Kafka 架构深入 ) Log存储解析

Kafka 工作流程 Kafka 中消息是以 topic 进行分类的&#xff0c;生产者生产消息&#xff0c;消费者消费消息&#xff0c;都是面向 topic的。 topic 是逻辑上的概念&#xff0c;而 partition 是物理上的概念&#xff0c;每个 partition 对应于一个 log 文件&#xff0c;该 log…

推荐系统整体框架概览

推荐系统整体框架概览推荐系统整体架构 推荐系统的核心组成部分离线核心节点服务UI总结推荐系统整体架构 先说点题外话&#xff0c;最近在看的书中讲到了怎么进行自学的方法&#xff0c;分了十个层级。第一个便是要了解所学内容的概况&#xff0c;也就是轮廓&#xff0c;大的东…

大数据技术之 Kafka (第 3 章 Kafka 架构深入 ) Kafka 生产者

3.2.1 分区策略 1&#xff09;分区的原因 &#xff08;1&#xff09;方便在集群中扩展&#xff0c;每个 Partition 可以通过调整以适应它所在的机器&#xff0c;而一个 topic又可以有多个 Partition 组成&#xff0c;因此整个集群就可以适应任意大小的数据了&#xff1b; &a…

MySQL定时备份实现

一、备份数据库 –all-databases 备份所有数据库 /opt/mysqlcopy/all_$(date “%Y-%m-%d %H:%M:%S”).sql 备份地址 docker exec -it 容器名称 sh -c "mysqldump -u root -ppassword --all-databases > /opt/mysqlcopy/all_$(date "%Y-%m-%d %H:%M:%S").sq…

程序员健身的重要性

程序员健身的重要性人的身体就是人的灵魂最好的写照&#xff01; &#xff0d;&#xff0d;&#xff0d; 路德维系.维特根斯坦 健身不仅是保持健康体魄的关键要素之一&#xff0c;也是灵活的、具有创造性的脑力活动的基础。 &#xff0d;&#xff0d;&#xff0d; 约翰.肯尼迪 …

Java 8 中的哈希表

JDK 的代码是开源的&#xff0c;我们打开idea开发工具&#xff0c;引入jdk1.8 找到hashmap HashMap 是基于 HashTable 的一种数据结构&#xff0c;在普通哈希表的基础上&#xff0c;它支持多线程操作以及空的 key 和 value。 在 HashMap 中定义了几个常量: static final in…

NSJSONSerialization介绍

ios5中apple增加了解析JSON的api——NSJSONSerialization。网上已经有人做过测试&#xff0c;NSJSONSerialization在效率上完胜SBJSON、TouchJSON、YAJL、JSONKit、NextiveJson。详情见这里。既然apple为我们提供了这么良好的工具&#xff0c;我们没理由不用吧。 NSJSONSeriali…

[转帖]ISE与Modelsim联合观察中间信号

如何仿真IP核&#xff08;建立modelsim仿真库完整解析&#xff09; 来源&#xff1a;http://www.ednchina.com/ART_49023_19_0_AN_7116cf44.HTM IP核生成文件&#xff1a;&#xff08;Xilinx/Altera 同&#xff09; IP核生成器生成 ip 后有两个文件对我们比较有用&#xff0c;假…

sql server 2008学习12 事务和锁

事务 事务的点: 1.begin tran 是事务开始的地方,也是 事务回滚的起点.也就说他会忽略这个起点之后的最终没有提交的所有语句, 2.commit tran 事务的提交 是一个事务的终点 当发出 commit tran命令时,可以认为 该事务是 持久的. 撤销已完成事务的唯一方法 是 发出一个新的事务.…

漫画:什么是时间复杂度?

时间复杂度的意义 究竟什么是时间复杂度呢&#xff1f;让我们来想象一个场景&#xff1a;某一天&#xff0c;小灰和大黄同时加入了一个公司...... 一天过后&#xff0c;小灰和大黄各自交付了代码&#xff0c;两端代码实现的功能都差不多。大黄的代码运行一次要花100毫秒&#x…

NLP 最新进展

参考文献&#xff1a; •http://www.dataguru.cn/article-14237-1.html •https://zhuanlan.zhihu.com/p/46652512 •https://github.com/google-research/bert •https://allennlp.org/elmo •https://arxiv.org/pdf/1802.05365 •https://arxiv.org/abs/1810.04805

Big GAN

参考文献&#xff1a; •https://github.com/kayamin/DR-GAN •https://www.jianshu.com/p/4ee8f9284b81 •http://cvlab.cse.msu.edu/pdfs/Tran_Yin_Liu_CVPR2017.pdf •https://arxiv.org/abs/1809.11096 •https://juejin.im/entry/5c05e76c51882539c60cf2d5 •https:…

什么样的知识,值得我们终生学习

#什么样的知识&#xff0c;值得我们终生学习&#xff1f; 原文&#xff1a;https://dwz.cn/vylyXXJi 一、引言 可能你从初中就开始抱怨&#xff1a;我学相似三角形能干什么&#xff1f;阿伏伽德罗常数有什么用&#xff1f;我一不跳楼&#xff0c;二不高空抛物&#xff0c;学自由…

美团面试题:Hashmap的结构,1.7和1.8有哪些区别,深入的分析

&#xff08;一&#xff09; 真实面试题之&#xff1a;Hashmap的结构&#xff0c;1.7和1.8有哪些区别 不同点&#xff1a; &#xff08;1&#xff09;JDK1.7用的是头插法&#xff0c;而JDK1.8及之后使用的都是尾插法&#xff0c;那么他们为什么要这样做呢&#xff1f;因为JDK1…