apache/hadoop · error · IOException

Failed to upload {key}, part {idx} for 3 times.

Error message

Failed to upload {key}, part {idx} for 3 times.

What it means

Error "Failed to upload {key}, part {idx} for 3 times." thrown in apache/hadoop.

Source

Thrown at hadoop-tools/hadoop-aliyun/src/main/java/org/apache/hadoop/fs/aliyun/oss/AliyunOSSFileSystemStore.java:736

        uploadRequest.setBucketName(bucketName);
        uploadRequest.setKey(key);
        uploadRequest.setUploadId(uploadId);
        uploadRequest.setInputStream(in);
        uploadRequest.setPartSize(size);
        uploadRequest.setPartNumber(idx);
        UploadPartResult uploadResult = ossClient.uploadPart(uploadRequest);
        statistics.incrementWriteOps(1);
        return uploadResult.getPartETag();
      } catch (Exception e) {
        LOG.debug("Failed to upload " + key + ", part " + idx +
            "try again.", e);
        caught = e;
      }
      tries--;
    }

    assert (caught != null);
    throw new IOException("Failed to upload " + key + ", part " + idx +
        " for 3 times.", caught);
  }

  /**
   * Initiate multipart upload.
   * @param key object key.
   * @return upload id.
   */
  public String getUploadId(String key) {
    InitiateMultipartUploadRequest initiateMultipartUploadRequest =
        new InitiateMultipartUploadRequest(bucketName, key);
    InitiateMultipartUploadResult initiateMultipartUploadResult =
        ossClient.initiateMultipartUpload(initiateMultipartUploadRequest);
    return initiateMultipartUploadResult.getUploadId();
  }

  /**
   * Complete the specific multipart upload.

View on GitHub (pinned to 2add963021)

Solutions

  1. Verify OSS write permissions and bucket quota for the target key.
  2. Check network stability to the OSS endpoint; the multipart part upload retried 3 times and failed, so inspect the root cause in the logs and retry the write.

When it happens

Trigger: Thrown at hadoop-tools/hadoop-aliyun/src/main/java/org/apache/hadoop/fs/aliyun/oss/AliyunOSSFileSystemStore.java:736 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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