zoukankan      html  css  js  c++  java
  • Exception in thread “main“ java.net.ConnectException: Call From

    问题描述:
    #报错语句:
    FileSystem fs = FileSystem.get(new URI("hdfs://hadoop000:8020"),new Configuration(),"hadoop");

    #异常信息
    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
    原因分析:
    /root/app/hadoop-2.6.0-cdh5.7.0/etc/hadoop/core-site.xml

    fs.defaultFS 参数配置使用了域名 且域名未配置映射

    解决方案:
    vim /root/app/hadoop-2.6.0-cdh5.7.0/etc/hadoop/core-site.xml
    #8020前使用IP地址,不要使用主机名
    <configuration>

    <property>
    <name>fs.defaultFS</name>
    <value>hdfs://192.168.154.129:8820</value>
    </property>

    </configuration>

  • 相关阅读:
    leetcode 451 根据字符出现频率排序
    leetcode 1833 雪糕的最大数量
    leetcode 166 Excel表列名称
    877 石子游戏
    01 背包问题
    正则表达式
    leetcode 160 相交链表
    git 备忘录
    leetcode 525 连续数组
    Mysite
  • 原文地址:https://www.cnblogs.com/lx06/p/15688895.html
Copyright © 2011-2022 走看看