quarkusio/quarkus · error · IllegalArgumentException
No Eureka configuration has been provided
Error message
No Eureka configuration has been provided
What it means
DiscoveryService.validate() is called from discover() and requires an Eureka discovery configuration. This IllegalArgumentException is thrown when the quarkus.spring-cloud-config.discovery.eureka section is entirely absent while discovery-based lookup of the Config Server was requested.
Source
Thrown at extensions/spring-cloud-config-client/runtime/src/main/java/io/quarkus/spring/cloud/config/client/runtime/eureka/DiscoveryService.java:60
} catch (Exception e) {
log.debug("Timed out while waiting for Spring Cloud Config Server URL for service '" + serviceId + "'", e);
}
}
log.debug("Fallback Attempting to discover Spring Cloud Config Server URL for service '" + serviceId
+ "' using the default URL: " + defaultServiceUrl);
try {
return getHomeUrl(defaultServiceUrl, serviceId);
} catch (Exception e) {
log.debug("Timed out while waiting for Spring Cloud Config Server URL for service '" + serviceId + "'", e);
}
throw new RuntimeException("Unable to discover Spring Cloud Config Server URL for service '" + serviceId + "'");
}
private void validate(SpringCloudConfigClientConfig.DiscoveryConfig discoveryConfig) {
if (discoveryConfig.eurekaConfig().isEmpty()) {
throw new IllegalArgumentException("No Eureka configuration has been provided");
}
if (discoveryConfig.eurekaConfig().get().serviceUrl().isEmpty()) {
throw new IllegalArgumentException("No service URLs have been configured for service");
}
if (discoveryConfig.serviceId().isEmpty()) {
throw new IllegalArgumentException("No service ID has been configured for service");
}
}
private String getHomeUrl(String defaultServiceUrl, String serviceId) {
JsonObject instance = eurekaClient.fetchInstances(defaultServiceUrl, serviceId);
return instance.getString("homePageUrl");
}
}
View on GitHub (pinned to e1c734241f)
Solutions
- Add the eureka config: quarkus.spring-cloud-config.discovery.eureka.service-url=http://localhost:8761/eureka
- Check for typos in the property names under quarkus.spring-cloud-config.discovery.eureka
- Verify the active config profile actually contains the eureka section
Example fix
# before quarkus.spring-cloud-config.discovery.enabled=true # after quarkus.spring-cloud-config.discovery.enabled=true quarkus.spring-cloud-config.discovery.eureka.service-url=http://localhost:8761/eureka
Defensive patterns
Strategy: validation
Validate before calling
boolean ok = config.enabled()
&& config.discoveryConfig().isPresent()
&& config.discoveryConfig().get().eurekaConfig().isPresent();
if (config.enabled() && !ok) throw new IllegalStateException("Add quarkus.spring-cloud-config.discovery.eureka.service-url"); Try / catch
try {
discoveryService.discover(serviceId);
} catch (IllegalArgumentException e) {
log.error("Missing eureka discovery config: " + e.getMessage());
} Prevention
- Always set the full discovery block when enabling discovery
- Run the app in dev mode to catch config mapping errors early
- Check property names against the quarkus-spring-cloud-config-client reference docs
When it happens
Trigger: quarkus.spring-cloud-config.discovery.enabled=true but no quarkus.spring-cloud-config.discovery.eureka.* properties are set, so discoveryConfig.eurekaConfig() returns empty.
Common situations: User enabled Spring Cloud Config discovery but forgot the eureka block; config property typo (e.g. 'eureka.service-urls' instead of 'eureka.service-url'); config file not loaded (wrong profile).
Related errors
- No service URLs have been configured for service
- No service ID has been configured for service
- Eureka configuration is required
- Unable to discover Spring Cloud Config Server URL for servic
- client-id, client-secret and introspection-url must be confi
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/9cc18477ab492326.
Report an issue: GitHub.