apache/dolphinscheduler · error · RegistryException
zookeeper release lock error
Error message
zookeeper release lock error
What it means
Wrapper thrown in ZookeeperRegistry.releaseLock: when InterProcessMutex.release fails or the mutex remains owned by the current thread after release (abnormal state) the exception path wraps any error into a RegistryException('zookeeper release lock error'). It fires on ZK connection problems or lock-state corruption, not on balanced normal releases.
Source
Thrown at dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-zookeeper/src/main/java/org/apache/dolphinscheduler/plugin/registry/zookeeper/ZookeeperRegistry.java:284
Map<String, InterProcessMutex> processMutexMap = threadLocalLockMap.get();
if (processMutexMap == null) {
return true;
}
InterProcessMutex interProcessMutex = processMutexMap.get(key);
if (null == interProcessMutex) {
return false;
}
try {
interProcessMutex.release();
if (interProcessMutex.isOwnedByCurrentThread()) {
return true;
}
processMutexMap.remove(key);
if (processMutexMap.isEmpty()) {
threadLocalLockMap.remove();
}
} catch (Exception e) {
throw new RegistryException("zookeeper release lock error", e);
}
return true;
}
@Override
public boolean isConnected() {
return client.getZookeeperClient().isConnected();
}
@Override
public void close() {
treeCacheMap.values().forEach(CloseableUtils::closeQuietly);
CloseableUtils.closeQuietly(client);
}
}
View on GitHub (pinned to 02eac45a1b)
Solutions
- Inspect the cause: ConnectionLoss/SessionExpired point to ZK connectivity; IllegalMonitorStateException points to releasing a lock not held by this thread
- Ensure acquire/release pairs execute on the same thread
- Check for session expiry killing the lock ephemeral nodes mid-release
- Retry or treat as recoverable — the lock will expire with the session
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at dolphinscheduler-registry/dolphinscheduler-registry-plugins/dolphinscheduler-registry-zookeeper/src/main/java/org/apache/dolphinscheduler/plugin/registry/zookeeper/ZookeeperRegistry.java:284 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/ea0a64933d033b53.
Report an issue: GitHub.