You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2025/12/11 15:08:00 UTC

[jira] [Updated] (HDDS-13955) Handle empty datanode.id file gracefully

     [ https://issues.apache.org/jira/browse/HDDS-13955?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated HDDS-13955:
----------------------------------
    Labels: pull-request-available  (was: )

> 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
>            Priority: Major
>              Labels: pull-request-available
>
> 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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org