【第22期】观点:IT 行业加班,到底有没有价值?

Zookeeper启动失败(java.net.BindException: 地址已在使用)

原创 2016年06月13日 16:24:21


[hadoop@DEV22 ~]$ opt/zookeeper-3.4.8/bin/zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /home/hadoop/opt/zookeeper-3.4.8/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
[hadoop@DEV22 ~]$ jps
8637 Jps
[hadoop@DEV22 ~]$ cat zookeeper.out 
2016-06-13 15:55:17,304 [myid:] - INFO  [main:QuorumPeerConfig@103] - Reading configuration from: /home/hadoop/opt/zookeeper-3.4.8/bin/../conf/zoo.cfg
2016-06-13 15:55:17,315 [myid:] - INFO  [main:QuorumPeer$QuorumServer@149] - Resolved hostname: 192.168.0.72 to address: /192.168.0.72
2016-06-13 15:55:17,315 [myid:] - INFO  [main:QuorumPeer$QuorumServer@149] - Resolved hostname: 192.168.0.83 to address: /192.168.0.83
2016-06-13 15:55:17,316 [myid:] - INFO  [main:QuorumPeer$QuorumServer@149] - Resolved hostname: 192.168.0.73 to address: /192.168.0.73
2016-06-13 15:55:17,316 [myid:] - INFO  [main:QuorumPeerConfig@331] - Defaulting to majority quorums
2016-06-13 15:55:17,321 [myid:1] - INFO  [main:DatadirCleanupManager@78] - autopurge.snapRetainCount set to 3
2016-06-13 15:55:17,321 [myid:1] - INFO  [main:DatadirCleanupManager@79] - autopurge.purgeInterval set to 0
2016-06-13 15:55:17,321 [myid:1] - INFO  [main:DatadirCleanupManager@101] - Purge task is not scheduled.
2016-06-13 15:55:17,331 [myid:1] - INFO  [main:QuorumPeerMain@127] - Starting quorum peer
2016-06-13 15:55:17,337 [myid:1] - INFO  [main:NIOServerCnxnFactory@89] - binding to port 0.0.0.0/0.0.0.0:2181
2016-06-13 15:55:17,337 [myid:1] - ERROR [main:QuorumPeerMain@89] - Unexpected exception, exiting abnormally
java.net.BindException: 地址已在使用
	at sun.nio.ch.Net.bind0(Native Method)
	at sun.nio.ch.Net.bind(Net.java:463)
	at sun.nio.ch.Net.bind(Net.java:455)
	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:90)
	at org.apache.zookeeper.server.quorum.QuorumPeerMain.runFromConfig(QuorumPeerMain.java:130)
	at org.apache.zookeeper.server.quorum.QuorumPeerMain.initializeAndRun(QuorumPeerMain.java:111)
	at org.apache.zookeeper.server.quorum.QuorumPeerMain.main(QuorumPeerMain.java:78)

端口被占用了,把2181端口改成别的就可以了

[hadoop@DEV22 ~]$ vi opt/zookeeper-3.4.8/conf/zoo.cfg 
[hadoop@DEV22 ~]$ opt/zookeeper-3.4.8/bin/zkServer.sh start
ZooKeeper JMX enabled by default
Using config: /home/hadoop/opt/zookeeper-3.4.8/bin/../conf/zoo.cfg
Starting zookeeper ... STARTED
[hadoop@DEV22 ~]$ jps
8694 QuorumPeerMain
8728 Jps


PS:

以下针对不同版本的Linux系统检查防火墙的状态,及关闭防火墙:

---------------------------------------------------------------

Ubuntu(ubuntu-12.04-desktop-amd64

查看防火墙状态:ufw status

关闭防火墙:ufw disable

---------------------------------------------------------------

centos6.0

查看防火墙状态:service iptables status

关闭防火墙:chkconfig iptables off    #开机不启动防火墙服务

--------------------------------------------------------------

centos7.0(默认是使用firewall作为防火墙,如若未改为iptables防火墙,使用以下命令查看和关闭防火墙)

查看防火墙状态:firewall-cmd --state

关闭防火墙:systemctl stop firewalld.service



版权声明:本文为博主原创文章,转载请加上原文地址,谢谢! 举报

相关文章推荐

org.mortbay.util.MultiException[java.net.BindException: 地址已在使用

原因:  通常是端口被占用  排查方法:         首先,利用 netstat -alnp | grep 8080 查看端口使用情况 (可跳过)        利用 jps -v  |gr...

java.net.BindException: 地址已在使用

java.net.BindException: 地址已在使用 java.net.BindException: 地址已在使用,也可以说是端口被占用,通常出现在启动服务的时候。 1、出错地方如图所示:...

程序员升职加薪指南!还缺一个“证”!

CSDN出品,立即查看!

utf-8、gbk、unicode相互转码的几种方式

utf-8、gbk、unicode相互转码的几种方式 以下代码是java对于常见编码方式进行相互转换的,主要是gbk和utf-8互转,gbk与uncode互转,utf-8与unicode互转。 p...

The processing instruction target matching "[xX][mM][lL]" is not allowed.

The processing instruction target matching "[xX][mM][lL]" is not allowed             在写配置文件的时候容易范...

Tomcat在Linux上的安装与配置

Tomcat在Linux上的安装与配置     以下使用的Linux版本为: Redhat Enterprise Linux 7.0 x86_64,Tomcat版本为tomcat-7.0.5...
  • gyming
  • gyming
  • 2014-06-30 23:07
  • 132268

java.net.BindException: Address already in use <null>:8081

java.net.BindException: Address already in use :8081         ??? linux+tomcat 服务器 项目刚放上去测试都没问题,没有动...

zookeeper启动失败的排错

运行zookeeperd后显示启动成功: JMX enabled by default Using config: /data/programfiles/zookeeper-3.4.5/b...

zookeeper启动失败的排错

1.执行zkServer.sh start 后显示: JMX enabled by default Using config:/home/hadoop/app/zookeeper-3.4.5/bi...

zookeeper遇见错误总结

我发现初学者搭建zookeeper的出错率比hadoop还要高。

学习Hadoop第二课(安装JDK)

上一节课我们学习了虚拟机和Windows互相Ping通的内容,这节课我们来学习如何安装JDK。          既然要安装JDK,我们首先便要下载JDK的安装包,没有安装包的童鞋可以到:http:/...
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)