{"record":{"id":"c0cae0e83ad62e19","repo":"quarkusio/quarkus","slug":"unable-to-resolve-value","errorCode":null,"errorMessage":"Unable to resolve \"${value}\"","messagePattern":"Unable to resolve \"(.+?)\"","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"core/runtime/src/main/java/io/quarkus/runtime/configuration/InetAddressConverter.java","lineNumber":36,"sourceCode":"@Priority(DEFAULT_QUARKUS_CONVERTER_PRIORITY)\npublic class InetAddressConverter implements Converter<InetAddress>, Serializable {\n\n    private static final long serialVersionUID = 4539214213710330204L;\n\n    @Override\n    public InetAddress convert(String value) {\n        value = value.trim();\n        if (value.isEmpty()) {\n            return null;\n        }\n        final InetAddress parsed = Inet.parseInetAddress(value);\n        if (parsed != null) {\n            return parsed;\n        }\n        try {\n            return InetAddress.getByName(value);\n        } catch (UnknownHostException e) {\n            throw new IllegalArgumentException(\"Unable to resolve \\\"\" + value + \"\\\"\", e);\n        }\n    }\n}\n","sourceCodeStart":18,"sourceCodeEnd":40,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/runtime/src/main/java/io/quarkus/runtime/configuration/InetAddressConverter.java#L18-L40","documentation":"InetAddressConverter.convert() parses a config value as a literal IP first, then falls back to InetAddress.getByName(value). If the name cannot be resolved (UnknownHostException), it throws IllegalArgumentException(\"Unable to resolve \\\"<value>\\\"\").","triggerScenarios":"Setting an IP/host-typed property with a hostname that DNS cannot resolve at startup, an invalid IP literal, or running in an environment without DNS/network access (containers, offline CI) where a hostname would be needed.","commonSituations":"Typo in hostname ('db.host.local' vs 'dbhost.local'); Docker/Kubernetes startup before the DNS entry exists; IPv6 literals needing brackets or wrong syntax; offline native-image container trying to resolve localhost aliases.","solutions":["Use a literal IP address instead of a hostname if DNS is unreliable.","Fix the hostname typo or add the entry to DNS//etc/hosts.","Ensure DNS is reachable in the runtime environment (container network, CoreDNS, resolv.conf).","If the property accepts multiple formats, confirm the value matches one exactly (try parsing with InetAddress.getByName locally)."],"exampleFix":"# before\nquarkus.datasource.jdbc.host=db.internal   # unresolvable at startup\n# after\nquarkus.datasource.jdbc.host=10.0.0.5      # or fix DNS for db.internal","handlingStrategy":"try-catch","validationCode":"boolean isResolvable(String s) {\n    if (s == null || s.isBlank()) return false;\n    try {\n        java.net.InetAddress.getByName(s.trim());\n        return true;\n    } catch (java.net.UnknownHostException e) { return false;\n    }\n}","typeGuard":"java.net.InetAddress tryResolve(String s) {\n    try { return (s == null || s.isBlank()) ? null : java.net.InetAddress.getByName(s.trim()); }\n    catch (java.net.UnknownHostException e) { return null; }\n}","tryCatchPattern":"try {\n    // use converted InetAddress\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().startsWith(\"Unable to resolve\")) {\n        log.errorf(\"Host unresolvable, falling back to loopback: %s\", e.getMessage());\n        addr = java.net.InetAddress.getLoopbackAddress();\n    } else { throw e; }\n}","preventionTips":["Prefer literal IPs for startup-critical config to avoid DNS dependency","Verify hostname spelling and DNS/hosts entries","Ensure container networks have DNS available before app start"],"tags":["configuration","network","dns","converter"],"backgroundTag":"dns-resolution-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}