每当我运行任何hdfs dfs
命令时,我都会得到Call From hostnamehere/10.138.238.104 to hostnamehere:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused
我在网上搜索了很多解决方案,但似乎每个人都提供了同样的几个解决方案,而且没有一个对我有效。我尝试过以下几种方法:
stop-dfs.sh
和start-dfs.sh
-这没什么用
stop-dfs.sh
和hadoop namenode -format
,然后是start-dfs.sh
-这将修复它大约5分钟(我可以运行hdfs dfs
命令),然后它将返回到ConnectException
错误。
仔细检查我的core-site.xml
和其他hadoop配置,以确保它们是正确的(与另一个工作的.xml集群完全相同的配置)
已检查/etc/hosts
以确保主机和主机名正确。
systemctl stop/start hadoop
-没帮上忙
从我尝试的所有方法中,唯一暂时有效的方法是执行hadoop namenode -format
,但它只修复了大约5分钟,然后它再次崩溃。还有人有其他建议吗?我很困惑,因为它怎么能工作几分钟,然后又不工作呢?这一定意味着配置是正确的,否则它永远不会工作,对吧?
发布于 2020-11-19 14:16:24
检查/etc/hosts检查core-site.xml,确保您的ip与hdfs://ip:8020相同,然后停止-dfs.sh start-dfs.sh ok
https://stackoverflow.com/questions/61942783
复制相似问题