hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sangjin Lee (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-2210) resource manager fails to start if core-site.xml contains an xi:include
Date Wed, 25 Jun 2014 06:44:24 GMT

    [ https://issues.apache.org/jira/browse/YARN-2210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14043099#comment-14043099

Sangjin Lee commented on YARN-2210:

This is because core-site.xml is added in the resource manager as an input stream returned
by ConfigurationProvider. When Configuration.addResource() is invoked on the input stream,
the base system id is null and eventually the xml parser defaults to the current working directory,
which may not be the actual location of the file.

The only workaround is to specify the full path as the href value which is highly undesirable
and makes the documents non-portable.

> resource manager fails to start if core-site.xml contains an xi:include
> -----------------------------------------------------------------------
>                 Key: YARN-2210
>                 URL: https://issues.apache.org/jira/browse/YARN-2210
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: resourcemanager
>    Affects Versions: 2.4.0
>            Reporter: Sangjin Lee
>            Priority: Critical
> The resource manager fails to start if core-site.xml contains an xi:include. This is
easily reproduced with a pseudo-distributed mode. Just add something like this in the core-site.xml:
> {noformat}
> <configuration xmlns:xi="http://www.w3.org/2001/XInclude"> 
>   <xi:include href="mounttable.xml"/>
>   ...
> {noformat}
> and place mounttable.xml in the same directory (doesn't matter what the file is really).
> Then try starting the resource manager, and it will fail while handling this include.
The exception encountered:
> {noformat}
> [Warning] :20:38: Include operation failed, reverting to fallback. Resource error reading
file as XML (href='mounttable.xml'). Reason: /Users/sjlee/hadoop-2.4.0/mounttable.xml (No
such file or directory)
> [Fatal Error] :20:38: An include failed, and no fallback element was found.
> 14/06/24 23:30:16 FATAL conf.Configuration: error parsing conf java.io.BufferedInputStream@7426dbec
> org.xml.sax.SAXParseException: An include failed, and no fallback element was found.
> 	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:246)
> 	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
> 	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
> 	at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2173)
> 	at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2246)
> 	at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2195)
> 	at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2102)
> 	at org.apache.hadoop.conf.Configuration.get(Configuration.java:851)
> 	at org.apache.hadoop.conf.Configuration.getTrimmed(Configuration.java:870)
> 	at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1889)
> 	at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1919)
> 	at org.apache.hadoop.security.Groups.<init>(Groups.java:64)
> 	at org.apache.hadoop.security.Groups.getUserToGroupsMappingServiceWithLoadedConfiguration(Groups.java:255)
> 	at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.serviceInit(ResourceManager.java:197)
> 	at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
> 	at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.main(ResourceManager.java:1038)
> {noformat}

This message was sent by Atlassian JIRA

View raw message