public static TSStatus confirmClusterId(ConfigManager configManager) {
    TSStatus status = new TSStatus();
    final String clusterId =
        configManager
            .getClusterManager()
            .getClusterIdWithRetry(
                CommonDescriptor.getInstance().getConfig().getCnConnectionTimeoutInMS() / 2);
    if (clusterId == null) {
      status
          .setCode(TSStatusCode.GET_CLUSTER_ID_ERROR.getStatusCode())
          .setMessage("cluster id has not generated, please try again later");
      return status;
    }
    return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
  }
Startup check utils before register/restart a ConfigNode/DataNode.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/ClusterNodeStartUtils.java