安装Hadoop环境遇到Failed to connect to server
在搭建Hadoop环境时,jps只有2344 Jps,32744 JobHistoryServer两个进程hdfs dfsadmin -report查看
17/03/31 23:26:21 WARN ipc.Client: Failed to connect to server: Master/123.206.16.62:9000: try once and fail.
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:744)
at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:531)
at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:495)
at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:681)
at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:777)
at org.apache.hadoop.ipc.Client$Connection.access$3500(Client.java:409)
at org.apache.hadoop.ipc.Client.getConnection(Client.java:1542)
at org.apache.hadoop.ipc.Client.call(Client.java:1373)
at org.apache.hadoop.ipc.Client.call(Client.java:1337)
at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:227)
at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:116)
at com.sun.proxy.$Proxy10.getFsStats(Unknown Source)
at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getStats(ClientNamenodeProtocolTranslatorPB.java:626)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:398)
at org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invokeMethod(RetryInvocationHandler.java:163)
at org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invoke(RetryInvocationHandler.java:155)
at org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invokeOnce(RetryInvocationHandler.java:95)
at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:335)
at com.sun.proxy.$Proxy11.getStats(Unknown Source)
at org.apache.hadoop.hdfs.DFSClient.getStateByIndex(DFSClient.java:2073)
at org.apache.hadoop.hdfs.DFSClient.getDiskStatus(DFSClient.java:2082)
at org.apache.hadoop.hdfs.DistributedFileSystem.getStatus(DistributedFileSystem.java:1224)
at org.apache.hadoop.fs.FileSystem.getStatus(FileSystem.java:2350)
at org.apache.hadoop.hdfs.tools.DFSAdmin.report(DFSAdmin.java:476)
at org.apache.hadoop.hdfs.tools.DFSAdmin.run(DFSAdmin.java:1908)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)
at org.apache.hadoop.hdfs.tools.DFSAdmin.main(DFSAdmin.java:2099)
report: Call From Master/123.206.16.62 to Master:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:http://wiki.apache.org/hadoop/ConnectionRefused
配置文件
请问各位大神问题出在什么地方,应该怎么解决?
首先使用
telnet master 9000
看是否通
参考
大数据集群【hadoop、hbase、spark、hive,zookeeper、storm等】故障排除之端口详解
http://www.aboutyun.com/forum.php?mod=viewthread&tid=20880
另外
dfs.replication设置为3
nextuser 发表于 2017-4-1 15:06
首先使用
看是否通
参考
# telnet master 9000
Trying 123.206.16.62...
telnet: connect to address 123.206.16.62: Connection refused
请问我的datanoe有两台,dfs.replication也设置为3吗?
检查防火墙和selinux,关闭了,检查hosts文件解析 levycui 发表于 2017-4-1 17:17
检查防火墙和selinux,关闭了,检查hosts文件解析
$ sudo service iptables status
iptables: Firewall is not running.
$ /usr/sbin/sestatus -v
SELinux status: disabled
$ cat /etc/hosts
127.0.0.1localhostlocalhost.localdomain localhost4.localdomain4
123.206.16.62 Master
123.206.66.192 Slave1
118.89.221.12 Slave2
$
您好 防火墙和SELinux都处于关闭状态,请问Hosts文件这样解析对吗?
$ hdfs dfsadmin -report
report: Call From Master/123.206.16.62 to Master:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:http://wiki.apache.org/hadoop/ConnectionRefused
$
本帖最后由 nextuser 于 2017-4-2 18:48 编辑
AceCC 发表于 2017-4-2 16:43
$ hdfs dfsadmin -report
report: Call From Master/123.206.16.62 to Master:90 ...
楼主需要完成下面事情:
123.206.16.62 Master
123.206.66.192 Slave1
118.89.221.12 Slave2
确保他们之间相互ping通【为何他们网段不同】
然后端口能ping通
telnet master 9000
楼主给出的显然端口不通的。
可以看看9000端口被谁暂用了。
netstat -anp|grep 9000
更多可以百度看看端口不通的原因
nextuser 发表于 2017-4-2 18:43
楼主需要完成下面事情:
123.206.16.62 Master
123.206.66.192 Slave1
您好,各主机能够ping通,但是端口之间却不通,防火墙也都是关闭的,我把账号和密码给您,您方便给看下具体原因吗?
页:
[1]