{"record":{"id":"6cb4475632ed4924","repo":"hashicorp/nomad","slug":"failed-to-parse-rpc-address-v","errorCode":null,"errorMessage":"Failed to parse RPC address: %v","messagePattern":"Failed to parse RPC address: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"command/agent/config.go","lineNumber":2387,"sourceCode":"func (c *Config) normalizeAddrs() error {\n\tif c.BindAddr != \"\" {\n\t\tipStr, err := listenerutil.ParseSingleIPTemplate(c.BindAddr)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Bind address resolution failed: %v\", err)\n\t\t}\n\t\tc.BindAddr = ipStr\n\t}\n\tc.BindAddr = ipaddr.NormalizeAddr(c.BindAddr)\n\n\thttpAddrs, err := normalizeMultipleBind(c.Addresses.HTTP, c.BindAddr)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Failed to parse HTTP address: %v\", err)\n\t}\n\tc.Addresses.HTTP = strings.Join(httpAddrs, \" \")\n\n\taddr, err := normalizeBind(c.Addresses.RPC, c.BindAddr)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Failed to parse RPC address: %v\", err)\n\t}\n\tc.Addresses.RPC = addr\n\n\taddr, err = normalizeBind(c.Addresses.Serf, c.BindAddr)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Failed to parse Serf address: %v\", err)\n\t}\n\tc.Addresses.Serf = addr\n\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","sourceCodeStart":2369,"sourceCodeEnd":2405,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/command/agent/config.go#L2369-L2405","documentation":"During config normalization, Addresses.RPC is passed through normalizeBind together with BindAddr. If the RPC bind address cannot be parsed into a valid IP (invalid literal, bad template output), the agent aborts startup with this error. The wrapped %v carries the root cause from the address parser.","triggerScenarios":"Configuring addresses.rpc to an unparseable value: malformed IP, a go-sockaddr/template expression that errors, or an empty value where BindAddr itself is also invalid.","commonSituations":"Copy-pasting an advertise-style 'host:port' into addresses.rpc (port not allowed here); template referencing a nonexistent network interface; IPv6 literal missing brackets or zone.","solutions":["Fix addresses.rpc to a bare valid IP or a working interface template","Remove any port suffix from the address (ports belong in ports.rpc)","Verify the referenced interface exists (ip link / ifconfig)","Read the wrapped error detail to identify the exact parse failure"],"exampleFix":"// before\naddresses { rpc = \"10.0.0.5:8300\" } // port not allowed\n// after\naddresses { rpc = \"10.0.0.5\" }\nports { rpc = 8300 }","handlingStrategy":"validation","validationCode":"func validBindAddr(v string) bool {\n\tif v == \"\" { return true }\n\treturn net.ParseIP(v) != nil && !strings.Contains(v, \":8\") || net.ParseIP(v) != nil\n}\n// ensure net.ParseIP(cfg.Addresses.RPC) != nil before deploy","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never put host:port in addresses.rpc; ports belong in ports block","Prefer omitting the field to inherit bind","Validate config with `consul validate` before restart"],"tags":["config","network","bind-address"],"backgroundTag":"invalid-bind-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"}