apache/dolphinscheduler · error · RegistryException

Get key: %s error

Error message

Get key: %s error

What it means

Generic wrapper thrown by JdbcRegistry.get when the underlying database access to fetch the key fails for any reason other than the key simply not existing (those get the 'not exist' error). The original exception is preserved as the cause.

Source

Thrown at dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-jdbc/src/main/java/org/apache/dolphinscheduler/plugin/registry/jdbc/JdbcRegistry.java:140

                listener.onUpdate(ConnectionState.RECONNECTED);
            }
        });
    }

    @Override
    public String get(String key) {
        try {
            // get the key value
            // Directly get from the db?
            Optional<JdbcRegistryDataDTO> jdbcRegistryDataOptional = jdbcRegistryClient.getJdbcRegistryDataByKey(key);
            if (!jdbcRegistryDataOptional.isPresent()) {
                throw new RegistryException("key: " + key + " not exist");
            }
            return jdbcRegistryDataOptional.get().getDataValue();
        } catch (RegistryException registryException) {
            throw registryException;
        } catch (Exception e) {
            throw new RegistryException(String.format("Get key: %s error", key), e);
        }
    }

    @Override
    public void put(String key, String value, boolean deleteOnDisconnect) {
        try {
            DataType dataType = deleteOnDisconnect ? DataType.EPHEMERAL : DataType.PERSISTENT;
            jdbcRegistryClient.putJdbcRegistryData(key, value, dataType);
        } catch (Exception ex) {
            throw new RegistryException(String.format("put key:%s, value:%s error", key, value), ex);
        }
    }

    @Override
    public void delete(String key) {
        try {
            jdbcRegistryClient.deleteJdbcRegistryDataByKey(key);
        } catch (Exception e) {

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Check the wrapped cause exception for the real SQL/connection error
  2. Verify DB connectivity and credentials in the registry JDBC config
  3. Confirm the registry schema tables exist (run the init DDL)
  4. Retry with backoff if the cause is a transient connection error

Example fix

try {
    String value = registry.get(key);
} catch (RegistryException e) {
    logger.error("get failed, cause: {}", e.getCause(), e);
    throw e;
}
Defensive patterns

Strategy: retry

Validate before calling

// verify DB connectivity before calls: try (Connection c = dataSource.getConnection()) { }

Try / catch

try { value = registry.get(key); } catch (RegistryException e) { if (isTransient(e.getCause())) retryWithBackoff(); else throw e; }

Prevention

When it happens

Trigger: Calling registry.get(key) when the DB is down, the connection pool is exhausted, the registry table is missing, or the query throws a SQL/transaction error.

Common situations: Database unreachable after failover, wrong JDBC config (bad URL/credentials), schema not initialized, network partition between the app and the metadata DB.

Understand the failure class

Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.

Related errors


AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06). Data as JSON: /api/errors/35b912c3e64224cd. Report an issue: GitHub.