XTLS/Xray-core · error

failed to find an available destination

Error message

failed to find an available destination

What it means

Error "failed to find an available destination" thrown in XTLS/Xray-core.

Source

Thrown at proxy/shadowsocks/client.go:74

	destination := ob.Target
	network := destination.Network

	server := c.server
	dest := server.Destination
	dest.Network = network
	var conn stat.Connection

	err := retry.ExponentialBackoff(5, 100).On(func() error {
		rawConn, err := dialer.Dial(ctx, dest)
		if err != nil {
			return err
		}
		conn = rawConn

		return nil
	})
	if err != nil {
		return errors.New("failed to find an available destination").AtWarning().Base(err)
	}
	errors.LogInfo(ctx, "tunneling request to ", destination, " via ", network, ":", server.Destination.NetAddr())

	defer conn.Close()

	request := &protocol.RequestHeader{
		Version: Version,
		Address: destination.Address,
		Port:    destination.Port,
	}
	if destination.Network == net.Network_TCP {
		request.Command = protocol.RequestCommandTCP
	} else {
		request.Command = protocol.RequestCommandUDP
	}

	user := server.User
	_, ok := user.Account.(*MemoryAccount)

View on GitHub (pinned to 7d214f8b09)

When it happens

Trigger: Thrown at proxy/shadowsocks/client.go:74 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of XTLS/Xray-core@7d214f8b09 (2026-08-15). Data as JSON: /api/errors/b056e3eeb58b25b1. Report an issue: GitHub.