netbird icon indicating copy to clipboard operation
netbird copied to clipboard

Routes not being created

Open Icare-github opened this issue 1 year ago • 18 comments

Describe the problem

Once connected, routes aren't being created on workstation to different environments.

Expected behavior

All routes created, once connected.

NetBird version

Netbird v0.27.4

vpn-2.netbird.selfhosted: NetBird IP: [redacted] Public key: [redacted] Status: Connected -- detail -- Connection type: P2P Direct: true ICE candidate (Local/Remote): srflx/srflx ICE candidate endpoints (Local/Remote): [redacted] Last connection update: 2 minutes, 12 seconds ago Last WireGuard handshake: 7 seconds ago Transfer status (received/sent) 216 B/520 B Quantum resistance: false Routes: - Latency: 20.7595ms

vpn-3.netbird.selfhosted: NetBird IP: [redacted] Public key: [redacted] Status: Connected -- detail -- Connection type: P2P Direct: true ICE candidate (Local/Remote): srflx/srflx ICE candidate endpoints (Local/Remote): [redacted] Last connection update: 2 minutes, 12 seconds ago Last WireGuard handshake: 2 seconds ago Transfer status (received/sent) 364 B/760 B Quantum resistance: false Routes: - Latency: 26.5064ms

vpn-1.netbird.selfhosted: NetBird IP: [redacted] Public key: [redacted] Status: Connected -- detail -- Connection type: P2P Direct: true ICE candidate (Local/Remote): srflx/srflx ICE candidate endpoints (Local/Remote): [redacted] Last connection update: 2 minutes, 12 seconds ago Last WireGuard handshake: 7 seconds ago Transfer status (received/sent) 216 B/520 B Quantum resistance: false Routes: - Latency: 25.9289ms

OS: windows/amd64 Daemon version: 0.27.4 CLI version: 0.27.4 Management: Connected to https://[redacted] Signal: Connected to https://[redacted] Relays: [stun:[redacted]:3478] is Available [turn:[redacted]:3478?transport=udp] is Available Nameservers: [9.9.9.9:53, 149.112.112.112:53] for [.] is Available [10.0.0.2:53] for [test.internal] is Unavailable, reason: 1 error occurred: * read udp 192.168.0.132:52965->10.0.0.2:53: i/o timeout [10.0.10.2:53] for [acc.internal] is Unavailable, reason: 1 error occurred: * read udp 192.168.0.132:52966->10.0.10.2:53: i/o timeout [10.0.30.2:53] for [eu.prod.internal] is Unavailable, reason: 1 error occurred: * read udp 192.168.0.132:52963->10.0.30.2:53: i/o timeout FQDN: prec55404.netbird.selfhosted NetBird IP: [redacted] Interface type: Userspace Quantum resistance: false Routes: - Peers count: 3/3 Connected

Screenshots

Client.log

2024-05-06T09:28:56+02:00 ERRO client/internal/routemanager/systemops.go:385: Failed to add route reference: adding route reference: failed to add route for prefix [redacted]: add route to table: route add: exec: "route": cannot run executable found relative to current directory 2024-05-06T09:28:56+02:00 ERRO client/internal/routemanager/systemops.go:385: Failed to add route reference: adding route reference: failed to add route for prefix [redacted]: add route to table: route add: exec: "route": cannot run executable found relative to current directory

Icare-github avatar May 07 '24 13:05 Icare-github

FYI - working correctly in 0.27.3

Icare-github avatar May 07 '24 13:05 Icare-github

Please share your windows + patch version.

It's very unusual that route is missing or not the in the PATH env var. Can you check if it exists in your system, and/or PATH is set correctly?

E.g. https://www.computerhope.com/issues/ch000549.htm

lixmal avatar May 07 '24 14:05 lixmal

Route cmd is not missing. Route can be executed in cmd.

