apache/druid · error · IOException (IOE)

Could not load S3 URI

Error message

Could not load S3 URI [%s]

What it means

Generic failure wrapper in S3DataSegmentPuller's buildFileObject openInputStream: the S3 GetObject call threw a non-404 SdkException (auth, permissions, throttling, network), rethrown as an IOE reporting the S3 URI could not be loaded.

Solutions

  1. Inspect the underlying SdkException for the true S3 error code.
  2. Verify credentials, bucket policy, and region configuration.
  3. Retry transient failures; S3Utils.retryS3Operation may already cover some cases.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3DataSegmentPuller.java:235 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/635a7a105396e4c8. Report an issue: GitHub.

Appendix: source

Thrown at extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3DataSegmentPuller.java:235

          final InputStream in = s3InputStream;
          final Closer closer = Closer.create();
          closer.register(in);

          return new FilterInputStream(in)
          {
            @Override
            public void close() throws IOException
            {
              closer.close();
            }
          };
        }
        catch (SdkException e) {
          if (e instanceof S3Exception && ((S3Exception) e).statusCode() == 404) {
            throw new IOE(e, "IndexFile[s3://%s/%s] does not exist", coords.getBucket(), coords.getPath());
          }
          throw new IOE(e, "Could not load S3 URI [%s]", uri);
        }
      }

      @Override
      public OutputStream openOutputStream()
      {
        throw new UOE("Cannot stream S3 output");
      }

      @Override
      public Reader openReader(boolean ignoreEncodingErrors)
      {
        throw new UOE("Cannot open reader");
      }

      @Override
      public CharSequence getCharContent(boolean ignoreEncodingErrors)
      {

View on GitHub (pinned to 9b90983fd2)