conductor-oss/conductor · error · RuntimeException
Cannot open <connType> channel on <addresses>
Error message
Cannot open <connType> channel on <addresses>
What it means
getOrCreateChannel caught an IOException from rmqConnection.createChannel() and retrySettings is null, so the failure propagates immediately. An IOException here usually means the underlying connection is already closed (createChannel on a closed connection throws) or the broker rejected the channel operation.
Source
Thrown at amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/AMQPConnection.java:231
while (true) {
try {
LOGGER.debug("Creating a channel for " + connType);
locChn = rmqConnection.createChannel();
if (locChn == null || !locChn.isOpen()) {
throw new RuntimeException("Fail to open " + connType + " channel");
}
locChn.addShutdownListener(
cause -> {
LOGGER.error(
connType + " Channel has been shutdown: {}",
cause.getMessage(),
cause);
});
return locChn;
} catch (final IOException e) {
AMQPRetryPattern retry = retrySettings;
if (retry == null) {
throw new RuntimeException(
"Cannot open "
+ connType
+ " channel on "
+ Arrays.stream(addresses)
.map(address -> address.toString())
.collect(Collectors.joining(",")),
e);
}
try {
retry.continueOrPropogate(e, retryIndex);
} catch (Exception ex) {
throw new RuntimeException(
"Retries completed. Cannot open "
+ connType
+ " channel on "
+ Arrays.stream(addresses)
.map(address -> address.toString())
.collect(Collectors.joining(",")),View on GitHub (pinned to cf7c3e4a8a)
Solutions
- Wire an AMQPRetryPattern so channel-creation IOExceptions are retried (and, on retry, the connection may be re-established).
- Confirm getOrCreateChannel(ConnectionType, String) is the entry point used: it re-checks isOpen() and recreates the connection before borrowing a channel.
- Check the broker connection log for the cause of the underlying close.
- Verify network stability between the client and broker.
Example fix
// before: no retry -> a stale connection fails the channel open immediately AMQPObservableQueue q = builder.build(useExchange, uri, type); // retrySettings null path // after: configure retry so createChannel is retried after connection recovery AMQPRetryPattern retry = new AMQPRetryPattern(limit, duration, type);
Defensive patterns
Strategy: retry
Try / catch
try {
amqpConnection.getOrCreateChannel(type, name);
} catch (RuntimeException e) {
if (e.getCause() instanceof IOException) {
// channel creation failed on a stale/closed connection; back off and retry
}
throw e;
} Prevention
- Wire a non-null AMQPRetryPattern so channel-creation IOExceptions are retried.
- Always enter through getOrCreateChannel(ConnectionType, String), which refreshes a closed connection first.
- Keep connections healthy so createChannel does not run against a stale connection.
When it happens
Trigger: borrowChannel calls getOrCreateChannel while the publisher/subscriber connection has silently closed underneath; createChannel throws IOException; because retrySettings is null the no-retry branch throws.
Common situations: The cached connection was closed by the broker or network but the cached reference has not yet been refreshed; a broker restart left stale connection state; channel opened against a connection whose isOpen() check passed but which then failed.
Related errors
- Retries completed. Cannot open <connType> channel on <addres
- IO error while connecting to <addresses>
- Retries completed. IO error while connecting to <addresses>
- Fail to open <connType> channel
- Failed to open connection
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/daacdb2ba9a34c26.
Report an issue: GitHub.