Zookeeper启动失败:java.net.BindException: Address already in use
错误日志如下:
[hadoop@master zookeeper-3.4.5-cdh5.10.0]$ cat zookeeper.out
2018-05-15 01:29:21,036 [myid:] - INFO [main:QuorumPeerConfig@101] - Reading configuration from: /opt/modules/zookeeper-3.4.5-cdh5.10.0/bin/../conf/zoo.cfg
2018-05-15 01:29:21,045 [myid:] - INFO [main:QuorumPeerConfig@334] - Defaulting to majority quorums
2018-05-15 01:29:21,048 [myid:1] - INFO [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
2018-05-15 01:29:21,048 [myid:1] - INFO [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0
2018-05-15 01:29:21,049 [myid:1] - INFO [main:DatadirCleanupManager@101] - Purge task is not scheduled.
2018-05-15 01:29:21,065 [myid:1] - INFO [main:QuorumPeerMain@132] - Starting quorum peer
2018-05-15 01:29:21,074 [myid:1] - INFO [main:NIOServerCnxnFactory@94] - binding to port 0.0.0.0/0.0.0.0:2181
2018-05-15 01:29:21,076 [myid:1] - ERROR [main:QuorumPeerMain@94] - Unexpected exception, exiting abnormally
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:433)
at sun.nio.ch.Net.bind(Net.java:425)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:67)
at org.apache.zookeeper.server.NIOServerCnxnFactory.configure(NIOServerCnxnFactory.java:95)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:135)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:116)
at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:79)
如日志中红色字体所示,该错误是由于Zookeeper对应的端口号被占用导致的。
查看端口占用情况:
[hadoop@master zookeeper-3.4.5-cdh5.10.0]$ sudo netstat -nltp | grep 2181
tcp 0 0 :::2181 :::* LISTEN 3071/java
如上所示,占用Zookeeper对应端口号的应用是java,只需要kill掉该应用就能成功启动Zookeeper了。
[hadoop@master zookeeper-3.4.5-cdh5.10.0]$ sudo kill -9 3071
重启如下:
[hadoop@master zookeeper-3.4.5-cdh5.10.0]$ bin/zkServer.sh start
JMX enabled by default
Using config: /opt/modules/zookeeper-3.4.5-cdh5.10.0/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
[hadoop@master zookeeper-3.4.5-cdh5.10.0]$ jps
6481 Jps
5330 DataNode
5733 ResourceManager
5077 DFSZKFailoverController
6456 QuorumPeerMain
5225 NameNode
5514 JournalNode
5837 NodeManager
Zookeeper启动成功!
以上就是博主为大家介绍的这一板块的主要内容,这都是博主自己的学习过程,希望能给大家带来一定的指导作用,有用的还望大家点个支持,如果对你没用也望包涵,有错误烦请指出。如有期待可关注博主以第一时间获取更新哦,谢谢!
版权声明:本文为博主原创文章,未经博主允许不得转载。
Zookeeper启动失败:java.net.BindException: Address already in use的更多相关文章
- [已解决]Tomcat启动报 java.net.BindException: Address already in use: JVM_Bind
启动多个Tomcat的的时候记得要改3个端口: <Server port="8001" shutdown="SHUTDOWN"> <Conne ...
- 集群某节点DataNode服务无法启动解决(报java.net.BindException:Address already in use错误)
现象: 在集群中某节点, 启动DataNode服务后马上又Shutdown, 在操作系统没看到有DataNode的日志(可能是服务启动失败, 自动删除了日志文件),幸好在界面上可以查看报错的日志: ...
- 【tomcat】启动报错:Failed to initialize end point associated with ProtocolHandler ["http-apr-8080"] java.lang.Exception: Socket bind failed 和java.net.BindException: Address already in use: JVM_Bind错误解决
背景:[新手] 将开发机子上的Tomcat连同其中的项目,一起拷贝到服务器上,启动tomcat的start.bat,然后报错如下: 问题1: Failed to initialize end poin ...
- Phoenix 无法启动报错: java.net.BindException: Address already in use
一.问题描述 i. 登录Ambari发现有一个节点的 Phoenix 无法启动 ii. 在Ambari上点击“Start”,监控 Phoenix 日志文件 iii. Phoenix 日志如下: [ro ...
- Tomcate 启动异常,java.net.BindException: Address already in use: JVM_Bind:80的解决办法
一直用Tomcat,但是前几天突然报错: java.net.BindException: Address already in use: JVM_Bind:80 第一反应就是80端 ...
- IDEA启动报错-java.net.BindException: Address already in use: bind
启动IDEA报错日志如下: Internal error. Please refer to http://jb.gg/ide/critical-startup-errors java.net.Bind ...
- Jenkins启动时报错:java.net.BindException: Address already in use: bind 解决方法
下载jenkins.war包后,进入Jenkins.war包目录下,运行java -jar jenkins.war时报端口被占用的错误:java.net.BindException: Address ...
- java.net.BindException: address already in use <null>:xxxx
linux下,tomcat突然关闭了,执行关闭(shutdown.sh)和启动(startup.sh)成功后,tomcat仍未运行,查看tomcat的catalina日志发现这样一个报错:java.n ...
- java.net.BindException: Address already in use: JVM_Bind
是端口占用,如果修改端口后仍提示这样的错误,可能是eclipse自动关闭或正在运行服务非正常中断导致端口没有关闭,这时你再启动,还是提示java.net.BindException: Address ...
随机推荐
- Poj 2602 Superlong sums(大数相加)
一.Description The creators of a new programming language D++ have found out that whatever limit for ...
- java基础知识学习 java异常
1: Unchecked Exception( 也就是运行时异常) VS Check Exception(非运行时异常) 2: 运行期异常 VS 非运行期异常? 非运行时异常: 必须在代码中显示 ...
- MySQL(介绍1)
数据库(Database)是按照数据结构来组织.存储和管理数据的仓库: 也可以将数据存储在文件中,但是在文件中读写数据速度相对较慢. 在WEB应用方面MySQL是最好的RDBMS(Relational ...
- centos6.5安装zookeeper教程(三)
阅读前建议先阅读: http://www.cnblogs.com/duenboa/articles/6665159.html 1. 下载安装文件zookeeper-3.4.6.tar.gz 镜像地 ...
- mongodb 分页(limit)
db.COLLECTION_NAME.find().limit(NUMBER) db.mycol.find().limit() db.mycol.find({},{,_id:}).limit().sk ...
- ubuntu server usb安装盘制作问题
本来服务器上装的是windows server 2003,开多个虚拟机装linux来用,但发现不管是vmware还是virtualbox,总是有内存泄漏,大约2个星期左右16G内存就全没了,任务管理器 ...
- 【机器学习】推荐系统、SVD分解降维
推荐系统: 1.基于内容的实现:KNN等 2.基于协同滤波(CF)实现:SVD → pLSA(从LSA发展而来,由SVD实现).LDA.GDBT SVD算是比较老的方法,后期演进的主题模型主要是pLS ...
- 11.Weblogic-SSRF漏洞复现
应为这一阵正好在学习SSRF漏洞,又苦于本人太菜没有挖到SSRF,只能复现... 先贴出很早之前央视网SSRF可窥探内网(Weblogic SSRF案例):https://www.secpulse.c ...
- 1.5 xss漏洞修复
1.XSS漏洞修复 从上面XSS实例以及之前文章的介绍我们知道XSS漏洞的起因就是没有对用户提交的数据进行严格的过滤处理.因此在思考解决XSS漏洞的时候,我们应该重点把握如何才能更好的将用户提交的数据 ...
- 结合jenkins以及PTP平台的性能回归测试
此文已由作者余笑天授权网易云社区发布. 欢迎访问网易云社区,了解更多网易技术产品运营经验. 1背景简介 1.1 jenkins Jenkins是一个用Java编写的开源的持续集成工具.在与Oracle ...