{"record":{"id":"6b1591b4ef73b2c8","repo":"conductor-oss/conductor","slug":"port-must-be-greater-than-0","errorCode":null,"errorMessage":"Port must be greater than 0","messagePattern":"Port must be greater than 0","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/AMQPObservableQueue.java","lineNumber":495,"sourceCode":"            // Get rabbitmq password from config\n            final String password = properties.getPassword();\n            if (StringUtils.isEmpty(password)) {\n                throw new IllegalArgumentException(\"Password is null or empty\");\n            } else {\n                factory.setPassword(password);\n            }\n            // Get vHost from config\n            final String virtualHost = properties.getVirtualHost();\n            ;\n            if (StringUtils.isEmpty(virtualHost)) {\n                throw new IllegalArgumentException(\"Virtual host is null or empty\");\n            } else {\n                factory.setVirtualHost(virtualHost);\n            }\n            // Get server port from config\n            final int port = properties.getPort();\n            if (port <= 0) {\n                throw new IllegalArgumentException(\"Port must be greater than 0\");\n            } else {\n                factory.setPort(port);\n            }\n            final boolean useNio = properties.isUseNio();\n            if (useNio) {\n                factory.useNio();\n            }\n            final boolean useSslProtocol = properties.isUseSslProtocol();\n            if (useSslProtocol) {\n                try {\n                    factory.useSslProtocol();\n                } catch (NoSuchAlgorithmException | KeyManagementException e) {\n                    throw new IllegalArgumentException(\"Invalid sslProtocol \", e);\n                }\n            }\n            factory.setConnectionTimeout(properties.getConnectionTimeoutInMilliSecs());\n            factory.setRequestedHeartbeat(properties.getRequestHeartbeatTimeoutInSecs());\n            factory.setNetworkRecoveryInterval(properties.getNetworkRecoveryIntervalInMilliSecs());","sourceCodeStart":477,"sourceCodeEnd":513,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/AMQPObservableQueue.java#L477-L513","documentation":"Builder.buildConnectionFactory() reads AMQPEventQueueProperties.getPort(); if it is <= 0 the Builder constructor throws. The port is set on the rabbitmq ConnectionFactory, so it must be a valid positive TCP port.","triggerScenarios":"Constructing `new AMQPObservableQueue.Builder(properties)` when the AMQP port property is unset (defaulting to 0 or negative) or misconfigured.","commonSituations":"The port property is not set and defaults to 0; a non-numeric or negative value was bound; the wrong property key was used.","solutions":["Set the port property to a valid positive port (5672 for AMQP, 5671 for AMQPS).","Confirm the value binds as an integer (AMQPEventQueueProperties.getPort()) and is not negative.","Verify the property key matches the configuration binding."],"exampleFix":"# before: port unset/0 -> 'Port must be greater than 0'\n# (no conductor.amqp.port)\n\n# after: set a valid port\nconductor.amqp.port=5672","handlingStrategy":"validation","validationCode":"if (properties.getPort() <= 0) {\n    throw new IllegalArgumentException(\n        \"conductor.amqp.port must be a positive TCP port (5672 / 5671)\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set the AMQP port property to a valid positive port.","Confirm the value binds as a positive integer.","Validate numeric AMQP properties at startup."],"tags":["amqp","config","validation"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}