quarkusio/quarkus · error · IllegalArgumentException
No service URLs have been configured for service
Error message
No service URLs have been configured for service
What it means
DiscoveryService.validate() requires at least one Eureka server URL. This IllegalArgumentException is thrown when the eureka config block exists but its service-url list is empty, so discovery has no Eureka endpoint to query.
Source
Thrown at extensions/spring-cloud-config-client/runtime/src/main/java/io/quarkus/spring/cloud/config/client/runtime/eureka/DiscoveryService.java:63
}
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
- Set quarkus.spring-cloud-config.discovery.eureka.service-url to a non-empty Eureka URL (e.g. http://localhost:8761/eureka)
- If using env vars/overrides, confirm the final resolved value is non-empty (check startup config logs)
- Remove the empty eureka block or disable discovery if a direct quarkus.spring-cloud-config.url is used instead
Example fix
# before quarkus.spring-cloud-config.discovery.eureka.service-url= # after quarkus.spring-cloud-config.discovery.eureka.service-url=http://localhost:8761/eureka
Defensive patterns
Strategy: validation
Validate before calling
var d = config.discoveryConfig();
if (d.isPresent() && d.get().eurekaConfig().isPresent()
&& d.get().eurekaConfig().get().serviceUrl().isEmpty()) {
throw new IllegalStateException("quarkus.spring-cloud-config.discovery.eureka.service-url must not be empty");
} Try / catch
try {
discoveryService.discover(serviceId);
} catch (IllegalArgumentException e) {
log.error("Eureka service-url missing: " + e.getMessage());
} Prevention
- Never leave service-url blank; give at least one Eureka URL
- Audit env-var overrides that can blank the property
- Verify the active profile contains the Eureka URL
When it happens
Trigger: quarkus.spring-cloud-config.discovery.eureka.* present but quarkus.spring-cloud-config.discovery.eureka.service-url is unset or an empty list, then discover() -> validate() fails.
Common situations: Empty property value in application.properties; property defined only in a non-active profile; value cleared via environment variable override (SPRING_CLOUD_CONFIG_DISCOVERY_EUREKA_SERVICE_URL='').
Related errors
- No Eureka configuration has been provided
- 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/f7020829d98c242f.
Report an issue: GitHub.