apache/druid · critical · RE (org.apache.druid.java.util.common.RE)
Failed to initialize Glue catalog
Error message
Failed to initialize Glue catalog
What it means
GlueIcebergCatalog.setupGlueCatalog instantiates the Iceberg GlueCatalog and calls catalog.initialize(CATALOG_NAME, catalogProperties) inside a try block; any exception there is wrapped in RuntimeException("Failed to initialize Glue catalog"). This fires when the AWS Glue-backed Iceberg catalog cannot start — typically due to missing/invalid AWS configuration (region, credentials, warehouse/catalog properties), missing AWS SDK classes on the classpath, or connectivity/permission failures during initialization.
Source
Thrown at extensions-contrib/druid-iceberg-extensions/src/main/java/org/apache/druid/iceberg/input/GlueIcebergCatalog.java:109
log.info("Glue catalog set [%s].", catalog.toString());
return catalog;
}
private Catalog setupGlueCatalog()
{
// We are not passing any hadoop config, third parameter is null
catalogProperties.put("type", TYPE_KEY);
// AWS Glue catalog internally uses reflection to locate certain classes from the iceberg-aws dependency.
// These classes are not available in the current context class loader, and so we explicitly set the context class loader to the system classloader.
ClassLoader currCtxClassloader = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
catalog = new GlueCatalog();
catalog.initialize(CATALOG_NAME, catalogProperties);
}
catch (Exception e) {
throw new RE(e, "Failed to initialize Glue catalog");
}
finally {
Thread.currentThread().setContextClassLoader(currCtxClassloader);
}
return catalog;
}
@Override
public boolean isCaseSensitive()
{
return caseSensitive;
}
}
View on GitHub (pinned to 9b90983fd2)
Solutions
- Look at the wrapped cause ('Caused by:' below this RE) for the true error — missing property, credentials, region, or classpath problem — and fix that first.
- Verify catalog properties include warehouse, io-impl (e.g. org.apache.iceberg.aws.s3.S3FileIO), and the correct AWS region for your Glue Data Catalog.
- Ensure AWS credentials are available (env vars, ~/.aws/credentials, or instance/task IAM role) and the role has glue:GetDatabase/glue:GetTable permissions.
- Confirm the druid-iceberg-extensions load spec includes all AWS SDK dependencies and that extension loading is enabled for it in your Druid config.
- Test network reachability to the Glue endpoint (glue.<region>.amazonaws.com) from the Druid process; check proxies/VPC endpoints/security groups.
Example fix
// before (inputSourceConfig)
{"type":"iceberg","catalogProperties":{"type":"glue"}}
// after
{"type":"iceberg","catalogProperties":{"type":"glue","warehouse":"s3://my-bucket/warehouse/","io-impl":"org.apache.iceberg.aws.s3.S3FileIO","client.region":"us-east-1"}} Defensive patterns
Strategy: try-catch
Validate before calling
// preflight checks before building the catalog
assertProp(catalogProperties, "warehouse");
assertProp(catalogProperties, "io-impl");
assertProp(catalogProperties, "client.region");
if (System.getenv("AWS_REGION") == null
&& System.getProperty("aws.region") == null
&& catalogProperties.getProperty("client.region") == null) {
throw new IllegalStateException("AWS region must be set for Glue catalog");
} Try / catch
try {
catalog = createGlueCatalog(catalogProperties);
} catch (RuntimeException e) {
if (e.getMessage().contains("Failed to initialize Glue catalog")) {
// inspect e.getCause(): missing prop, NoClassDefFoundError (SDK),
// credentials/region failure, or connectivity — remediate accordingly
} else {
throw e;
}
} Prevention
- Always set warehouse, io-impl, and AWS region in catalogProperties for the glue catalog type.
- Ensure the AWS SDK jars ship with the druid-iceberg-extensions load spec and verify with a smoke test at startup.
- Grant the Druid task/instance IAM role glue:GetDatabase, glue:GetTable, and S3 access to the warehouse bucket.
- Log and inspect the wrapped cause immediately — 'Failed to initialize Glue catalog' is only the wrapper, never the root cause.
- Validate network access to glue.<region>.amazonaws.com (VPC endpoints, proxy settings) before deployment.
When it happens
Trigger: Creating an Iceberg input source with type=glue when: catalogProperties lack required keys (e.g. warehouse, io-impl, AWS region), the AWS SDK cannot build a Glue client, the JVM context-classloader swap reveals missing AWS SDK dependencies, or the Glue endpoint is unreachable during initialize().
Common situations: Missing or invalid druid.iceberg.catalog properties (no warehouse location or region configured); absent or expired AWS credentials in the environment/IAM role; wrong or unset AWS region; GlueCatalog class/dependency version conflicts in the extension classpath; network/proxy blocking the Glue endpoint; insufficient IAM permissions (glue:* on the target catalog).
Related errors
- Emit called unexpectedly before service start
- unknown event type [%s]
- interrupted flushing elements from queue
- Got an exception while parsing file [%s]
- Unable to copy key [%s] to file [%s]
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/b748d60fe79d217e.
Report an issue: GitHub.