{"record":{"id":"1329c176d50ffdb8","repo":"apache/hadoop","slug":"failed-to-instantiate-datanode","errorCode":null,"errorMessage":"Failed to instantiate DataNode.","messagePattern":"Failed to instantiate DataNode\\.","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java","lineNumber":3235,"sourceCode":"   * @param block block to close\n   * @param delHint hint on which excess block to delete\n   * @param storageUuid UUID of the storage where block is stored\n   */\n  void closeBlock(ExtendedBlock block, String delHint, String storageUuid,\n      boolean isTransientStorage) {\n    metrics.incrBlocksWritten();\n    notifyNamenodeReceivedBlock(block, delHint, storageUuid,\n        isTransientStorage);\n  }\n\n  /** Start a single datanode daemon and wait for it to finish.\n   *  If this thread is specifically interrupted, it will stop waiting.\n   */\n  public void runDatanodeDaemon() throws IOException {\n\n    // Verify that blockPoolManager has been started.\n    if (!isDatanodeUp()) {\n      throw new IOException(\"Failed to instantiate DataNode.\");\n    }\n\n    // start dataXceiveServer\n    dataXceiverServer.start();\n    if (localDataXceiverServer != null) {\n      localDataXceiverServer.start();\n    }\n    ipcServer.setTracer(tracer);\n    ipcServer.start();\n    startTime = now();\n    startPlugins(getConf());\n  }\n\n  /**\n   * A data node is considered to be up if one of the bp services is up\n   */\n  public boolean isDatanodeUp() {\n    for (BPOfferService bp : blockPoolManager.getAllNamenodeThreads()) {","sourceCodeStart":3217,"sourceCodeEnd":3253,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java#L3217-L3253","documentation":"Error \"Failed to instantiate DataNode.\" thrown in apache/hadoop.","triggerScenarios":"DataNode.instantiateDataNode fails during startup due to configuration, security, or storage initialization errors.","commonSituations":"DataNode construction failed, usually from invalid configuration or unavailable storage directories. Check the preceding log entries and hdfs-site.xml.","solutions":["Review the nested exception/stack trace in the log for the root cause (missing config, unavailable native code, bad storage dirs) and fix it before restarting.","Validate hdfs-site.xml, core-site.xml, Kerberos settings, and that dfs.datanode.data.dir directories exist and are writable."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}