Tag Archives: Exception in thread “main“ java.net.ConnectException: Call From

[Solved] Exception in thread “main“ java.net.ConnectException: Call From

#Error Codes:
FileSystem fs = FileSystem.get(new URI("hdfs://hadoop000:8020"),new Configuration(),"hadoop");

#Error Messages:

Exception in thread "main" java.net.ConnectException:
Call From DESKTOP-09ASUHR/192.168.56.1 to 192.168.137.101:8020
failed on connection exception:
java.net.ConnectException:
Connection refused:
no further information;
For more details see: http://wiki.apache.org/hadoop/ConnectionRefused

#Cause Analysis:
/root/app/hadoop-2.6.0-cdh5.7.0/etc/hadoop/core-site.xml

The fs.defaultFS parameter is configured to use a domain name and the domain name is not mapped.

#Solution:
vim /root/app/hadoop-2.6.0-cdh5.7.0/etc/hadoop/core-site.xml
Use IP address before #8020, not hostname

fs.defaultFS
hdfs://192.168.154.129:8820