conductor-oss/conductor · error · IllegalArgumentException
Port must be greater than 0
Error message
Port must be greater than 0
What it means
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.
Source
Thrown at amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/AMQPObservableQueue.java:495
// Get rabbitmq password from config
final String password = properties.getPassword();
if (StringUtils.isEmpty(password)) {
throw new IllegalArgumentException("Password is null or empty");
} else {
factory.setPassword(password);
}
// Get vHost from config
final String virtualHost = properties.getVirtualHost();
;
if (StringUtils.isEmpty(virtualHost)) {
throw new IllegalArgumentException("Virtual host is null or empty");
} else {
factory.setVirtualHost(virtualHost);
}
// Get server port from config
final int port = properties.getPort();
if (port <= 0) {
throw new IllegalArgumentException("Port must be greater than 0");
} else {
factory.setPort(port);
}
final boolean useNio = properties.isUseNio();
if (useNio) {
factory.useNio();
}
final boolean useSslProtocol = properties.isUseSslProtocol();
if (useSslProtocol) {
try {
factory.useSslProtocol();
} catch (NoSuchAlgorithmException | KeyManagementException e) {
throw new IllegalArgumentException("Invalid sslProtocol ", e);
}
}
factory.setConnectionTimeout(properties.getConnectionTimeoutInMilliSecs());
factory.setRequestedHeartbeat(properties.getRequestHeartbeatTimeoutInSecs());
factory.setNetworkRecoveryInterval(properties.getNetworkRecoveryIntervalInMilliSecs());View on GitHub (pinned to cf7c3e4a8a)
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.
Example fix
# before: port unset/0 -> 'Port must be greater than 0' # (no conductor.amqp.port) # after: set a valid port conductor.amqp.port=5672
Defensive patterns
Strategy: validation
Validate before calling
if (properties.getPort() <= 0) {
throw new IllegalArgumentException(
"conductor.amqp.port must be a positive TCP port (5672 / 5671)");
} Prevention
- Set the AMQP port property to a valid positive port.
- Confirm the value binds as a positive integer.
- Validate numeric AMQP properties at startup.
When it happens
Trigger: Constructing `new AMQPObservableQueue.Builder(properties)` when the AMQP port property is unset (defaulting to 0 or negative) or misconfigured.
Common situations: The port property is not set and defaults to 0; a non-numeric or negative value was bound; the wrong property key was used.
Related errors
- Connection factory is undefined
- Addresses are undefined
- Settings are undefined
- Batch size must be greater than 0
- Poll time must be greater than 0 ms
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/6b1591b4ef73b2c8.
Report an issue: GitHub.