{"record":{"id":"7882e4276db76f7a","repo":"XTLS/Xray-core","slug":"cannot-dial-remote-address","errorCode":null,"errorMessage":"cannot dial remote address ","messagePattern":"cannot dial remote address ","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/geodata/download.go","lineNumber":79,"sourceCode":"\t\thttpClient:  newClient(ctx, dispatcher, outbound, false),\n\t\thttpsClient: newClient(ctx, dispatcher, outbound, true),\n\t}\n}\n\nfunc newClient(baseCtx context.Context, dispatcher routing.Dispatcher, outbound string, isHTTPS bool) *http.Client {\n\tdial := func(ctx context.Context, network, address string) (net.Conn, error) {\n\t\tvar conn net.Conn\n\t\terr := task.Run(ctx, func() error {\n\t\t\tif tagged.Dialer == nil {\n\t\t\t\treturn errors.New(\"tagged dialer is not initialized\")\n\t\t\t}\n\t\t\tdest, err := net.ParseDestination(network + \":\" + address)\n\t\t\tif err != nil {\n\t\t\t\treturn errors.New(\"cannot understand address\").Base(err)\n\t\t\t}\n\t\t\tc, err := tagged.Dialer(baseCtx, dispatcher, dest, outbound)\n\t\t\tif err != nil {\n\t\t\t\treturn errors.New(\"cannot dial remote address \", dest).Base(err)\n\t\t\t}\n\t\t\tconn = c\n\t\t\treturn nil\n\t\t})\n\t\tif err != nil {\n\t\t\treturn nil, errors.New(\"cannot finish connection\").Base(err)\n\t\t}\n\t\treturn &idleConn{\n\t\t\tConn: conn,\n\t\t}, nil\n\t}\n\tif isHTTPS {\n\t\treturn &http.Client{\n\t\t\tTransport: &http2.Transport{\n\t\t\t\tDialTLSContext: func(ctx context.Context, network string, address string, cfg *tls.Config) (net.Conn, error) {\n\t\t\t\t\tconn, err := dial(ctx, network, address)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, err","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/app/geodata/download.go#L61-L97","documentation":"The tagged.Dialer callback failed to establish the connection to the parsed destination through the routing dispatcher using the configured outbound tag. The message appends the destination and chains the real dial failure (connect refused, DNS failure, outbound missing, etc.) via .Base(err).","triggerScenarios":"tagged.Dialer(baseCtx, dispatcher, dest, outbound) returning an error: the outbound named by the geodata config's Outbound tag does not exist, the proxy is down, or the dispatcher rejected the routing.","commonSituations":"geodata.outboundTag points to a proxy tag that was removed from the outbounds list; the selected proxy server is unreachable; routing rules route the geodata traffic to a blackhole; DNS resolution of the mirror host fails through the proxy.","solutions":["Read the chained Base error — it names the real cause (unknown outbound tag vs connect refused vs DNS)","Make sure the outbound tag configured for geodata download exists among the configured outbounds","Test the same proxy with curl through Xray to confirm the outbound can reach the geodata mirror","Temporarily remove the geodata outbound tag so the downloader uses the default dispatcher path"],"exampleFix":"// xray config: ensure the outbound referenced by geodata exists\n// before (broken):\n\"geodata\": { \"outboundTag\": \"warp\" } // no outbound named warp\n// after:\n\"outbounds\": [ { \"tag\": \"warp\", \"protocol\": \"vless\", ... } ],\n\"geodata\": { \"outboundTag\": \"warp\" }","handlingStrategy":"retry","validationCode":"// Verify the outbound tag exists in config before enabling geodata updates:\nfunc outboundExists(cfg *core.Config, tag string) bool {\n    for _, o := range cfg.Outbound {\n        if o.Tag == tag { return true }\n    }\n    return false\n}","typeGuard":null,"tryCatchPattern":"err = d.download(assets)\nif err != nil {\n    if e, ok := err.(*errors.Error); ok && strings.HasPrefix(e.Message(), \"cannot dial remote address\") {\n        // outbound-level failure: fall back to default dispatcher or next mirror\n    }\n}","preventionTips":["Keep the geodata outboundTag in sync with the outbounds list during config edits","Health-check the designated proxy before scheduled geodata updates","Have a fallback asset URL on a different host"],"tags":["network","geodata","outbound","proxy","download"],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}