Hadoop启动YARN时报错ResourceManager和NodeManager 找不到主类,跪求...
发布网友
发布时间:2022-04-23 19:27
我来回答
共1个回答
热心网友
时间:2022-04-14 06:22
local:8970 可以正常运行, 但是当启动
./sbin/start-yarn.sh
jps
jps上找不到 resourceManager 和 nodeManger的进程, 查询日志发现以下错误信息
resourceManager报错
Error starting ResourceManager
org.apache.hadoop.yarn.webapp.WebAppException: Error starting http server
at org.apache.hadoop.yarn.webapp.WebApps$Builder.start(WebApps.java:411)
at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.startWepApp(ResourceManager.java:1119)
at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.serviceStart(ResourceManager.java:1229)
at org.apache.hadoop.service.AbstractService.start(AbstractService.java:194)
at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.main(ResourceManager.java:1425)
Caused by: java.io.IOException: Unable to initialize WebAppContext
at org.apache.hadoop.http.HttpServer2.start(HttpServer2.java:1092)
at org.apache.hadoop.yarn.webapp.WebApps$Builder.start(WebApps.java:407)
... 4 more
Caused by: com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) Error injecting constructor, java.lang.NoClassDefFoundError: javax/activation/DataSource
at org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver.
(JAXBContextResolver.java:41)
at org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebApp.setup(RMWebApp.java:50)
while locating org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver
1 error
应该为Java造成的问提
我的Java版本是 jdk10, 貌似自从jdk9以后 java9默认禁用访问许多javax. * API。更换jdk8即可。
还有一种解决方案 https://issues.apache.org/jira/browse/HADOOP-14978,
修改$HADOOP_HOME/etc/hadoop/yarn-env.sh
export YARN_RESOURCEMANAGER_OPTS="--add-moles=ALL-SYSTEM"
export YARN_NODEMANAGER_OPTS="--add-moles=ALL-SYSTEM"追问我的不是这个原因