conductor-oss/conductor · error · IllegalArgumentException
Username is null or empty
Error message
Username is null or empty
What it means
Builder.buildConnectionFactory() reads AMQPEventQueueProperties.getUsername(); if it is null or empty the Builder constructor throws. The username is set on the rabbitmq ConnectionFactory, so it is mandatory.
Source
Thrown at amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/AMQPObservableQueue.java:473
this.batchSize = properties.getBatchSize();
this.pollTimeInMS = (int) properties.getPollTimeDuration().toMillis();
}
private Address[] buildAddressesFromHosts() {
// Read hosts from config
final String hosts = properties.getHosts();
if (StringUtils.isEmpty(hosts)) {
throw new IllegalArgumentException("Hosts are undefined");
}
return Address.parseAddresses(hosts);
}
private ConnectionFactory buildConnectionFactory() {
final ConnectionFactory factory = new ConnectionFactory();
// Get rabbitmq username from config
final String username = properties.getUsername();
if (StringUtils.isEmpty(username)) {
throw new IllegalArgumentException("Username is null or empty");
} else {
factory.setUsername(username);
}
// 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);
}View on GitHub (pinned to cf7c3e4a8a)
Solutions
- Set the username property to a non-empty value.
- Confirm the credential source (secret/env) is mounted and resolves before the Builder runs.
- Verify the property key matches AMQPEventQueueProperties.getUsername().
Example fix
# before: username missing -> 'Username is null or empty' # (no conductor.amqp.username) # after: set the username conductor.amqp.username=guest
Defensive patterns
Strategy: validation
Validate before calling
if (StringUtils.isEmpty(properties.getUsername())) {
throw new IllegalArgumentException("conductor.amqp.username must be set");
} Prevention
- Set the AMQP username property; source it from a secret store in production.
- Confirm the secret/env backing the username is mounted before the Builder runs.
- Validate required credential properties at startup.
When it happens
Trigger: Constructing `new AMQPObservableQueue.Builder(properties)` when the AMQP username property is missing or blank.
Common situations: The AMQP username property is not set in the environment/profile; credentials were intended to come from a secret store that was not mounted; the property key is misspelled.
Related errors
- Password is null or empty
- Connection factory is undefined
- Addresses are undefined
- Settings are undefined
- Batch size must be greater than 0
AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14).
Data as JSON: /api/errors/3276c601c38ac05c.
Report an issue: GitHub.