{"record":{"id":"ec2d0d7937329cf2","repo":"conductor-oss/conductor","slug":"retries-completed-timeout-while-connecting-to-ad","errorCode":null,"errorMessage":"Retries completed. Timeout while connecting to <addresses>","messagePattern":"Retries completed\\. Timeout while connecting to <addresses>","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"critical","filePath":"amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/AMQPConnection.java","lineNumber":165,"sourceCode":"                if (retry == null) {\n                    final String error =\n                            \"Timeout while connecting to \"\n                                    + Arrays.stream(addresses)\n                                            .map(address -> address.toString())\n                                            .collect(Collectors.joining(\",\"));\n                    LOGGER.error(error, e);\n                    throw new RuntimeException(error, e);\n                }\n                try {\n                    retry.continueOrPropogate(e, retryIndex);\n                } catch (Exception ex) {\n                    final String error =\n                            \"Retries completed. Timeout while connecting to \"\n                                    + Arrays.stream(addresses)\n                                            .map(address -> address.toString())\n                                            .collect(Collectors.joining(\",\"));\n                    LOGGER.error(error, e);\n                    throw new RuntimeException(error, e);\n                }\n                retryIndex++;\n            }\n        }\n    }\n\n    public Channel getOrCreateChannel(ConnectionType connectionType, String queueOrExchangeName)\n            throws Exception {\n        LOGGER.debug(\n                \"Accessing the channel for queueOrExchange {} with type {} \",\n                queueOrExchangeName,\n                connectionType);\n        switch (connectionType) {\n            case SUBSCRIBER:\n                String subChnName = connectionType + \";\" + queueOrExchangeName;\n                if (subscriberReservedChannelPool.containsKey(subChnName)) {\n                    Channel locChn = subscriberReservedChannelPool.get(subChnName);\n                    if (locChn != null && locChn.isOpen()) {","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/AMQPConnection.java#L147-L183","documentation":"createConnection caught TimeoutException, retrySettings is non-null, but retry.continueOrPropogate(e, retryIndex) threw, meaning the retry budget was exhausted while the handshake kept timing out. The original TimeoutException is wrapped as the cause.","triggerScenarios":"factory.newConnection keeps throwing TimeoutException on every attempt until the AMQPRetryPattern limit/duration is reached, then continueOrPropogate raises and the retries-completed message is thrown.","commonSituations":"A persistently slow or overloaded broker that cannot complete the handshake within any single attempt's timeout across the whole retry window; a network path with sustained high latency or packet loss.","solutions":["Investigate broker load and network latency (the timeout is being hit on every attempt, not just once).","Raise the connection timeout AND/OR the retry budget, depending on whether the problem is per-attempt latency or outage length.","Add a circuit breaker so repeated timeout exhaustion fails fast upstream.","Confirm there is not a firewall doing SYN-proxying that stalls the AMQP handshake."],"exampleFix":"# before: every handshake attempt times out and retries exhaust immediately\nconductor.amqp.connectionTimeoutInMilliSecs=2000\nconductor.amqp.retry.limit=3\n\n# after: widen both the per-attempt timeout and the retry budget\nconductor.amqp.connectionTimeoutInMilliSecs=10000\nconductor.amqp.retry.limit=6","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Handshake retries exhausted; this is a hard failure\ntry {\n    amqpConnection.getOrCreateChannel(type, name);\n} catch (RuntimeException e) {\n    LOGGER.error(\"AMQP handshake retries exhausted: {}\", e.getMessage(), e);\n    throw e; // trip circuit breaker\n}","preventionTips":["Tune both the per-attempt connection timeout and the retry budget together.","Add a circuit breaker so repeated timeout exhaustion fails fast upstream.","Alert on repeated handshake-timeout exhaustion as a latency/network signal."],"tags":["amqp","rabbitmq","connection","retry","timeout"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}