apache/dubbo · error · IllegalArgumentException

Address is not allowed to be empty, please re-enter.

Error message

Address is not allowed to be empty, please re-enter.

What it means

Thrown by UrlUtils.parseURL(String address, Map defaults) when address is null or empty after trimming. The method is the primary entry point for parsing a Dubbo provider/registry address string into a URL object. An empty address means no endpoint was configured.

Source

Thrown at dubbo-common/src/main/java/org/apache/dubbo/common/utils/UrlUtils.java:85

import static org.apache.dubbo.common.constants.RegistryConstants.SERVICE_REGISTRY_TYPE;

public class UrlUtils {

    /**
     * Forbids the instantiation.
     */
    private UrlUtils() {
        throw new UnsupportedOperationException("No instance of 'UrlUtils' for you! ");
    }

    /**
     * in the url string,mark the param begin
     */
    private static final String URL_PARAM_STARTING_SYMBOL = "?";

    public static URL parseURL(String address, Map<String, String> defaults) {
        if (StringUtils.isEmpty(address)) {
            throw new IllegalArgumentException("Address is not allowed to be empty, please re-enter.");
        }
        String url;
        if (address.contains("://") || address.contains(URL_PARAM_STARTING_SYMBOL)) {
            url = address;
        } else {
            String[] addresses = COMMA_SPLIT_PATTERN.split(address);
            url = addresses[0];
            if (addresses.length > 1) {
                StringBuilder backup = new StringBuilder();
                for (int i = 1; i < addresses.length; i++) {
                    if (i > 1) {
                        backup.append(',');
                    }
                    backup.append(addresses[i]);
                }
                url += URL_PARAM_STARTING_SYMBOL + RemotingConstants.BACKUP_KEY + "=" + backup.toString();
            }
        }

View on GitHub (pinned to 3a3043227f)

Solutions

  1. Set the address property in configuration (e.g. dubbo.registry.address=zookeeper://127.0.0.1:2181).
  2. Validate config at startup: assert StringUtils.isNotEmpty(config.getAddress()) before the framework calls parseURL.
  3. Check environment variable / config center for the missing address key.

Example fix

# before (application.properties)
# dubbo.registry.address is missing

# after
dubbo.registry.address=zookeeper://127.0.0.1:2181
Defensive patterns

Strategy: validation

Validate before calling

if (StringUtils.isEmpty(address)) {
    throw new IllegalStateException("Registry/provider address is not configured");
}
URL url = UrlUtils.parseURL(address, defaults);

Prevention

When it happens

Trigger: Calling parseURL("", defaults) or parseURL(null, defaults); address property resolved from configuration (dubbo.registry.address or dubbo.provider.address) that was not set; address string is entirely whitespace.

Common situations: Missing or commented-out registry address in dubbo.properties / application.yml / XML config; environment variable for the address not set in the deployment; address loaded from a config center that returned an empty string.

Related errors


AI-assisted analysis of apache/dubbo@3a3043227f (2026-08-14). Data as JSON: /api/errors/394bf4ce0edd10bf. Report an issue: GitHub.