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



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

相关文章推荐

hbase配置哈环境时遇到的问题

1,master.HMasterCommandLine: Master exiting日志中的错误信息:2016-06-13 20:41:51,409 ERROR [main] master.HMas...

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

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

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

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

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

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

spring集成superdiamond

spring集成superdiamond        现在数据库使用superdiamond来进行统一管理的话会更加规范与操作方便,那么spring是怎么与superdiamond进行集成的呢?下面...

ava.net.BindException: Problem binding to [ubuntu-master:9000] java.net.BindException: 地址已在使用; For m

java.net.BindException: Problem binding to [ubuntu-master:9000] java.net.BindException: 地址已在使用; For ...

zookeeper集群服务搭建

zookeeper集群服务搭建 ZooKeeper是一个分布式的,开放源码的分布式应用程序协调服务,是Google的Chubby一个开源的实现,是Hadoop和Hbase的重要组件。它是一个为...

Kafka学习之四 Kafka常用命令

Kafka常用命令

zookeeper启动失败的排错

运行zookeeperd后显示启动成功: JMX enabled by default Using config: /data/programfiles/zookeeper-3.4.5/b...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

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