{"record":{"id":"29fa4d083578fb09","repo":"hashicorp/nomad","slug":"client-rpc-advertise-address-is-not-advertisable","errorCode":null,"errorMessage":"Client RPC advertise address is not advertisable: %v","messagePattern":"Client RPC advertise address is not advertisable: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/server.go","lineNumber":1232,"sourceCode":"\t\tlistener.Close()\n\t\treturn err\n\t}\n\n\tif s.config.ClientRPCAdvertise != nil {\n\t\ts.clientRpcAdvertise = s.config.ClientRPCAdvertise\n\t} else {\n\t\ts.clientRpcAdvertise = s.rpcListener.Addr()\n\t}\n\n\t// Verify that we have a usable advertise address\n\tclientAddr, ok := s.clientRpcAdvertise.(*net.TCPAddr)\n\tif !ok {\n\t\tlistener.Close()\n\t\treturn fmt.Errorf(\"Client RPC advertise address is not a TCP Address: %v\", clientAddr)\n\t}\n\tif clientAddr.IP.IsUnspecified() {\n\t\tlistener.Close()\n\t\treturn fmt.Errorf(\"Client RPC advertise address is not advertisable: %v\", clientAddr)\n\t}\n\n\tif s.config.ServerRPCAdvertise != nil {\n\t\ts.serverRpcAdvertise = s.config.ServerRPCAdvertise\n\t} else {\n\t\t// Default to the Serf Advertise + RPC Port\n\t\tserfIP := s.config.SerfConfig.MemberlistConfig.AdvertiseAddr\n\t\tif serfIP == \"\" {\n\t\t\tserfIP = s.config.SerfConfig.MemberlistConfig.BindAddr\n\t\t}\n\n\t\taddr := net.JoinHostPort(serfIP, fmt.Sprintf(\"%d\", clientAddr.Port))\n\t\tresolved, err := net.ResolveTCPAddr(\"tcp\", addr)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Failed to resolve Server RPC advertise address: %v\", err)\n\t\t}\n\n\t\ts.serverRpcAdvertise = resolved","sourceCodeStart":1214,"sourceCodeEnd":1250,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/server.go#L1214-L1250","documentation":"Nomad server startup validates that the resolved Client RPC advertise address is usable. After checking that the address is a *net.TCPAddr, it rejects addresses whose IP is unspecified (0.0.0.0 or ::) because agents cannot advertise an any-address to clients that need to dial back to the server.","triggerScenarios":"setupRPC() is called during server startup with s.config.ClientRPCAdvertise (or the derived clientAddr) pointing at an IP that IsUnspecified(), e.g. advertise { http = \"0.0.0.0\" } or a bind/advertise address of \"::\".","commonSituations":"Operator sets client RPC advertise to 0.0.0.0 in the config instead of a specific interface IP; running in a container where the advertise address defaults to the unspecified address; copying bind_addr values into advertise fields.","solutions":["Set client_rpc advertise address in the server config to a specific routable IP (e.g. \"192.168.1.10\") instead of 0.0.0.0/::","If advertise was derived from Serf/memberlist config, set an explicit advertise_addr rather than leaving bind_addr as 0.0.0.0","Verify with `nomad agent -server -config ...` output or `ip addr` which interface IP the node should advertise"],"exampleFix":"// before (server.hcl)\nadvertise {\n  rpc = \"0.0.0.0\"\n}\n// after\nadvertise {\n  rpc = \"10.0.2.15\"\n}","handlingStrategy":"validation","validationCode":"ip := net.ParseIP(advertiseRPC)\nif ip == nil || ip.IsUnspecified() {\n    return fmt.Errorf(\"advertise rpc must be a specific IP, got %q\", advertiseRPC)\n}","typeGuard":"func isSpecificTCPAddr(a net.Addr) bool {\n    ta, ok := a.(*net.TCPAddr)\n    return ok && !ta.IP.IsUnspecified()\n}","tryCatchPattern":"if err := server.SetupRPC(listener); err != nil {\n    if strings.Contains(err.Error(), \"not advertisable\") {\n        logger.Error(\"fix advertise address in config\", \"err\", err)\n    }\n    return err\n}","preventionTips":["Always set an explicit routable advertise address in server config","Never use 0.0.0.0/:: in advertise blocks","Validate config with a linter or `nomad agent -config ... -verify-only` if available before launch"],"tags":["network","configuration","startup","nomad"],"backgroundTag":"unspecified-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"}