ls: Call From hdoop2/192.168.18.87 to hdoop2:8020 failed on connection exception: java.net.ConnectException: 拒绝连接; For more details see

场景:  预发环境中,同事已经搭建了一套hadoop集群,由于版本与所需不符,所以需要替换版本

问题描述: 在配置文件都准确的情况下,启动hadoop,出现以下报错:

启动之前初始化:   初始化目录跟配置文件目录不一致

hdfs  namenode -format

[[email protected] hadoop-2.8.5]# hadoop dfs -ls /
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.

ls: Call From hdoop2/192.168.18.87 to hdoop2:8020 failed on connection exception: java.net.ConnectException: 拒绝连接; For more details see: http://wiki.apache.org/hadoop/ConnectionRefused

[[email protected] hadoop-2.8.5]# jps      #namenode没启动
88467 SecondaryNameNode
88821 NodeManager
88692 ResourceManager
88254 DataNode
195389 AlertPublisher

排查:

[[email protected] hadoop-2.8.5]# which hadoop
/usr/bin/hadoop

[[email protected] hadoop-2.8.5]# which hdfs
/usr/bin/hdfs

[[email protected] hadoop-2.8.5]# vim /etc/profile               #可以看到配置的hadoop环境没生效,原因是:之前在/usr/bin下配置了启动脚本,服务器优先回去读取/usr/bin下的启动程序

#hadoop
export HADOOP_HOME=/home/software/hadoop/hadoop-2.8.5
export PATH=$PATH:$HADOOP_HOME/bin

解决方法:

1.移除旧的环境变量

[[email protected] hadoop-2.8.5]# mv /usr/bin/hadoop   /usr/bin/hadoop.old

[[email protected] hadoop-2.8.5]# mv /usr/bin/hdfs /usr/bin/hdfs.old

[[email protected] hadoop-2.8.5]# which hadoop     #可以看到配置的环境变量生效了
/home/software/hadoop/hadoop-2.8.5/bin/hadoop

2.重启hadoop

3.重新格式化:

[[email protected] hadoop-2.8.5]# hadoop namenode -format

Re-format filesystem in Storage Directory /home/software/hadoop/hadoop-2.8.5/data/name ? (Y or N)

结果:  问题解决

总结:如果遇到了百思不得其解的问题,而且确认自己的配置没问题,那么:检查一下环境配置是否有问题 ---------MD。搞了TM俩天终于找到原因了,记录一下

原文地址:https://www.cnblogs.com/byfboke/p/10043805.html

时间: 2024-10-06 15:53:49

ls: Call From hdoop2/192.168.18.87 to hdoop2:8020 failed on connection exception: java.net.ConnectException: 拒绝连接; For more details see的相关文章

Caused by: java.net.ConnectException: Call From master/192.168.199.130 to master:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.

1:安装好hive,准备启动的时候出现下面的错误(由于hive是基于Hadoop的,所以必须先将你的集群启动起来,我就是没有启动集群,直接启动hive导致的错误): 1 [[email protected] bin]# ./hive 2 3 Logging initialized using configuration in jar:file:/home/hadoop/soft/apache-hive-1.2.1-bin/lib/hive-common-1.2.1.jar!/hive-log4j

Call From master/192.168.128.135 to master:8485 failed on connection exception: java.net.ConnectException: Connection refused

hadoop集群搭建了ha,初次启动正常,最近几天启动时偶尔发现,namenode1节点启动后一段时间(大约10几秒-半分钟左右),namenode1上namenode进程停掉,查看日志: 1 2017-08-28 21:54:37,617 INFO org.apache.hadoop.ipc.Client: Retrying connect to server: slave1/192.168.128.136:8485. Already tried 9 time(s); retry policy

格式化namenode时 报错 No Route to Host from node1/192.168.1.111 to node3:8485 failed on socket timeout exception: java.net.NoRouteToHostException: No route to host

