当前位置: 首页 > 工具软件 > node.net > 使用案例 >

java.net.ConnectException: Call From node03/127.0.0.1 to node01:9000 failed on connection except

谷梁嘉运
2023-12-01

环境

  1. 三台云服务搭建hive是出现的错
  2. 一台阿里云,两台腾讯云

错误内容

Exception in thread "main" java.lang.RuntimeException: java.net.ConnectException: Call From node03/127.0.0.1 to node01:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
...
...
Caused by: java.net.ConnectException: Call From node03/127.0.0.1 to node01:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
...
Caused by: java.net.ConnectException: Connection refused

解决方案

# 1.查看/etc/hosts是否有错误

# hosts内容
# 内网ip
xxx.xxx.xxx.xxx node1
# 外放集群ip
xxx.xxx.xxx.xxx node01
xxx.xxx.xxx.xxx node02
xxx.xxx.xxx.xxx node03

# 2.查看core-site.xml
# 地址
cd $HADOOP_HOME/etc/hadoop
# ip配置成内网地址

内容案例

<!-- 指定HDFS中NameNode的地址 -->
<!--ip配置成内网地址 -->
  <property>
    <name>fs.defaultFS</name>
    <value>hdfs://node1:9000</value>
  </property>

启动hadoop

# 启动dfs时出现
Are you sure you want to continue connecting (yes/no/[fingerprint])?
# yes即可

研究好久,共享

 类似资料:

相关阅读

相关文章

相关问答