conductor-oss/conductor · error · IllegalArgumentException

Virtual host is null or empty

Error message

Virtual host is null or empty

What it means

Builder.buildConnectionFactory() reads AMQPEventQueueProperties.getVirtualHost(); if it is null or empty the Builder constructor throws. The virtual host is set on the rabbitmq ConnectionFactory and is required even when connecting to the default vhost '/' (which is a non-empty string).

Source

Thrown at amqp/src/main/java/com/netflix/conductor/contribs/queue/amqp/AMQPObservableQueue.java:488

            // 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);
            }
            // 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();

View on GitHub (pinned to cf7c3e4a8a)

Solutions

  1. Set the virtualHost property; use '/' explicitly for the default vhost.
  2. Confirm the vhost actually exists on the broker (rabbitmqctl list_vhosts).
  3. Verify the property key matches AMQPEventQueueProperties.getVirtualHost().

Example fix

# before: virtualHost missing -> 'Virtual host is null or empty'
# (no conductor.amqp.virtualHost)

# after: set the vhost explicitly (default vhost is '/')
conductor.amqp.virtualHost=/
Defensive patterns

Strategy: validation

Validate before calling

if (StringUtils.isEmpty(properties.getVirtualHost())) {
    throw new IllegalArgumentException(
        "conductor.amqp.virtualHost must be set (use '/' for the default vhost)");
}

Prevention

When it happens

Trigger: Constructing `new AMQPObservableQueue.Builder(properties)` when the AMQP virtualHost property is missing or blank.

Common situations: The virtualHost property is unset (someone assumed '/' was implicit, but it must be configured explicitly); the property key is misspelled; the value is an empty string.

Related errors


AI-assisted analysis of conductor-oss/conductor@cf7c3e4a8a (2026-08-14). Data as JSON: /api/errors/fa5f945daf57dd1d. Report an issue: GitHub.