apache/druid · error · IOException (IOE)

IndexFile[s3:// / ] does not exist

Error message

IndexFile[s3://%s/%s] does not exist

What it means

404 handling in S3DataSegmentPuller's buildFileObject openInputStream: the S3 GetObject returned status 404, so the segment's index file does not exist at s3://bucket/path; the puller converts this into a distinct IOE so callers can distinguish missing segments from other S3 failures.

Solutions

  1. Verify the segment location in the metadata store matches the object in S3.
  2. Check whether the segment was deleted by a kill task or retention rules.
  3. Re-push/re-generate the missing segment if it should exist.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at extensions-core/s3-extensions/src/main/java/org/apache/druid/storage/s3/S3DataSegmentPuller.java:233 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/7d95f9fcd14de362. Report an issue: GitHub.

Appendix: source

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

            s3InputStream = s3Client.getObject(coords.getBucket(), coords.getPath());
          }

          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

View on GitHub (pinned to 9b90983fd2)