You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/05/08 09:37:00 UTC

[jira] [Commented] (HDFS-17918) WebHDFS client-side failover fails during NameNode fsimage loading in HA

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

ASF GitHub Bot commented on HDFS-17918:
---------------------------------------

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

   <!--
     Thanks for sending a pull request!
       1. If this is your first time, please read our contributor guidelines: https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
       2. Make sure your PR title starts with JIRA issue id, e.g., 'HADOOP-17799. Your PR title ...'.
   -->
   
   ### Description of PR
   
   When NameNode is configured with HA and NameNode 1 is restarting and loading fsimage, accessing WebHDFS does not trigger client-side failover.
   
   During fsimage loading after NameNode restart in HA configuration, WebHDFS returns RetriableException instead of StandbyException. Because of this, the client-side failover does not work and the client keeps retrying the same NameNode. Eventually the client fails because it cannot find the active NameNode.
    
   ```
   $ hdfs dfs -ls swebhdfs://blue
   2023-07-14 12:23:55,890 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 0 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 0ms.
   2023-07-14 12:23:55,929 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 1 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 731ms.
   2023-07-14 12:23:56,697 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 2 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 1475ms.
   2023-07-14 12:23:58,207 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 3 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 5061ms.
   2023-07-14 12:24:03,304 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 4 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 7898ms.
   2023-07-14 12:24:11,235 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 5 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 18847ms.
   2023-07-14 12:24:30,117 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 6 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 20826ms.
   2023-07-14 12:24:50,979 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 7 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 10374ms.
   2023-07-14 12:25:01,385 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 8 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 16640ms.
   2023-07-14 12:25:18,059 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 9 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 15514ms.
   2023-07-14 12:25:33,610 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 10 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 10745ms.
   ls: Namenode is in startup mode
   ```
   
   ### How was this patch tested?
   
   Added unit test. Also verified on a real HA cluster that client-side failover works correctly after the fix.
   
   ### For code changes:
   
   - [x] 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?
   
   ### AI Tooling
   
   If an AI tool was used:
   
   - [ ] The PR includes the phrase "Contains content generated by <tool>"
         where <tool> is the name of the AI tool used.
   - [ ] My use of AI contributions follows the ASF legal policy
         https://www.apache.org/legal/generative-tooling.html




> WebHDFS client-side failover fails during NameNode fsimage loading in HA
> ------------------------------------------------------------------------
>
>                 Key: HDFS-17918
>                 URL: https://issues.apache.org/jira/browse/HDFS-17918
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: KWON BYUNGCHANG
>            Priority: Major
>
> When NameNode is configured with HA and NameNode 1 is restarting and loading fsimage, accessing WebHDFS does not trigger client-side failover.
> During fsimage loading after NameNode restart in HA configuration, WebHDFS returns RetriableException instead of StandbyException. Because of this, the client-side failover does not work and the client keeps retrying the same NameNode. Eventually the client fails because it cannot find the active NameNode.
>  
> {noformat}
> $ hdfs dfs -ls swebhdfs://blue
> 2023-07-14 12:23:55,890 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 0 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 0ms.
> 2023-07-14 12:23:55,929 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 1 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 731ms.
> 2023-07-14 12:23:56,697 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 2 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 1475ms.
> 2023-07-14 12:23:58,207 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 3 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 5061ms.
> 2023-07-14 12:24:03,304 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 4 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 7898ms.
> 2023-07-14 12:24:11,235 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 5 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 18847ms.
> 2023-07-14 12:24:30,117 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 6 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 20826ms.
> 2023-07-14 12:24:50,979 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 7 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 10374ms.
> 2023-07-14 12:25:01,385 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 8 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 16640ms.
> 2023-07-14 12:25:18,059 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 9 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 15514ms.
> 2023-07-14 12:25:33,610 INFO web.WebHdfsFileSystem: Retrying connect to namenode: blue-nn1.host/10.10.10.10:9470. Already retried 10 time(s); retry policy is org.apache.hadoop.io.retry.RetryPolicies$FailoverOnNetworkExceptionRetry@95e33cc, delay 10745ms.
> ls: Namenode is in startup mode
> {noformat}



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

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