You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/04/18 14:04:00 UTC

[jira] [Commented] (YARN-11467) RM failover may fail when the nodes.exclude-path file does not exist

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

ASF GitHub Bot commented on YARN-11467:
---------------------------------------

cxzl25 opened a new pull request, #5565:
URL: https://github.com/apache/hadoop/pull/5565

   ### Description of PR
   When RM starts, because the file corresponding to the `yarn.resourcemanager.nodes.include-path` or `yarn.resourcemanager.nodes.exclude-path` configuration item does not exist, it will disable this function.
   
   https://github.com/apache/hadoop/blob/405ed1dde6bcccca1e07e45a356a89c1b583e236/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/NodesListManager.java#L552-L570
   
   
   But in RM failover scenario, because the file does not exist, it will fail.
   
   ```java
   Caused by: org.apache.hadoop.ha.ServiceFailedException: RefreshAll operation failed
   	at org.apache.hadoop.yarn.server.resourcemanager.AdminService.refreshAll(AdminService.java:788)
   	at org.apache.hadoop.yarn.server.resourcemanager.AdminService.transitionToActive(AdminService.java:315)
   	... 29 more
   Caused by: java.nio.file.NoSuchFileException: /tmp/non-existent-path-788aa744-1395-40ca-bdb5-f93bffc92cfb
   	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
   	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
   	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
   	at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
   	at java.nio.file.Files.newByteChannel(Files.java:361)
   	at java.nio.file.Files.newByteChannel(Files.java:407)
   	at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)
   	at java.nio.file.Files.newInputStream(Files.java:152)
   	at org.apache.hadoop.util.HostsFileReader.readFileToMap(HostsFileReader.java:126)
   	at org.apache.hadoop.util.HostsFileReader.refreshInternal(HostsFileReader.java:214)
   	at org.apache.hadoop.util.HostsFileReader.refresh(HostsFileReader.java:192)
   	at org.apache.hadoop.yarn.server.resourcemanager.NodesListManager.refreshHostsReader(NodesListManager.java:258)
   	at org.apache.hadoop.yarn.server.resourcemanager.NodesListManager.refreshNodes(NodesListManager.java:232)
   	at org.apache.hadoop.yarn.server.resourcemanager.NodesListManager.refreshNodes(NodesListManager.java:224)
   	at org.apache.hadoop.yarn.server.resourcemanager.AdminService.refreshNodes(AdminService.java:490)
   	at org.apache.hadoop.yarn.server.resourcemanager.AdminService.refreshAll(AdminService.java:778)
   ```
   
   ### How was this patch tested?
   add UT
   
   ### For code changes:
   
   - [ ] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
   - [ ] Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
   - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files?
   
   




> RM failover may fail when the nodes.exclude-path file does not exist
> --------------------------------------------------------------------
>
>                 Key: YARN-11467
>                 URL: https://issues.apache.org/jira/browse/YARN-11467
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: dzcxzl
>            Priority: Minor
>
> {code:java}
> Caused by: org.apache.hadoop.ha.ServiceFailedException: RefreshAll operation failed
>     at org.apache.hadoop.yarn.server.resourcemanager.AdminService.refreshAll(AdminService.java:788)
>     at org.apache.hadoop.yarn.server.resourcemanager.AdminService.transitionToActive(AdminService.java:315)
>     ... 29 more
> Caused by: java.nio.file.NoSuchFileException: /tmp/non-existent-path-788aa744-1395-40ca-bdb5-f93bffc92cfb
>     at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
>     at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
>     at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
>     at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
>     at java.nio.file.Files.newByteChannel(Files.java:361)
>     at java.nio.file.Files.newByteChannel(Files.java:407)
>     at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384)
>     at java.nio.file.Files.newInputStream(Files.java:152)
>     at org.apache.hadoop.util.HostsFileReader.readFileToMap(HostsFileReader.java:126)
>     at org.apache.hadoop.util.HostsFileReader.refreshInternal(HostsFileReader.java:214)
>     at org.apache.hadoop.util.HostsFileReader.refresh(HostsFileReader.java:192)
>     at org.apache.hadoop.yarn.server.resourcemanager.NodesListManager.refreshHostsReader(NodesListManager.java:258)
>     at org.apache.hadoop.yarn.server.resourcemanager.NodesListManager.refreshNodes(NodesListManager.java:232)
>     at org.apache.hadoop.yarn.server.resourcemanager.NodesListManager.refreshNodes(NodesListManager.java:224)
>     at org.apache.hadoop.yarn.server.resourcemanager.AdminService.refreshNodes(AdminService.java:490)
>     at org.apache.hadoop.yarn.server.resourcemanager.AdminService.refreshAll(AdminService.java:778) {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org