[
https://issues.apache.org/jira/browse/HDDS-13955?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sammi Chen resolved HDDS-13955.
-------------------------------
Fix Version/s: 2.2.0
Resolution: Fixed
> Handle empty datanode.id file gracefully
> ----------------------------------------
>
> Key: HDDS-13955
> URL: https://issues.apache.org/jira/browse/HDDS-13955
> Project: Apache Ozone
> Issue Type: Improvement
> Reporter: Jitendra Shukla
> Assignee: Neo Chien
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.2.0
>
>
> If the datanode.id file is empty Ozone datanode fails to startup with below
> mentioned exception.
> {code:java}
> 2025-11-05 09:15:11,957 ERROR
> [main]-org.apache.hadoop.ozone.HddsDatanodeService: Exception in
> HddsDatanodeService.
> java.lang.NullPointerException
> at
> org.apache.hadoop.ozone.container.common.helpers.DatanodeIdYaml.readDatanodeIdFile(DatanodeIdYaml.java:96)
> at
> org.apache.hadoop.ozone.container.common.helpers.ContainerUtils.readDatanodeDetailsFrom(ContainerUtils.java:176)
> at
> org.apache.hadoop.ozone.HddsDatanodeService.initializeDatanodeDetails(HddsDatanodeService.java:444)
> at
> org.apache.hadoop.ozone.HddsDatanodeService.start(HddsDatanodeService.java:224)
> at
> org.apache.hadoop.ozone.HddsDatanodeService.start(HddsDatanodeService.java:210)
> at
> org.apache.hadoop.ozone.HddsDatanodeService.call(HddsDatanodeService.java:178)
> at
> org.apache.hadoop.ozone.HddsDatanodeService.call(HddsDatanodeService.java:95)
> at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
> at picocli.CommandLine.access$1300(CommandLine.java:145)
> at
> picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
> at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
> at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
> at
> picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
> at picocli.CommandLine.execute(CommandLine.java:2078)
> at org.apache.hadoop.hdds.cli.GenericCli.execute(GenericCli.java:100)
> at org.apache.hadoop.hdds.cli.GenericCli.run(GenericCli.java:91)
> at
> org.apache.hadoop.ozone.HddsDatanodeService.main(HddsDatanodeService.java:160)
> {code}
> The workaround for this issue is to fetch the datanode UUID from the VERSION
> file under hdds.datanode.dir directory and add the same to the datanode.id
> file in below format and then restart datanode.
> {code:java}
> !!org.apache.hadoop.ozone.container.common.helpers.DatanodeIdYaml$DatanodeDetailsYaml
> {
> uuid: <uuid from the version file under hdds.datanode.id>
> } {code}
> We can handle this in a more graceful way by attempting to rebuild to file.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]