{"record":{"id":"6b0d0c199cefddbf","repo":"cloudflare/cloudflared","slug":"invalid-s-provided-w","errorCode":null,"errorMessage":"invalid %s provided: %w","messagePattern":"invalid (.+?) provided: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/cloudflared/tunnel/configuration.go","lineNumber":220,"sourceCode":"\t\tresolvedRegion = endpoint\n\t}\n\n\twarpRoutingConfig := ingress.NewWarpRoutingConfig(&cfg.WarpRouting)\n\n\t// Setup origin dialer service and virtual services\n\toriginDialerService := ingress.NewOriginDialer(ingress.OriginConfig{\n\t\tDefaultDialer:   ingress.NewDialer(warpRoutingConfig),\n\t\tTCPWriteTimeout: c.Duration(flags.WriteStreamTimeout),\n\t}, log)\n\n\t// Setup DNS Resolver Service\n\toriginMetrics := origins.NewMetrics(prometheus.DefaultRegisterer)\n\tdnsResolverAddrs := c.StringSlice(flags.VirtualDNSServiceResolverAddresses)\n\tdnsService := origins.NewDNSResolverService(origins.NewDNSDialer(), log, originMetrics)\n\tif len(dnsResolverAddrs) > 0 {\n\t\taddrs, err := parseResolverAddrPorts(dnsResolverAddrs)\n\t\tif err != nil {\n\t\t\treturn nil, nil, fmt.Errorf(\"invalid %s provided: %w\", flags.VirtualDNSServiceResolverAddresses, err)\n\t\t}\n\t\tdnsService = origins.NewStaticDNSResolverService(addrs, origins.NewDNSDialer(), log, originMetrics)\n\t}\n\toriginDialerService.AddReservedService(dnsService, []netip.AddrPort{origins.VirtualDNSServiceAddr})\n\n\ttunnelConfig := &supervisor.TunnelConfig{\n\t\tClientConfig:    clientConfig,\n\t\tGracePeriod:     gracePeriod,\n\t\tEdgeAddrs:       c.StringSlice(flags.Edge),\n\t\tRegion:          resolvedRegion,\n\t\tEdgeIPVersion:   edgeIPVersion,\n\t\tEdgeBindAddr:    edgeBindAddr,\n\t\tHAConnections:   c.Int(flags.HaConnections),\n\t\tIsAutoupdated:   c.Bool(flags.IsAutoUpdated),\n\t\tLBPool:          c.String(flags.LBPool),\n\t\tTags:            tags,\n\t\tLog:             log,\n\t\tLogTransport:    logTransport,","sourceCodeStart":202,"sourceCodeEnd":238,"githubUrl":"https://github.com/cloudflare/cloudflared/blob/2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f/cmd/cloudflared/tunnel/configuration.go#L202-L238","documentation":"The `--virtual-dns-service-resolver-addresses` flag accepts a list of resolver addresses; parseResolverAddrPorts validates each as a valid addr:port. Any malformed entry aborts startup, wrapping the parse error in this message with the flag name.","triggerScenarios":"Passing `--virtual-dns-service-resolver-addresses` entries that are not valid `ip:port` values (missing port, bad IP, extra characters, hostnames instead of IPs).","commonSituations":"Users specifying DNS hostnames (e.g. 1.1.1.1:53 vs dns.example.com:53), forgetting the port, or using comma-separated values where the flag expects repeated/slice syntax.","solutions":["Provide each entry as a literal IP with port, e.g. `1.1.1.1:53` or `[2606:4700:4700::1111]:53`.","Repeat the flag once per address instead of comma-joining if your shell/config splits incorrectly.","Remove the flag entirely to use the default DNS resolver service dialer."],"exampleFix":"// before\nvirtual-dns-service-resolver-addresses: [\"one.one.one.one:53\"]\n// after\nvirtual-dns-service-resolver-addresses: [\"1.1.1.1:53\"]","handlingStrategy":"validation","validationCode":"// shell: pre-validate each resolver addr:port\nfor a in $RESOLVER_ADDRS; do\n  host=\"${a%:*}\"; port=\"${a##*:}\"\n  [[ \"$host\" =~ ^[0-9.]+$ || \"$host\" == *:* ]] && [[ \"$port\" =~ ^[0-9]+$ ]] || { echo \"bad resolver $a\"; exit 1; }\ndone","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use literal IPs with explicit ports; no hostnames.","Prefer netip.ParseAddrPort semantics: ip:port or [v6]:port.","Test the flag in a dry run before rolling to production units."],"tags":["configuration","dns","cli"],"backgroundTag":"invalid-argument-format","analyzedSha":"2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f","analyzedAt":"2026-09-06T04:14:33.757Z","contentChangedAt":"2026-09-06T04:14:33.757Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}