{"record":{"id":"9ed5661390eea820","repo":"hashicorp/nomad","slug":"failed-to-parse-rpc-advertise-address-v","errorCode":null,"errorMessage":"Failed to parse RPC advertise address: %v","messagePattern":"Failed to parse RPC advertise address: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"command/agent/config.go","lineNumber":2414,"sourceCode":"\n\tc.normalizedAddrs = &NormalizedAddrs{\n\t\tRPC:  normalizeAddrWithPort(c.Addresses.RPC, c.Ports.RPC),\n\t\tSerf: normalizeAddrWithPort(c.Addresses.Serf, c.Ports.Serf),\n\t}\n\tc.normalizedAddrs.HTTP = make([]string, len(httpAddrs))\n\tfor i, addr := range httpAddrs {\n\t\tc.normalizedAddrs.HTTP[i] = normalizeAddrWithPort(addr, c.Ports.HTTP)\n\t}\n\n\taddr, err = normalizeAdvertise(c.AdvertiseAddrs.HTTP, httpAddrs[0], c.Ports.HTTP, c.DevMode)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Failed to parse HTTP advertise address (%v, %v, %v, %v): %v\", c.AdvertiseAddrs.HTTP, c.Addresses.HTTP, c.Ports.HTTP, c.DevMode, err)\n\t}\n\tc.AdvertiseAddrs.HTTP = addr\n\n\taddr, err = normalizeAdvertise(c.AdvertiseAddrs.RPC, c.Addresses.RPC, c.Ports.RPC, c.DevMode)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Failed to parse RPC advertise address: %v\", err)\n\t}\n\tc.AdvertiseAddrs.RPC = addr\n\n\t// Skip serf if server is disabled\n\tif c.Server != nil && c.Server.Enabled {\n\t\taddr, err = normalizeAdvertise(c.AdvertiseAddrs.Serf, c.Addresses.Serf, c.Ports.Serf, c.DevMode)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Failed to parse Serf advertise address: %v\", err)\n\t\t}\n\t\tc.AdvertiseAddrs.Serf = addr\n\t}\n\n\t// Skip network_interface evaluation if not a client\n\tif c.Client != nil && c.Client.Enabled && c.Client.NetworkInterface != \"\" {\n\t\tparsed, err := parseSingleInterfaceTemplate(c.Client.NetworkInterface)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Failed to parse network-interface: %v\", err)\n\t\t}","sourceCodeStart":2396,"sourceCodeEnd":2432,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/command/agent/config.go#L2396-L2432","documentation":"During normalization, AdvertiseAddrs.RPC is validated with normalizeAdvertise against the RPC bind address and Ports.RPC. If the RPC advertise address cannot be parsed or validated (bad host, unresolvable name, invalid host:port), the agent refuses to start with this error.","triggerScenarios":"advertise_addrs.rpc containing a hostname that fails to resolve, a malformed IP, an invalid port portion, or an empty value combined with an invalid bind fallback.","commonSituations":"Advertise address pointing at an IP not assigned to the node; copy-pasting values with trailing slashes or whitespace; port outside the allowed range; stale configs after node IP changes.","solutions":["Set advertise_addrs.rpc to a valid host:port bound to this node","Verify DNS resolution of the advertised name (dig/getent)","Confirm the IP exists on the machine (ip addr)","Remove any scheme or stray characters from the value"],"exampleFix":"// before\nadvertise_addrs { rpc = \"10.0.0.99:8300\" } # IP not on this node\n// after\nadvertise_addrs { rpc = \"10.0.0.5:8300\" }","handlingStrategy":"validation","validationCode":"host, port, err := net.SplitHostPort(cfg.AdvertiseAddrs.RPC)\nif err != nil { /* malformed */ }\nif net.ParseIP(host) == nil {\n\tif _, err := net.LookupHost(host); err != nil { /* unresolvable */ }\n}\n_, err = strconv.Atoi(port)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Confirm the advertised IP is actually assigned to the node","Re-check advertise config after instance IP changes","Keep advertise values machine-generated from node metadata"],"tags":["config","network","advertise-address"],"backgroundTag":"invalid-advertise-address","analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}