Yarn资源管理器:noclassdeffounderror with start-yarn.sh

azpvetkf  于 2021-05-29  发布在  Hadoop
关注(0)|答案(1)|浏览(428)

我是hadoop和yarn的新手。在启动hdfs之后,我使用包中提供的start-yarn.sh启动Yarn,并得到错误。
我在ubuntu18.04上使用hadoop3.2.0和jdk-11。我用namenode和2个datanode成功地启动了hdfs。使用以下配置的start-yarn.sh启动yarn(单节点)时出错。
在etc/hadoop/yarn-site.xml中

<configuration>
    <property>
            <name>yarn.acl.enable</name>
            <value>0</value>
    </property>

    <property>
            <name>yarn.resourcemanager.hostname</name>
            <value>10.0.0.87</value>
    </property>

    <property>
            <name>yarn.nodemanager.aux-services</name>
            <value>mapreduce_shuffle</value>
    </property>
</configuration>

然后我得到如下错误

2019-09-18 15:06:18,118 INFO org.apache.hadoop.yarn.server.resourcemanager.ResourceManager: Transitioning to standby state
2019-09-18 15:06:18,118 INFO org.apache.hadoop.yarn.server.resourcemanager.ResourceManager: Transitioned to standby state
2019-09-18 15:06:18,118 FATAL org.apache.hadoop.yarn.server.resourcemanager.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:443)
    at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.startWepApp(ResourceManager.java:1197)
    at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.serviceStart(ResourceManager.java:1306)
    at org.apache.hadoop.service.AbstractService.start(AbstractService.java:194)
    at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.main(ResourceManager.java:1501)
Caused by: java.io.IOException: Unable to initialize WebAppContext
    at org.apache.hadoop.http.HttpServer2.start(HttpServer2.java:1157)
    at org.apache.hadoop.yarn.webapp.WebApps$Builder.start(WebApps.java:439)
    ... 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.<init>(JAXBContextResolver.java:41)
  at org.apache.hadoop.yarn.server.resourcemanager.webapp.RMWebApp.setup(RMWebApp.java:54)
  while locating org.apache.hadoop.yarn.server.resourcemanager.webapp.JAXBContextResolver

1 error
    at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1025)
    at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051)
    at com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory$GuiceInstantiatedComponentProvider.getInstance(GuiceComponentProviderFactory.java:345)
    at com.sun.jersey.core.spi.component.ioc.IoCProviderFactory$ManagedSingleton.<init>(IoCProviderFactory.java:202)
    at com.sun.jersey.core.spi.component.ioc.IoCProviderFactory.wrap(IoCProviderFactory.java:123)
    at com.sun.jersey.core.spi.component.ioc.IoCProviderFactory._getComponentProvider(IoCProviderFactory.java:116)
    at com.sun.jersey.core.spi.component.ProviderFactory.getComponentProvider(ProviderFactory.java:153)
    at com.sun.jersey.core.spi.component.ProviderServices.getComponent(ProviderServices.java:278)
    at com.sun.jersey.core.spi.component.ProviderServices.getProviders(ProviderServices.java:151)
...

正在寻求你的帮助。非常感谢

xggvc2p6

xggvc2p61#

我使用hadoop3.2.0,jdk-11。。。 Error injecting constructor, java.lang.NoClassDefFoundError: javax/activation/DataSource hadoop仍然需要java8,它有这个类
https://cwiki.apache.org/confluence/display/hadoop/hadoop+java+versions

相关问题