原因:yarn-site.xml 中,yarn.application.classpath 未配置
解决:其中 hadoop 版本对应更改
<property> <name>yarn.application.classpath</name> <value> /opt/hadoop-3.1.0/etc/hadoop, /opt/hadoop-3.1.0/share/hadoop/common/*, /opt/hadoop-3.1.0/share/hadoop/common/lib/*, /opt/hadoop-3.1.0/share/hadoop/hdfs/*, /opt/hadoop-3.1.0/share/hadoop/hdfs/lib/*, /opt/hadoop-3.1.0/share/hadoop/mapreduce/*, /opt/hadoop-3.1.0/share/hadoop/mapreduce/lib/*, /opt/hadoop-3.1.0/share/hadoop/yarn/*, /opt/hadoop-3.1.0/share/hadoop/yarn/lib/* </value> </property>