{"record":{"id":"b056e3eeb58b25b1","repo":"XTLS/Xray-core","slug":"failed-to-find-an-available-destination-b056e3","errorCode":null,"errorMessage":"failed to find an available destination","messagePattern":"failed to find an available destination","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"proxy/shadowsocks/client.go","lineNumber":74,"sourceCode":"\tdestination := ob.Target\n\tnetwork := destination.Network\n\n\tserver := c.server\n\tdest := server.Destination\n\tdest.Network = network\n\tvar conn stat.Connection\n\n\terr := retry.ExponentialBackoff(5, 100).On(func() error {\n\t\trawConn, err := dialer.Dial(ctx, dest)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tconn = rawConn\n\n\t\treturn nil\n\t})\n\tif err != nil {\n\t\treturn errors.New(\"failed to find an available destination\").AtWarning().Base(err)\n\t}\n\terrors.LogInfo(ctx, \"tunneling request to \", destination, \" via \", network, \":\", server.Destination.NetAddr())\n\n\tdefer conn.Close()\n\n\trequest := &protocol.RequestHeader{\n\t\tVersion: Version,\n\t\tAddress: destination.Address,\n\t\tPort:    destination.Port,\n\t}\n\tif destination.Network == net.Network_TCP {\n\t\trequest.Command = protocol.RequestCommandTCP\n\t} else {\n\t\trequest.Command = protocol.RequestCommandUDP\n\t}\n\n\tuser := server.User\n\t_, ok := user.Account.(*MemoryAccount)","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/XTLS/Xray-core/blob/7d214f8b094f75322fa3990f8aadad1c912f24f5/proxy/shadowsocks/client.go#L56-L92","documentation":"Error \"failed to find an available destination\" thrown in XTLS/Xray-core.","triggerScenarios":"Thrown at proxy/shadowsocks/client.go:74 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d214f8b094f75322fa3990f8aadad1c912f24f5","analyzedAt":"2026-08-15T14:26:24.325Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}