quarkusio/quarkus · error · IllegalArgumentException

Eureka configuration is required

Error message

Eureka configuration is required

What it means

When quarkus.spring-cloud-config.discovery-enabled=true, VertxSpringCloudConfigGateway resolves the Config Server through Eureka. createEurekaClient asserts that the EurekaConfig is present and throws 'Eureka configuration is required' if it is null, meaning discovery was requested but no Eureka settings were provided.

Source

Thrown at extensions/spring-cloud-config-client/runtime/src/main/java/io/quarkus/spring/cloud/config/client/runtime/VertxSpringCloudConfigGateway.java:76

        this.configServerBaseUrlProvider = createConfigServerProvider(config);
    }

    private ConfigServerBaseUrlProvider createConfigServerProvider(SpringCloudConfigClientConfig config) {
        if (!config.discovery().isPresent() || (!config.discovery().get().enabled())) {
            return new DirectConfigServerBaseUrlProvider(config);
        }
        DiscoveryService discoveryService = createDiscoveryService(config.discovery().get());
        return new DiscoveryConfigServerBaseUrlProvider(discoveryService, config);
    }

    private DiscoveryService createDiscoveryService(SpringCloudConfigClientConfig.DiscoveryConfig config) {
        EurekaClient eurekaClient = createEurekaClient(config.eurekaConfig().get());
        return new DiscoveryService(eurekaClient);
    }

    private EurekaClient createEurekaClient(SpringCloudConfigClientConfig.DiscoveryConfig.EurekaConfig config) {
        if (config == null) {
            throw new IllegalArgumentException("Eureka configuration is required");
        }
        Duration fetchInterval = config.registryFetchIntervalSeconds();
        EurekaResponseMapper responseMapper = new EurekaResponseMapper();
        RandomEurekaInstanceSelector instanceSelector = new RandomEurekaInstanceSelector();

        return new EurekaClient(
                webClient,
                fetchInterval,
                responseMapper,
                instanceSelector);
    }

    private Vertx createVertxInstance() {
        // We must disable the async DNS resolver as it can cause issues when resolving the Vault instance.
        // This is done using the DISABLE_DNS_RESOLVER system property.
        // The DNS resolver used by vert.x is configured during the (synchronous) initialization.
        // So, we just need to disable the async resolver around the Vert.x instance creation.
        try (var resettableSystemProperties = ResettableSystemProperties.of(

View on GitHub (pinned to e1c734241f)

Solutions

  1. Provide the Eureka configuration: quarkus.spring-cloud-config.eureka.enabled=true and quarkus.spring-cloud-config.eureka.service-url (and zones if needed)
  2. If the Config Server URL is known statically, disable discovery with quarkus.spring-cloud-config.discovery-enabled=false and set quarkus.spring-cloud-config.url directly

Example fix

// before
quarkus.spring-cloud-config.discovery-enabled=true
# no eureka config

// after
quarkus.spring-cloud-config.discovery-enabled=true
quarkus.spring-cloud-config.eureka.enabled=true
quarkus.spring-cloud-config.eureka.service-url=http://eureka:8761/eureka
Defensive patterns

Strategy: validation

Validate before calling

if (discoveryEnabled && (eurekaServiceUrl == null || eurekaServiceUrl.isEmpty())) {
    throw new IllegalStateException("eureka.service-url required when discovery-enabled=true");
}

Prevention

When it happens

Trigger: Enabling quarkus.spring-cloud-config.discovery-enabled=true without configuring quarkus.spring-cloud-config.eureka.* properties (eureka host, port, service-url); Optional config resolving to empty so config.eurekaConfig().get() yields null upstream of the null check.

Common situations: Migrating Spring apps where discovery was auto-configured via Eureka defaults; partial config where eureka.enabled is set but eureka.service-url is missing.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/66a515ad031af122. Report an issue: GitHub.