apache/dolphinscheduler · error · RegistryException
Cannot connect to jdbc registry in %s s
Error message
Cannot connect to jdbc registry in %s s
What it means
Thrown in JdbcRegistry.connectUntilTimeout when the polling loop exceeds the given timeout Duration without jdbcRegistryClient.isConnectivity() ever becoming true: the JDBC-backed registry (backed by the main DolphinScheduler database) is unreachable — wrong DB config, database down, or network issues — so startup of registry-dependent components must fail.
Source
Thrown at dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/JdbcRegistry.java:82
public void start() {
log.info("Starting Jdbc Registry...");
jdbcRegistryServer.start();
jdbcRegistryClient.start();
log.info("Started Jdbc Registry...");
}
@Override
public boolean isConnected() {
return jdbcRegistryClient.isConnectivity();
}
@Override
public void connectUntilTimeout(@NonNull Duration timeout) throws RegistryException {
long beginTimeMillis = System.currentTimeMillis();
long endTimeMills = timeout.getSeconds() <= 0 ? Long.MAX_VALUE : beginTimeMillis + timeout.toMillis();
while (true) {
if (System.currentTimeMillis() > endTimeMills) {
throw new RegistryException(
String.format("Cannot connect to jdbc registry in %s s", timeout.getSeconds()));
}
if (jdbcRegistryClient.isConnectivity()) {
return;
}
try {
Thread.sleep(jdbcRegistryProperties.getHeartbeatRefreshInterval().toMillis());
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RegistryException("Cannot connect to jdbc registry due to interrupted exception", e);
}
}
}
@Override
public void subscribe(String watchedPath, SubscribeListener listener) {
checkNotNull(watchedPath);
checkNotNull(listener);View on GitHub (pinned to 02eac45a1b)
Solutions
- Verify the registry datasource configuration (JDBC URL, credentials) is correct
- Check that the metadata database is up and reachable from this host
- Increase the registry connect timeout if the DB is slow to accept connections
- Review DB-side errors (max connections, firewall) reported around the same time
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/JdbcRegistry.java:82 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/e43bb17d7dd1a1ae.
Report an issue: GitHub.