前言

经历:

最近在搭建zookeeper集群,基础是3台机器(尝试过ubuntu 17 和 Centos 7)。

一开始选择的是3台腾讯云服务器,每台机器在java环境配置正确的情况下,单机的情况都运行正常。

(java环境配置教程:http://www.cnblogs.com/toulanboy/p/8681204.html

但是一旦尝试建立集群(也就是zoo.cfg包含3条服务器条目时),则相互连接失败。

报的第一个异常是:

BindException: Cannot assign requested address

尝试过的方案:

1. 关闭防火墙(解决失败)

2. 将外网IP换成内网IP(腾讯云提供的内网ip互相Ping不通)

本文博客地址:http://www.cnblogs.com/toulanboy/

最终解决方案:用物理机,且必须在同一局域网下

总结故障原因可能有2:

1. 腾讯云服务器底层有其他限制,导致zookeeper集群无法成功互相连接。

2. 集群的机器需要在同一局域网下。

以上是我这一周来的头疼总结。希望对你有帮助。

Zookeeper 集群 BindException: Cannot assign requested address 解决方案的更多相关文章

  1. com.sun.xml.internal.ws.server.ServerRtException: Server Runtime Error: java.net.BindException: Cannot assign requested address: bind

    在发布 web service 时报错: Endpoint.publish(publishAddress, hl7MessageReveiver); com.sun.xml.internal.ws.s ...

  2. tomcat java.net.BindException: Cannot assign requested address 解决方法

    今天线上TOMCAT启动时遇到了下比较麻烦的问题,错误如下: 21-Apr-2016 15:14:19.077 SEVERE [main] org.apache.catalina.core.Stand ...

  3. Tomcat启动报错:严重: StandardServer.await: create[8005] java.net.BindException: Cannot assign requested address

    org.apache.catalina.core.StandardServer await        SEVERE: StandardServer.await: create[8005]:    ...

  4. java.net.BindException: Cannot assign requested address: bind

    异常信息 时间:2017-03-16 10:21:05,644 - 级别:[ERROR] - 消息: [other] Failed to start end point associated with ...

  5. tomcat启动端口号报错java.net.BindException: Cannot assign requested address

    异常信息 时间:2017-02-09 15:09:59,829 - 级别:[ERROR] - 消息: [other] Failed to start end point associated with ...

  6. 服务器启动socket服务报错 java.net.BindException:Cannot assign requested address

    错误信息:  2017-06-13 11:18:00,865 [GateServer.java:82][ERROR]:启动服务出错了java.net.BindException: Cannot ass ...

  7. Tomcat启动异常 java.net.BindException: Cannot assign requested address: JVM_Bind

    从Apache官网下载的tomcat7,在MyEclipse中启动时抛出如下异常: 严重: StandardServer.await: create[localhost:8005]: java.net ...

  8. Tomcat启动报错:StandardServer.await: create[8005] java.net.BindException: Cannot assign requested address

    Tomcat启动报错:StandardServer.await: create[8005] java.net.BindException: Cannot assign requested addres ...

  9. Tomcat启动报错:java.net.BindException: Cannot assign requested address: JVM_Bind

    Tomcat启动报错:java.net.BindException: Cannot assign requested address: JVM_Bind Tomcat Cannot assign re ...

随机推荐

  1. math(2018.10.27)

    20%的数据直接暴搜就行,接下来我们考虑哪些数不能够出现在同一个集合中,就连一 条边,我们会发现前

  2. ZOJ 4033 CONTINUE...?(The 15th Zhejiang Provincial Collegiate Programming Contest Sponsored by TuSimple)

    #include <iostream> #include <algorithm> using namespace std; ; int a[maxn]; int main(){ ...

  3. cmd,bat和dos的区别

    区别 dos是磁盘操作系统(Disk Operating System),是个人计算机上的一类操作系统. bat是DOS命令,在任何dos环境下都可以使用. bat文件是dos下的批处理文件,批处理文 ...

  4. Tinghua Data Mining 4

    贝叶斯 决策树 知道三文鱼和金枪鱼颜色 让你去猜 B命中的概率不能直接减去四分之三 因为有可能同时命中 A B 命中不是互斥事件 即便体检报告是阳性,真正得癌症的概率也很小,只有0.21 绝大多数的阳 ...

  5. [WOJ3010] 骰子

    题目描述: 骰子是一个六面分别刻有一到六点的立方体,每次投掷骰子,理论上得到\(1\)到\(6\)的概率都是\(1/6\). 有骰子一颗,连续投掷\(n\)次,问点数总和大于等于\(X\)的概率是多少 ...

  6. 洛谷 P1042 乒乓球

    P1042 乒乓球 var s:string; a1:array[1..50000] of char; i,n,x,y:longint; procedure f1; begin while not e ...

  7. 从navicat for mysql导出数据库语句时应该加上的两条语句

    为了不引起编码问题,一般在从navict for mysql导出一个数据库时在文件最前面添加这2句语句: CREATE DATABASE IF NOT EXISTS `` default charac ...

  8. Thinking In Java持有对象阅读记录

    这里记录下一些之前不太了解的知识点,还有一些小细节吧 序 首先,为什么要有Containers来持有对象,直接用array不好吗?——数组是固定大小的,使用不方便,而且是只能持有一个类型的对象,但当你 ...

  9. python学习之图形界面编程:

    一 tkinter:tkinter是python自带的支持tk的库,python代码调用tkinter->tk->操作系统提供的本地GUI(TKL语言开发))完成界面开发,不需要安装任何第 ...

  10. compare `lvs/haproxy/nginx`

    特性 LVS Nginx Haproxy 工作层 四层(传输层TCP/UDP) 七层(应用层) 四层.七层 应用范围 基于TCP和UDP之上的协议都可以 Http.mail HTTP.TCP之上应用 ...