Get the App
SLTechnology News&Howtos  ›  Servers  › 

The java program in eclipse cannot access the hdfs file system and reports: what should Connection Refused do?

Shulou Source: shulou.com Published: 2022-06-01 00:28:00 10月04日 Update

This issue of the content of the editor will bring you about the java program in eclipse can not access the hdfs file system and report: Connection Refused how to do, the article is rich in content and professional analysis and description for you, after reading this article, I hope you can get something.

Phenomenon: after starting hadoop in pseudo-distributed mode, the java program on eclipse cannot access the hdfs file system, report: Connection Refused

Analysis:

The hadoop server and client code are no longer on the same machine. Telnet 192.168.222.128 9000 does not work on the client machine, telnet 127.0.0.1 9000 is fine on the server, but telnet 192.168.222.128 9000 does not work, so it is no wonder that the server cannot be accessed on client. Later, I thought that the value of fs.defaultFS configured in core-site.xml is hdfs://localhost:9000. I think it may have something to do with this. Then change to the hostname hadoop (there is 192.168.222.128 hadoop in / etc/hosts), restart the hdfs service, and then use the client to access it.

The above is the java program in eclipse shared by Xiaobian cannot access the hdfs file system and report: what should Connection Refused do? if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Tags: Service file program system server analysis how to do content question relevant professional small and medium host code rich content client client that is article way Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Docker Apple vpn NVidia