apache/hadoop · error · IOException

Failed to upload , part for 3 times.

Error message

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

What it means

Uploading one part of a multipart OSS upload failed repeatedly (3 attempts) with the client retrying part uploadPart; the remaining tries counter hit zero.

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.
Defensive patterns

Strategy: retry

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.

Appendix: 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)