nexodus-io / nexodus

Network Connectivity as a Service
https://nexodus.io
Apache License 2.0
61 stars 26 forks source link

Improve logs to show if the destination endpoint is not reachable through relay #1954

Open vishnoianil opened 7 months ago

vishnoianil commented 7 months ago

Describe the bug

If the destination endpoint is not connected to the derp server, source endpoint failed to establish the end to end connection and throws the following error logs which is not very helpful to deduce that endpoint is not connected to the relay.

Mar 05 09:48:44 rbryant-lab sh[131295]: 2024-03-05T09:48:44.224-0500        DEBUG        nexodus/derp.go:177        DERP lookup of 127.0.0.1:900 with no private key; ignoring
Mar 02 20:11:52 rbryant-lab sh[2260]: {"level":"error","ts":"2024-03-02T20:11:52.000-0500","caller":"nexodus/wg_derp_proxy.go:150","msg":"Error getting derp write channel for addr 127.0.0.1:900"}

How to Reproduce

Connect two machine to nexodus using --relay-only option and than disconnect the second machine.

Expected Behavior

A source nexd agent should log a helpful message that indicate that the destination peer is not connected to derp or not reachable.

Deployment Environment

No response

Additional Context

No response