任何人都可以在一台笔记本电脑上配置MULTI VM群集吗?

时间:2014-07-19 03:11:01

标签: centos apache-zookeeper cloudera-cdh

是否有人能够在1台笔记本电脑上配置2(或3)节点3 CDH 4.1群集。

笔记本电脑通过WiFi连接到互联网,虚拟机(VirtualBox,CentOS7)配置为使用桥接网络。每个虚拟机都有一个专用的IP地址,它们可以相互ping通,可以ping主机,也可以连接到互联网。

我使用这些命令安装了软件

systemctl disable firewalld.service
reboot
chmod 755 jdk-6u45-linux-x64-rpm.bin
./jdk-6u45-linux-x64-rpm.bin
wget http://archive.cloudera.com/cdh4/redhat/6/x86_64/cdh/cloudera-cdh4.repo
cp cloudera-cdh4.repo /etc/yum.repos.d/
rpm --import http://archive.cloudera.com/cdh4/redhat/6/x86_64/cdh/RPMGPG-KEY-cloudera
yum install hadoop-hdfs-namenode
yum install hadoop-hdfs-journalnode
yum install zookeeper-server
yum install hadoop-hdfs-zkfc
service zookeeper-server init --myid=1
yum install zookeeper-server
service zookeeper-server start

你可以看到我已经禁用了防火墙。但是在zookeeper.log中我可以看到

2014-07-18 17:56:29,910 [myid:1] - WARN [WorkerSender[myid=1]:QuorumCnxManager@368] - Cannot open channel to 2 at election address nn2.abhishek.com/192.168.1.31:3888
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:354)
at org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(QuorumCnxManager.java:327)
at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.process(FastLeaderElection.java:393)
at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.run(FastLeaderElection.java:365)
at java.lang.Thread.run(Thread.java:662)
2014-07-18 17:56:29,911 [myid:1] - WARN [WorkerSender[myid=1]:QuorumCnxManager@368] - Cannot open channel to 3 at election address jt1.abhishek.com/192.168.1.32:3888
java.net.NoRouteToHostException: No route to host
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at org.apache.zookeeper.server.quorum.QuorumCnxManager.connectOne(QuorumCnxManager.java:354)
at org.apache.zookeeper.server.quorum.QuorumCnxManager.toSend(QuorumCnxManager.java:327)
at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.process(FastLeaderElection.java:393)
at org.apache.zookeeper.server.quorum.FastLeaderElection$Messenger$WorkerSender.run(FastLeaderElection.java:365)
at java.lang.Thread.run(Thread.java:662)

不知怎的,我觉得CDH无法以这种方式安装,特别需要有路由器和局域网等的企业设置。

有没有人能够在一台笔记本电脑和2台虚拟机上安装CDH 4.1?你能启动zookeeper服务器吗?

请帮帮我。

1 个答案:

答案 0 :(得分:3)

我自己解决了这个问题。

我必须在所有虚拟机上执行以下操作。

systemctl disable firewalld.service
systemctl stop firewalld.service

我认为在其中一台机器上防火墙仍在运行。

解决此问题的一个好方法是从您尝试对所有其他计算机执行此操作的每台计算机

nc machine.domain.com 3888

如果这样做,则表示流量可以流动。在我的情况下,ping正在工作但是nc不是。