quarkusio/quarkus · error · IllegalStateException
Proxy configuration with name ${key} was requested but quark
Error message
Proxy configuration with name ${key} was requested but quarkus.proxy."${key}".host is not defined What it means
Thrown at runtime (during a public get() call on ProxyConfigurationRegistryImpl) when code requests a named proxy configuration whose key was never registered because quarkus.proxy."<key>".host was not set. The registry only builds configurations for named proxies that define a host, so any lookup of an undefined name fails with this message. The special key "none" always returns an empty/none configuration instead of throwing.
Source
Thrown at extensions/proxy-registry/runtime/src/main/java/io/quarkus/proxy/runtime/ProxyConfigurationRegistryImpl.java:32
ProxyConfigurationRegistryImpl(Map<String, ProxyConfiguration> configs, Optional<ProxyConfiguration> defaultConfig) {
this.configs = configs;
this.defaultConfig = defaultConfig;
}
@Override
public Optional<ProxyConfiguration> get(Optional<String> name) {
if (name.isEmpty()) {
return defaultConfig;
}
String key = name.get();
if (ProxyConfigurationRegistry.NONE.equals(key)) {
return NONE;
}
ProxyConfiguration config = configs.get(key);
if (config == null) {
throw new IllegalStateException("Proxy configuration with name " + key + " was requested but "
+ "quarkus.proxy.\"" + key + "\".host is not defined");
}
return Optional.of(config);
}
private static final Optional<ProxyConfiguration> NONE = Optional.of(new ProxyConfigurationImpl("none", 0,
Optional.empty(), Optional.empty(), Optional.empty(), Optional.empty(), ProxyType.HTTP));
}
View on GitHub (pinned to e1c734241f)
Solutions
- Define the proxy: add quarkus.proxy."<key>".host (and port) in application.properties for the active profile.
- Fix the key used in the referencing configuration or code so it matches an existing quarkus.proxy."<name>" entry exactly (quotes/case matter).
- If you removed the proxy intentionally, update or remove whatever references it by name (e.g. HTTP client proxy-name settings).
- Check the property is not scoped to a profile that isn't active (e.g. defined only under %dev).
Example fix
// before (application.properties) — referenced but never defined quarkus.http.proxy-name="corp" // after — define the named proxy quarkus.proxy."corp".host=proxy.corp.example quarkus.proxy."corp".port=8080 quarkus.http.proxy-name="corp"
Defensive patterns
Strategy: validation
Validate before calling
// Check the named proxy is defined before requesting it from the registry
String key = "corp";
boolean defined = ConfigProvider.getConfig()
.getOptionalValue("quarkus.proxy.\"" + key + "\".host", String.class)
.isPresent();
if (!defined) {
throw new IllegalStateException(
"quarkus.proxy.\"" + key + "\".host must be defined before lookup");
}
Optional<ProxyConfiguration> cfg = registry.get(key); Try / catch
// The registry throws IllegalStateException on unknown keys
try {
Optional<ProxyConfiguration> cfg = registry.get(key);
cfg.ifPresent(this::configureClient);
} catch (IllegalStateException e) {
log.warnf("Proxy '%s' is not configured (quarkus.proxy.\"%s\".host missing): %s", key, key, e.getMessage());
// fall back to no proxy or abort startup, per policy
} Prevention
- Define quarkus.proxy."<name>".host for every proxy name referenced anywhere in your configuration.
- Centralize proxy names as constants and reference the same key in code and properties.
- When removing a proxy, grep for the name across properties, yaml, and code references.
- Verify the property exists in the active profile's configuration before enabling features that depend on it.
When it happens
Trigger: Any runtime code path calling ProxyConfigurationRegistry.get(key) (e.g. an HTTP client proxy lookup, or Quarkus internals resolving a configured proxy name) where no quarkus.proxy."<key>".host property exists in the application configuration.
Common situations: A library or application property points to a proxy by name but the corresponding quarkus.proxy."<name>".host entry was never added; the proxy block was removed or renamed while referencing code/config still uses the old key; typos in the key between the reference and the definition; config only defined for another profile.
Related errors
- No datasource named '<dataSourceName>' exists
- Cannot find the Proxy registry configuration '%s'
- ${prefix}.username and ${prefix}.password must be both set o
- Could not retrieve ${missingKeys} from credentials provider
- Cannot use `" + methodName + "` method without a default typ
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/97a06eb9e0593b82.
Report an issue: GitHub.