17/08/03 16:06:05 FATAL namenode.NameNode: Failed to start namenode. org.apache.hadoop.hdfs.qjournal.client.QuorumException: Unable to check if JNs are ready for formatting. 1 successful responses: 192.168.1.114:8485: false 1 exceptions thrown: 192.1

ssh登录 The authenticity of host 192.168.0.xxx can't be established. 的问题

scp免密码登录:Linux基础 - scp免密码登陆进行远程文件同步 执行scp一直是OK的,某天在本地生成了公钥私钥后,scp到某个IP报以下错误 The authenticity of host '192.168.233.137 (192.168.233.137)' can't be established. ECDSA key fingerprint is SHA256:EsqTfeCJ34DnGV66REuRRPhoFwaLuee5wxFgEAZ8b9k. Are you sure y

Mysql远程连接报错:SQL Error (1130): Host '192.168.6.128' is not allowed to connect to this MySQL server

通过SQLyog连接linux中的MySQL报错问题:SQL Error (1130): Host '192.168.6.128' is not allowed to connect to this MySQL server说明你所连接的用户账户没有远程连接的权限,只能在本机localhost登录需要更改 mysql 数据库里的 user表里的 host字段 把localhost改称%下面是我设置的远程连接步骤,请参考: 1.登录MySQL  mysql -uroot -proot2.进入数据库

三种方法告诉你项目超过255个摄像机怎么设置IP?为什么IP地址通常以192.168开头?

我们做弱电的,与ip地址接触最多,无论是弱电的哪方面,都需要跟ip地址打交道,通常我们也会经常听到公网.内网?那什么是公网ip地址呢?什么是私网ip地址呢?为什么我们常见到的ip地址以192.168开头呢? 还有就是一个网段只能容纳254个摄像机,但是我现在项目比较大,都有300多个摄像机了,该咋分配IP地址呢? 我们今天统统来了解一下. 首先关于内.外网的定义:内.外网是相对于防火墙而言的,在防火墙内部叫做内网,反之就是外网.在一定程度上外网等同于公网,内网等同于私网. 一.特殊的IP地址 1

接收对 http://192.168.1.18:8001/ObtainData/Service 的 HTTP 响应时发生错误。这可能是由于服务终结点绑定未使用 HTTP 协议造成的。这还可能是由于服务器中止了 HTTP 请求上下文(可能由于服务关闭)所致。

[2015/8/5 19:28:49]错误信息:接收对 http://192.168.1.18:8001/ObtainData/Service 的 HTTP 响应时发生错误.这可能是由于服务终结点绑定未使用 HTTP 协议造成的.这还可能是由于服务器中止了 HTTP 请求上下文(可能由于服务关闭)所致.有关详细信息,请参见服务器日志.异常类型:System.ServiceModel.CommunicationException程序集:mscorlib方法:Void HandleReturnMes

192.168.0.1/16,1/24;192.168.1.1/16,1/24   IP段的意思

首先来了解一下二进制的转换知识: 二进制数转换成十进制数 二进制的1101转化成十进制1101(2)=1*2^0+0*2^1+1*2^2+1*2^3=1+0+4+8=13转化成十进制要从右到左用二进制的每个数去乘以2的相应次方不过次方要从0开始相反 用十进制的13除以2 每除一下将余数就记在旁边最后按余数从下向上排列就可得到1101十进制转二进制:用2辗转相除至结果为1将余数和最后的1从下向上倒序写 就是结果例如302302/2 = 151 余0151/2 = 75 余175/2 = 37 余1

Loadrunner问题:Monitor name :Windows Resources. Cannot create measurement Processor|% Processor Time|_Total on machine 192.168.0.1

说明: 在Loadrunner监控windows系统资源的时候,在添加好windows Resources后运行发现报如下错误: int: Check that there is such a measurement on this machine. Check that you selected the right platform. for the monitored machine in the Add Machine dialog box. Note: When you monitor