apache/hadoop · error · IOException

Startup option not set.

Error message

Startup option not set.

What it means

Error "Startup option not set." thrown in apache/hadoop.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java:2258

    return blockPoolManager.get(bpid);
  }
  
  public int getBpOsCount() {
    return blockPoolManager.getAllNamenodeThreads().size();
  }
  
  /**
   * Initializes the {@link #data}. The initialization is done only once, when
   * handshake with the the first namenode is completed.
   */
  private void initStorage(final NamespaceInfo nsInfo) throws IOException {
    final FsDatasetSpi.Factory<? extends FsDatasetSpi<?>> factory
        = FsDatasetSpi.Factory.getFactory(getConf());
    
    if (!factory.isSimulated()) {
      final StartupOption startOpt = getStartupOption(getConf());
      if (startOpt == null) {
        throw new IOException("Startup option not set.");
      }
      final String bpid = nsInfo.getBlockPoolID();
      //read storage info, lock data dirs and transition fs state if necessary
      synchronized (this) {
        storage.recoverTransitionRead(this, nsInfo, dataDirs, startOpt);
      }
      final StorageInfo bpStorage = storage.getBPStorage(bpid);
      LOG.info("Setting up storage: nsid={};bpid={};lv={};" +
              "nsInfo={};dnuuid={}",
          bpStorage.getNamespaceID(), bpid, storage.getLayoutVersion(),
          nsInfo, storage.getDatanodeUuid());
    }

    // If this is a newly formatted DataNode then assign a new DatanodeUuid.
    checkDatanodeUuid();

    synchronized(this)  {
      if (data == null) {

View on GitHub (pinned to 2add963021)

Solutions

  1. Start the DataNode with a valid startup option (regular, -format, -rollback, etc.) as required by the operation being performed.
  2. When scripting DataNode startup, ensure the startup option argument is passed through correctly.

When it happens

Trigger: The DataNode main/init path is invoked without a StartupOption set, usually from custom tooling calling DataNode APIs directly.

Common situations: The DataNode was started without a startup option in its descriptor. Usually caused by invoking DataNode internals directly; start it via the standard scripts.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/a3d549db88dd39ff. Report an issue: GitHub.