简体   繁体   English

Hadoop namenode拒绝连接!?我究竟做错了什么?

[英]Hadoop namenode rejecting connections!? What am I doing wrong?

My configuration: 我的配置:

Server-class machine cluster (4 machines), each with RHEL, 8GB RAM, quad core processors. 服务器级机器集群(4台机器),每台机器都配有RHEL,8GB RAM,四核处理器。 I setup machine 'B1' to be the master, rest of 'em as slaves (B2,B3,B4). 我将机器'B1'设置为主机,其余的'作为从机(B2,B3,B4)。 Kicked off dfs-start.sh, name node came up on 53410 on B1. 启动dfs-start.sh,名称节点在B1上的53410上出现。 Rest of the nodes are not able to connect to B1 on 53410! 其余节点无法连接到53410上的B1!

Here's what I did so far: 这是我到目前为止所做的:

  1. Tried "telnet B1 53410" from B2, B3, B4 - Connection refused. 从B2,B3,B4尝试“telnet B1 53410” - 连接被拒绝。
  2. Tried ssh to B1 from B2,B3,B4 and viceversa - no problem, works fine. 从B2,B3,B4尝试ssh到B1,反之亦然 - 没问题,工作正常。
  3. Changed 53410 to 55410, restarted dfs, same issue - connection refused on this port too. 将53410更改为55410,重新启动了dfs,同样的问题 - 此端口上的连接也被拒绝了。
  4. Disabled firewall (iptables stop) on B1 - tried connecting from B2,B3,B4 - fails on telnet. 在B1上禁用防火墙(iptables停止) - 尝试从B2,B3,B4连接 - 在telnet上失败。
  5. Disabled firewall on all nodes, tried again, fails again to connect to 53410. 在所有节点上禁用防火墙,再次尝试,再次失败连接到53410。
  6. Checked ftp was working from B2,B3,B4 to B1, stopped ftp service (service vsftpd stop), tried bringing up dfs on standard ftp port (21), namenode comes up, rest of the nodes are failing again. 检查ftp工作从B2,B3,B4到B1,停止ftp服务(服务vsftpd停止),尝试在标准ftp端口(21)上启动dfs,namenode出现,其余节点再次失败。 Can't even telnet to the ftp port from B2,B3,B4. 甚至无法从B2,B3,B4 telnet到ftp端口。
  7. "telnet localhost 53410" works fine on B1. “telnet localhost 53410”在B1上工作正常。

All nodes are reachable from one another and all /etc/hosts are setup with correct mapping for ip addresses. 所有节点都可以相互访问,所有/ etc / hosts都设置正确的ip地址映射。 So, I am pretty much clueless at this point. 所以,我现在几乎无能为力。 Why on earth would the namenode reject connections - is there a setting in hadoop conf, that I should be aware of to allow external clients connect remotely on the namenode port? 为什么namenode拒绝连接 - 在hadoop conf中是否有设置,我应该知道允许外部客户端在namenode端口上远程连接?

Previous answers were not clear to me. 以前的答案对我来说并不清楚。 Basically each hadoop servers (node or namenode) will create a server and listen on the IP associated with its lookup name. 基本上每个hadoop服务器(节点或名称节点)将创建一个服务器并侦听与其查找名称相关联的IP。

Let say you have 3 box (box1, box2, box3), the /etc/hosts file should look like this: 假设您有3个框(box1,box2,box3),/ etc / hosts文件应如下所示:

127.0.0.1 localhost
192.168.10.1 box1
192.168.10.2 box2
192.168.10.3 box3

Instead of : 代替 :

127.0.0.1 localhost box1
192.168.10.2 box2
192.168.10.3 box3
//(this is incorrect, box one will be listening exclusively on 127.0.0.1)

fixed this.. it was an incorrect entry in my /etc/hosts. 修复了..这是我的/ etc / hosts中的错误条目。 All nodes were connecting on loopback to master. 所有节点都在环回连接到主节点。

Try changing in conf/core-site.xml 尝试在conf / core-site.xml中进行更改

<property>
  <name>fs.default.name</name>
  <value>hdfs://localhost:54310</value>
</property>

from localhost to your machine name? 从localhost到您的机器名称?

使用正确的文件权限设置DataNode:

chmod 755 /home/svenkata/hadoop/datanode/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM