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

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

hadoop-yetus commented on PR #8494:
URL: https://github.com/apache/hadoop/pull/8494#issuecomment-4442317475

   :confetti_ball: **+1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |:----:|----------:|--------:|:--------:|:-------:|
   | +0 :ok: |  reexec  |   1m  2s |  |  Docker mode activated.  |
   |||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  0s |  |  codespell was not available.  |
   | +0 :ok: |  detsecrets  |   0m  0s |  |  detect-secrets was not available.  
|
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 1 new or modified test files.  |
   |||| _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  43m 45s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |   1m 18s |  |  trunk passed with JDK 
Ubuntu-21.0.10+7-Ubuntu-124.04  |
   | +1 :green_heart: |  compile  |   1m 20s |  |  trunk passed with JDK 
Ubuntu-17.0.18+8-Ubuntu-124.04.1  |
   | +1 :green_heart: |  checkstyle  |   1m  0s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 25s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m 12s |  |  trunk passed with JDK 
Ubuntu-21.0.10+7-Ubuntu-124.04  |
   | +1 :green_heart: |  javadoc  |   1m 10s |  |  trunk passed with JDK 
Ubuntu-17.0.18+8-Ubuntu-124.04.1  |
   | +1 :green_heart: |  spotbugs  |   3m 42s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  31m 38s |  |  branch has no errors 
when building and testing our client artifacts.  |
   |||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 52s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 49s |  |  the patch passed with JDK 
Ubuntu-21.0.10+7-Ubuntu-124.04  |
   | +1 :green_heart: |  javac  |   0m 49s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |   0m 49s |  |  the patch passed with JDK 
Ubuntu-17.0.18+8-Ubuntu-124.04.1  |
   | +1 :green_heart: |  javac  |   0m 49s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  1s |  |  The patch has no blanks 
issues.  |
   | +1 :green_heart: |  checkstyle  |   0m 24s |  |  the patch passed  |
   | +1 :green_heart: |  mvnsite  |   0m 55s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   0m 37s |  |  the patch passed with JDK 
Ubuntu-21.0.10+7-Ubuntu-124.04  |
   | +1 :green_heart: |  javadoc  |   0m 37s |  |  the patch passed with JDK 
Ubuntu-17.0.18+8-Ubuntu-124.04.1  |
   | +1 :green_heart: |  spotbugs  |   3m 18s |  |  the patch passed  |
   | +1 :green_heart: |  shadedclient  |  30m 26s |  |  patch has no errors 
when building and testing our client artifacts.  |
   |||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |   2m 40s |  |  hadoop-hdfs-client in the patch 
passed.  |
   | +1 :green_heart: |  asflicense  |   0m 36s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 128m 22s |  |  |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.54 ServerAPI=1.54 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8494/1/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/8494 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
   | uname | Linux d0eb5fdddc4a 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 
13:29:34 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 50fc545bfc7da4c2ed25e7b5e865988bec73a5e4 |
   | Default Java | Ubuntu-17.0.18+8-Ubuntu-124.04.1 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.10+7-Ubuntu-124.04 
/usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.18+8-Ubuntu-124.04.1 |
   |  Test Results | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8494/1/testReport/ |
   | Max. process+thread count | 640 (vs. ulimit of 10000) |
   | modules | C: hadoop-hdfs-project/hadoop-hdfs-client U: 
hadoop-hdfs-project/hadoop-hdfs-client |
   | Console output | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8494/1/console |
   | versions | git=2.43.0 maven=3.9.15 spotbugs=4.9.7 |
   | Powered by | Apache Yetus 0.14.1 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   




> DatanodeID.updateRegInfo() does not update hostNameBytes causing stale 
> hostname on client
> -----------------------------------------------------------------------------------------
>
>                 Key: HDFS-17877
>                 URL: https://issues.apache.org/jira/browse/HDFS-17877
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: YUBI LEE
>            Priority: Major
>              Labels: pull-request-available
>
> DataNodeID.updateRegInfo() updates hostName but misses hostNameBytes.
> Since PBHelperClient.convert(DatanodeID) uses getHostNameBytes() for protobuf
> serialization, clients end up receiving the stale hostname from before the
> re-registration.
> This becomes a real problem when a DataNode first registers with a PQDN and
> later re-registers with a FQDN. With dfs.client.use.datanode.hostname=true,
> the client tries to connect using the old PQDN and fails with
> UnknownHostException.
> The fix is to add hostNameBytes = nodeReg.getHostNameBytes() in 
> updateRegInfo(),
> same as how setIpAndXferPort() already handles ipAddr/ipAddrBytes together
> In my environment, I use configurations as follows:
> {code}
> dfs.client.use.datanode.hostname=true
> hadoop.security.token.service.use_ip=false
> {code}
> I got an UnknownHostException while reproducing this issue.
> (hostname, IP address, and username are anonymized for privacy)
> - {{datanode001}} should be {{datanode001.example.com}} as FQDN, not PQDN.
> - I stopped the DataNode for approximately 10 minutes and 30 seconds (2 × 
> dfs.namenode.heartbeat.recheck-interval + 10 × dfs.heartbeat.interval), so 
> that it would be recognized as dead by the NameNode. After that, I restarted 
> the DataNode, and also restarted both the active and standby NameNodes. After 
> these steps, the issue was resolved.
> {code}
> $ HADOOP_ROOT_LOGGER=DEBUG,console yarn logs -applicationId 
> application_1763013060073_51480 > application_1763013060073_51480.txt
> 26/01/29 18:42:09 DEBUG ipc.Client: IPC Client (307400933) connection to 
> namenode001.example.com/10.1.1.2:9020 from [email protected] sending #138 
> org.apache.hadoop.hdfs.protocol.ClientProtocol.getFileInfo
> 26/01/29 18:42:09 DEBUG ipc.Client: IPC Client (307400933) connection to 
> namenode001.example.com/10.1.1.2:9020 from [email protected] got value #138
> 26/01/29 18:42:09 DEBUG ipc.ProtobufRpcEngine2: Call: getFileInfo took 1ms
> 26/01/29 18:42:09 DEBUG hdfs.DFSClient: Connecting to datanode 
> datanode001:9011
> 26/01/29 18:42:09 DEBUG impl.BlockReaderFactory: Block read failed. Getting 
> remote block reader using TCP
> java.io.IOException: Unresolved host: datanode001:9011
>         at 
> org.apache.hadoop.hdfs.DFSUtilClient.isLocalAddress(DFSUtilClient.java:640)
>         at 
> org.apache.hadoop.hdfs.shortcircuit.DomainSocketFactory.getPathInfo(DomainSocketFactory.java:152)
>         at 
> org.apache.hadoop.hdfs.client.impl.BlockReaderFactory.getBlockReaderLocal(BlockReaderFactory.java:472)
>         at 
> org.apache.hadoop.hdfs.client.impl.BlockReaderFactory.build(BlockReaderFactory.java:360)
>         at 
> org.apache.hadoop.hdfs.DFSInputStream.getBlockReader(DFSInputStream.java:755)
>         at 
> org.apache.hadoop.hdfs.DFSInputStream.blockSeekTo(DFSInputStream.java:685)
>         at 
> org.apache.hadoop.hdfs.DFSInputStream.readWithStrategy(DFSInputStream.java:884)
>         at org.apache.hadoop.hdfs.DFSInputStream.read(DFSInputStream.java:957)
>         at java.io.DataInputStream.readFully(DataInputStream.java:195)
>         at java.io.DataInputStream.readLong(DataInputStream.java:416)
>         at 
> org.apache.hadoop.io.file.tfile.BCFile$Reader.<init>(BCFile.java:626)
>         at org.apache.hadoop.io.file.tfile.TFile$Reader.<init>(TFile.java:804)
>         at 
> org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat$LogReader.<init>(AggregatedLogFormat.java:581)
>         at 
> org.apache.hadoop.yarn.logaggregation.filecontroller.tfile.LogAggregationTFileController.readAggregatedLogs(LogAggregationTFileController.java:196)
>         at 
> org.apache.hadoop.yarn.logaggregation.LogCLIHelpers.dumpAllContainersLogs(LogCLIHelpers.java:244)
>         at 
> org.apache.hadoop.yarn.client.cli.LogsCLI.fetchApplicationLogs(LogsCLI.java:1185)
>         at 
> org.apache.hadoop.yarn.client.cli.LogsCLI.runCommand(LogsCLI.java:374)
>         at org.apache.hadoop.yarn.client.cli.LogsCLI.run(LogsCLI.java:139)
>         at org.apache.hadoop.yarn.client.cli.LogsCLI.main(LogsCLI.java:403)
> 26/01/29 18:42:09 WARN impl.BlockReaderFactory: I/O error constructing remote 
> block reader.
> java.net.UnknownHostException: datanode001:9011
>         at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:591)
>         at 
> org.apache.hadoop.hdfs.DFSClient.newConnectedPeer(DFSClient.java:3033)
>         at 
> org.apache.hadoop.hdfs.client.impl.BlockReaderFactory.nextTcpPeer(BlockReaderFactory.java:829)
>         at 
> org.apache.hadoop.hdfs.client.impl.BlockReaderFactory.getRemoteBlockReaderFromTcp(BlockReaderFactory.java:754)
>         at 
> org.apache.hadoop.hdfs.client.impl.BlockReaderFactory.build(BlockReaderFactory.java:381)
>         at 
> org.apache.hadoop.hdfs.DFSInputStream.getBlockReader(DFSInputStream.java:755)
>         at 
> org.apache.hadoop.hdfs.DFSInputStream.blockSeekTo(DFSInputStream.java:685)
>         at 
> org.apache.hadoop.hdfs.DFSInputStream.readWithStrategy(DFSInputStream.java:884)
>         at org.apache.hadoop.hdfs.DFSInputStream.read(DFSInputStream.java:957)
>         at java.io.DataInputStream.readFully(DataInputStream.java:195)
>         at java.io.DataInputStream.readLong(DataInputStream.java:416)
>         at 
> org.apache.hadoop.io.file.tfile.BCFile$Reader.<init>(BCFile.java:626)
>         at org.apache.hadoop.io.file.tfile.TFile$Reader.<init>(TFile.java:804)
>         at 
> org.apache.hadoop.yarn.logaggregation.AggregatedLogFormat$LogReader.<init>(AggregatedLogFormat.java:581)
>         at 
> org.apache.hadoop.yarn.logaggregation.filecontroller.tfile.LogAggregationTFileController.readAggregatedLogs(LogAggregationTFileController.java:196)
>         at 
> org.apache.hadoop.yarn.logaggregation.LogCLIHelpers.dumpAllContainersLogs(LogCLIHelpers.java:244)
>         at 
> org.apache.hadoop.yarn.client.cli.LogsCLI.fetchApplicationLogs(LogsCLI.java:1185)
>         at 
> org.apache.hadoop.yarn.client.cli.LogsCLI.runCommand(LogsCLI.java:374)
>         at org.apache.hadoop.yarn.client.cli.LogsCLI.run(LogsCLI.java:139)
>         at org.apache.hadoop.yarn.client.cli.LogsCLI.main(LogsCLI.java:403)
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to