OS Windows OS name Microsoft Windows 11 Pro (x64) OS version 10.0.22631 OS full version Version 23H2 (OS Build 22631.3447) Service pack N/A Build version 22631

Icare-github avatar May 07 '24 14:05 Icare-github

Same 0.27.4 - issues with routes 0.27.3 - working windows.

myevit avatar May 07 '24 15:05 myevit

@myevit @Icare-github does the route command work on both cmd and powershell?

Is there any customization with the system about its default shell?

mlsmaycon avatar May 07 '24 15:05 mlsmaycon

@myevit @Icare-github does the route command work on both cmd and powershell?

Is there any customization with the system about its default shell?

route command works in cmd and pwsh No customizations. Just rolled back to 0.7.3 and all working as intended. I can speculate: I have multiple routes that are using same name. Could be bug there?

myevit avatar May 07 '24 15:05 myevit

https://github.com/netbirdio/netbird/issues/1925 possible the same issue

myevit avatar May 07 '24 15:05 myevit

The issue on #1925 is a different one.

@myevit can you share your logs too? https://docs.netbird.io/how-to/troubleshooting-client#getting-client-logs

If you didn't clean the logs, you can just copy the current file, as it will contain errors from the 0.27.4 version.

mlsmaycon avatar May 07 '24 16:05 mlsmaycon

here are logs from 0.27.4 and 0.27.4

0.7.3.log 0 7 3 0.7.4.log 0 7 4

  • I have deleted .log file before each install. P.S. my setup is self hosted

myevit avatar May 07 '24 19:05 myevit

I think you should do route print to get more useful info for this ticket. Just route gives just a manual of the command.

karstennilsen avatar May 08 '24 05:05 karstennilsen

"route" command is working in cmd and powershell. No custimization. nb1 nb2

Icare-github avatar May 08 '24 08:05 Icare-github

Hello @Icare-github @myevit can you please test a development version from PR #1946?

To do that you need to download the artifact https://github.com/netbirdio/netbird/actions/runs/8999323479/artifacts/1483471589, then you need to stop the netbird service, extract the artifact and move the file into the C:\Program Files\NetBird path.

Here is how you stop the service using an elevated PowerShell:

netbird service stop
# after copying the file
netbird service start

Just a heads up, the binary is not signed and the machine's antivirus might complain.

Please share the logs after running the client as well. It will print the PATH value our agent is getting from these nodes.

mlsmaycon avatar May 08 '24 12:05 mlsmaycon

I think you should do route print to get more useful info for this ticket. Just route gives just a manual of the command.

My point was that route command is working. Just that.

myevit avatar May 08 '24 12:05 myevit

Hello @Icare-github @myevit can you please test a development version from PR #1946?

To do that you need to download the artifact https://github.com/netbirdio/netbird/actions/runs/8999323479/artifacts/1483471589, then you need to stop the netbird service, extract the artifact and move the file into the C:\Program Files\NetBird path.

Here is how you stop the service using an elevated PowerShell:

netbird service stop
# after copying the file
netbird service start

Just a heads up, the binary is not signed and the machine's antivirus might complain.

Please share the logs after running the client as well. It will print the PATH value our agent is getting from these nodes.

Yep. That fix is working for me. So far no issues. All running as expected.

myevit avatar May 08 '24 17:05 myevit

@myevit thanks for confirming. Could you please share the logs from your peer too?

mlsmaycon avatar May 08 '24 17:05 mlsmaycon

client.log here is the logs from PR

myevit avatar May 08 '24 17:05 myevit

Thanks for sharing the logs @myevit we found another issue with the paths and added a fix.

We should have a release with the fix this week.

mlsmaycon avatar May 08 '24 18:05 mlsmaycon

@myevit I have a new version with better path handling. Can you run the last test? https://github.com/netbirdio/netbird/actions/runs/9006903302/artifacts/1485301075

mlsmaycon avatar May 09 '24 09:05 mlsmaycon