{"record":{"id":"daacdb2ba9a34c26","repo":"conductor-oss/conductor","slug":"cannot-open-conntype-channel-on-addresses","errorCode":null,"errorMessage":"Cannot open <connType> channel on <addresses>","messagePattern":"Cannot open <connType> channel on <addresses>","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/AMQPConnection.java","lineNumber":231,"sourceCode":"        while (true) {\n            try {\n                LOGGER.debug(\"Creating a channel for \" + connType);\n                locChn = rmqConnection.createChannel();\n                if (locChn == null || !locChn.isOpen()) {\n                    throw new RuntimeException(\"Fail to open \" + connType + \" channel\");\n                }\n                locChn.addShutdownListener(\n                        cause -> {\n                            LOGGER.error(\n                                    connType + \" Channel has been shutdown: {}\",\n                                    cause.getMessage(),\n                                    cause);\n                        });\n                return locChn;\n            } catch (final IOException e) {\n                AMQPRetryPattern retry = retrySettings;\n                if (retry == null) {\n                    throw new RuntimeException(\n                            \"Cannot open \"\n                                    + connType\n                                    + \" channel on \"\n                                    + Arrays.stream(addresses)\n                                            .map(address -> address.toString())\n                                            .collect(Collectors.joining(\",\")),\n                            e);\n                }\n                try {\n                    retry.continueOrPropogate(e, retryIndex);\n                } catch (Exception ex) {\n                    throw new RuntimeException(\n                            \"Retries completed. Cannot open \"\n                                    + connType\n                                    + \" channel on \"\n                                    + Arrays.stream(addresses)\n                                            .map(address -> address.toString())\n                                            .collect(Collectors.joining(\",\")),","sourceCodeStart":213,"sourceCodeEnd":249,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/AMQPConnection.java#L213-L249","documentation":"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.","triggerScenarios":"borrowChannel calls getOrCreateChannel while the publisher/subscriber connection has silently closed underneath; createChannel throws IOException; because retrySettings is null the no-retry branch throws.","commonSituations":"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.","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."],"exampleFix":"// before: no retry -> a stale connection fails the channel open immediately\nAMQPObservableQueue q = builder.build(useExchange, uri, type); // retrySettings null path\n\n// after: configure retry so createChannel is retried after connection recovery\nAMQPRetryPattern retry = new AMQPRetryPattern(limit, duration, type);","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    amqpConnection.getOrCreateChannel(type, name);\n} catch (RuntimeException e) {\n    if (e.getCause() instanceof IOException) {\n        // channel creation failed on a stale/closed connection; back off and retry\n    }\n    throw e;\n}","preventionTips":["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."],"tags":["amqp","rabbitmq","channel","io"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}