apache/incubator-seata · critical · RuntimeException
Apollo configuration initialized failed,please check the val
Error message
Apollo configuration initialized failed,please check the value of apolloMeta and apolloConfigService
What it means
ApolloConfiguration's static init throws RuntimeException('Apollo configuration initialized failed,please check the value of apolloMeta and apolloConfigService') when neither apolloConfigService (env/tool props) nor apolloMeta (system property) is set. Apollo's client needs at least one service endpoint to locate its ConfigService; without it the config center is unreachable, so seata fails fast during ConfigurationFactory bootstrap.
Source
Thrown at config/seata-config-apollo/src/main/java/org/apache/seata/config/apollo/ApolloConfiguration.java:208
if (!properties.containsKey(PROP_APOLLO_SECRET)) {
String apolloAccesskeySecret = FILE_CONFIG.getConfig(getApolloSecretFileKey());
if (StringUtils.isNotBlank(apolloAccesskeySecret)) {
System.setProperty(PROP_APOLLO_SECRET, apolloAccesskeySecret);
}
}
if (!properties.containsKey(PROP_APOLLO_CLUSTER)) {
String apolloCluster = FILE_CONFIG.getConfig(getApolloCluster());
if (StringUtils.isNotBlank(apolloCluster)) {
System.setProperty(PROP_APOLLO_CLUSTER, apolloCluster);
}
}
if (!properties.containsKey(PROP_APOLLO_CONFIG_SERVICE)) {
String apolloConfigService = FILE_CONFIG.getConfig(getApolloConfigService());
if (StringUtils.isNotBlank(apolloConfigService)) {
System.setProperty(PROP_APOLLO_CONFIG_SERVICE, apolloConfigService);
} else {
if (StringUtils.isBlank(System.getProperty(PROP_APOLLO_META))) {
throw new RuntimeException(
"Apollo configuration initialized failed,please check the value of apolloMeta and apolloConfigService");
}
}
}
}
@Override
public String getTypeName() {
return REGISTRY_TYPE;
}
public static String getApolloMetaFileKey() {
return String.join(FILE_CONFIG_SPLIT_CHAR, FILE_ROOT_CONFIG, REGISTRY_TYPE, APOLLO_META);
}
public static String getApolloSecretFileKey() {
return String.join(FILE_CONFIG_SPLIT_CHAR, FILE_ROOT_CONFIG, REGISTRY_TYPE, APOLLO_SECRET);
}View on GitHub (pinned to e01f97c6db)
Solutions
- Set -DapolloMeta=http://<apollo-meta-host>:8080 (or env APOLLO_META) so the Apollo client can discover the config service.
- Alternatively set apolloConfigService (env APOLLO_CONFIG_SERVICE) to the config service URL directly.
- Verify the file.conf/registry.conf apollo block keys (apolloMeta, apolloConfigService, app.id, cluster) are spelled exactly as seata expects.
- Confirm the values actually reach System properties before seata initializes (log or assert them in a startup hook).
Example fix
# before
# registry.conf / application.conf with no apollo endpoint
config { type = "apollo" }
# after
config {
type = "apollo"
apollo {
appId = "seata-server"
apolloMeta = "http://apollo-meta.example:8080"
cluster = "default"
}
}
# or JVM flag: -DapolloMeta=http://apollo-meta.example:8080 Defensive patterns
Strategy: validation
Validate before calling
String meta = System.getProperty("apolloMeta", System.getenv("APOLLO_META"));
String svc = System.getProperty("apolloConfigService", System.getenv("APOLLO_CONFIG_SERVICE"));
if (isBlank(meta) && isBlank(svc)) {
throw new IllegalStateException("Apollo endpoint missing: set apolloMeta or apolloConfigService");
} Prevention
- Set Apollo endpoint env vars (APOLLO_META/APOLLO_CONFIG_SERVICE) in every deployment environment
- Add a startup preflight assertion for Apollo properties before seata initializes
- Keep apollo key spelling in registry.conf/file.conf exactly as documented
When it happens
Trigger: Setting config.type=apollo in registry.conf/file.conf or via -Dseata.config.type=apollo but omitting both apolloConfigService and apolloMeta; typos in the property names (e.g. apollo.meta vs apolloMeta or wrong env key apollo.config-service); the values expected in file.conf not flowing to system properties because the file wasn't loaded.
Common situations: New environment/deployment missing Apollo env vars (APP-ID, APOLLO_META, APOLLO_CONFIG_SERVICE); copying a registry template without filling Apollo endpoints; property-key casing/format mismatch between file.conf keys and System.setProperty names; CI containers lacking Apollo network config.
Related errors
- config type can not be null
- ERR_CONFIG
- not support putConfig
- not support atomic operation putConfigIfAbsent
- not support removeConfig
AI-assisted analysis of apache/incubator-seata@e01f97c6db (2026-08-14).
Data as JSON: /api/errors/39b1b87d414d27e2.
Report an issue: GitHub.