linux 安装启动zookeeper全过程及遇到的坑

1、下载安装zookeeper

参考文章:https://blog.csdn.net/weixin_48887095/article/details/132397448


2、启动失败

1、启动失败JAVA_HOME is not set and java could not be found in PATH


2、启动失败 ClassNotFoundException: org.apache.zookeeper.server.quorum.QuorumPeerMain

bash 复制代码
[root@xxx] zkServer.sh start-foreground

ZooKeeper JMX enabled by default
Using config: /usr/local/zookeeper/bin/../conf/zoo.cfg
Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain
Caused by: java.lang.ClassNotFoundException: org.apache.zookeeper.server.quorum.QuorumPeerMain

解决方法:https://blog.csdn.net/weixin_48887095/article/details/132397448


3、启动失败,端口8080被占用 Caused by: java.io.IOException: Failed to bind to /0.0.0.0:8080

解决方法:


4、启动失败,端口2181被占用 java.net.BindException: Address already in use

3 启动成功

  • 服务端启动成功:bash zkServer.sh status start
  • 查看服务端状态:bash zkServer.sh status
  • 停止服务端:bash zkServer.sh stop
  • 启动客户端:bash zkCli.sh
相关推荐
VNDR31 分钟前
工欲善其事,必先利其器
linux
心灵宝贝1 小时前
Fedora 38 安装 perl-JSON RPM 包步骤(含依赖问题解决及附安装包)
linux
lilili也1 小时前
Linux——0:安装与配置、命令、gcc
linux
is08152 小时前
全志 H3 armbian 备份
linux·服务器·网络
iconball3 小时前
个人用云计算学习笔记 --18(NFS 服务器、iSCSI 服务器)
linux·运维·笔记·学习·云计算
广药门徒3 小时前
Linux驱动开发与BuildRoot是什么关系与其的应用场景
linux·运维·驱动开发
czhc11400756633 小时前
Linux108 shell:.bashrc 正则表达式:. * .* ^ $ ^$ [ ] [^] ^[] ^[^ ] \< \>
linux·正则表达式
野猪疯驴3 小时前
Linux shell学习(更新中....)
linux·shell
努力学习的小廉4 小时前
深入了解linux网络—— TCP网络通信(下)
linux·网络·tcp/ip
Lu Zelin10 小时前
单片机为什么不能跑Linux
linux·单片机·嵌入式硬件