700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > Hdfs连接报错java.net.ConnectException: Connection timed out: no further information

Hdfs连接报错java.net.ConnectException: Connection timed out: no further information

时间:2020-07-02 04:33:56

相关推荐

Hdfs连接报错java.net.ConnectException: Connection timed out: no further information

目录

1 连接超时2 排查具体问题2.1.检查网络能不能ping通,防火墙问题2.2 检查zookeeper有没有开启2.3 最后检查Hue中Hdfs节点挂掉3 解决方法

1 连接超时

2 排查具体问题

2.1.检查网络能不能ping通,防火墙问题

由于有Hue可以访问,网络没有问题或者看是否连通,因为可能防ping

telnet 80

2.2 检查zookeeper有没有开启

2.3 最后检查Hue中Hdfs节点挂掉

最后可以看出上述问题都没有所以大环境是没有错,那就是代码的问题

3 解决方法

问题在于使用本地读取hdfs文件时,服务器datanode使用的是内网进行通信,所以我们把hdfs-site.xml和core-site.xml文件导入到Idea中时,需要修改hdfs-site.xml中的以下配置:

<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="configuration.xsl"?><!--Licensed under the Apache License, Version 2.0 (the "License");you may not use this file except in compliance with the License.You may obtain a copy of the License at/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed under the License is distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License. See accompanying LICENSE file.--><!-- Put site-specific property overrides in this file. --><configuration><property><name>dfs.namenode.name.dir</name><value>/opt/hdfs/namenode</value><description>NameNode directory for namespace and transaction logs storage.</description></property><property><name>dfs.datanode.data.dir</name><value>/opt/hdfs/datanode</value><description>DataNode directory</description></property><property><name>dfs.replication</name><value>2</value></property><property><name>dfs.permissions</name><value>false</value><description>need not permissions</description></property><property><name>dfs.webhdfs.enabled</name><value>true</value></property><property><name>dfs.datanode.max.xcievers</name><value>4096</value></property><property><name>dfs.client.use.datanode.hostname</name><value>true</value></property></configuration>

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。