Hadoop-Yarn奇葩问题整理

Yarn 命令异常

[root@hadoop01 sbin]# yarn application -kill application_1655090665495_0013
Error: Could not find or load main class org.apache.hadoop.yarn.client.cli.ApplicationCLI
[root@hadoop01 sbin]# yarn -kill application_1655090665495_0013
Unrecognized option: -kill
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
[root@hadoop01 sbin]# hadoop job -kill application_1655090665495_0013
DEPRECATED: Use of this script to execute mapred command is deprecated.
Instead use the mapred command for it.

Error: Could not find or load main class org.apache.hadoop.mapred.JobClient
[root@hadoop01 sbin]# yarn application -list
Error: Could not find or load main class org.apache.hadoop.yarn.client.cli.ApplicationCLI
[root@hadoop01 sbin]# yarn application -status
Error: Could not find or load main class org.apache.hadoop.yarn.client.cli.ApplicationCLI
[root@hadoop01 sbin]# yarn app -status
Error: Could not find or load main class app
[root@hadoop01 sbin]# yarn applicationcli -status
Error: Could not find or load main class applicationcli
[root@hadoop01 sbin]# yarn application -status
Error: Could not find or load main class org.apache.hadoop.yarn.client.cli.ApplicationCLI
[root@hadoop01 sbin]# hadoop job -kill application_1655090665495_0013
DEPRECATED: Use of this script to execute mapred command is deprecated.
Instead use the mapred command for it.

Error: Could not find or load main class org.apache.hadoop.mapred.JobClient
 

[root@hadoop01 sbin]# yarn application -kill application_1655090665495_0013
Error: Could not find or load main class org.apache.hadoop.yarn.client.cli.ApplicationCLI
[root@hadoop01 sbin]# yarn -kill application_1655090665495_0013
Unrecognized option: -kill
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
[root@hadoop01 sbin]# hadoop job -kill application_1655090665495_0013
DEPRECATED: Use of this script to execute mapred command is deprecated.
Instead use the mapred command for it.

Error: Could not find or load main class org.apache.hadoop.mapred.JobClient
[root@hadoop01 sbin]# yarn application -list
Error: Could not find or load main class org.apache.hadoop.yarn.client.cli.ApplicationCLI
[root@hadoop01 sbin]# yarn application -status
Error: Could not find or load main class org.apache.hadoop.yarn.client.cli.ApplicationCLI
[root@hadoop01 sbin]# yarn app -status
Error: Could not find or load main class app
[root@hadoop01 sbin]# yarn applicationcli -status
Error: Could not find or load main class applicationcli
[root@hadoop01 sbin]# yarn application -status
Error: Could not find or load main class org.apache.hadoop.yarn.client.cli.ApplicationCLI
[root@hadoop01 sbin]# hadoop job -kill application_1655090665495_0013
DEPRECATED: Use of this script to execute mapred command is deprecated.
Instead use the mapred command for it.

Error: Could not find or load main class org.apache.hadoop.mapred.JobClient

查看hadoop classpath检查如下jar包路径,了解hadoop的看到这里就已经明白问题所在了

/usr/local/soft/hadoop-2.7.7/etc/hadoop,
/usr/local/soft/hadoop-2.7.7/share/hadoop/common/lib/*,
/usr/local/soft/hadoop-2.7.7/share/hadoop/common/*,
/usr/local/soft/hadoop-2.7.7/share/hadoop/hdfs,
/usr/local/soft/hadoop-2.7.7/share/hadoop/hdfs/lib/*,
/usr/local/soft/hadoop-2.7.7/share/hadoop/hdfs/*,
# /usr/hdp/2.6.5.0-292/hadoop-yarn/share/hadoop/yarn/*, # 
# /usr/hdp/2.6.5.0-292/hadoop-mapreduce/share/hadoop/mapreduce/*, #
/usr/local/soft/hadoop-2.7.7/contrib/capacity-scheduler/*.jar

注释掉的两行与上面不是一个版本的,这是因为环境中存在多个版本的hadoop,且新版本的环境变量未生效,导致版本jar包加载混乱导致的

解决办法很简单,删除老版本,重新执行source刷新环境变量即可

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值