Error when disconnecting Windows Client followed by not being able to reconnect until reboot #1348

Closed
opened 2025-11-20 05:28:47 -05:00 by saavagebueno · 11 comments
Owner

Originally created by @v1rusnl on GitHub (Oct 17, 2024).

Describe the problem

Error when disconnecting Windows Client followed by not being able to reconnect until a system reboot
System:
image

To Reproduce

Steps to reproduce the behavior:

  1. Go to Netbird UI Tray Icon and
  2. Click on disconnect
  3. The following error appears:
    image
  4. Try to reconnect
  5. Above error appears again and no connection is possible.
  6. Restarting service and UI.
  7. The following error appears:
    image

Expected behavior

You disconnect without error and can reconnect at any time later without errors.

Are you using NetBird Cloud?

Self-host

NetBird version

0.30.2, but issue is present since 0.30.0 (the version I started uing Netbird).

NetBird status -dA output:

Error: failed to connect to daemon error: context deadline exceeded
If the daemon is not running please run:
netbird service install
netbird service start

But Service is running:
image

Do you face any (non-mobile) client issues?

Error: failed to connect to daemon error: context deadline exceeded
If the daemon is not running please run:
netbird service install
netbird service start

Screenshots

see above

Additional context

If I boot PC, averything is running smoothly including Netbird properly connected over P2P with the other peers. Above issue only occurs when Netbird connection is lost or manually disconnected, until I reboot.

Debug log when restarting service:

"netbird.exe" (Win32): "C:\Program Files\Netbird\netbird.exe" geladen. Das Modul wurde ohne Symbole erstellt.
"netbird.exe" (Win32): "C:\Windows\System32\ntdll.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\kernel32.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\KernelBase.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\bcryptprimitives.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\powrprof.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\ucrtbase.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\rpcrt4.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\umpdc.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\ws2_32.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\advapi32.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\msvcrt.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\sechost.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\bcrypt.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\mswsock.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\IPHLPAPI.DLL" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\nsi.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\dhcpcsvc6.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\dhcpcsvc.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\dnsapi.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\rasadhlp.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\FWPUCLNT.DLL" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\crypt32.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\msasn1.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\cryptsp.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\rsaenh.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\cryptbase.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\gpapi.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\ole32.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\msvcp_win.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\gdi32.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\win32u.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\gdi32full.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\user32.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\combase.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\kernel.appcore.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\clbcatq.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\oleaut32.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\sxs.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\amsi.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\userenv.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\profapi.dll" geladen. 
"netbird.exe" (Win32): "C:\ProgramData\Microsoft\Windows Defender\Platform\4.18.24080.9-0\MpOAV.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\version.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\setupapi.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\devobj.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\cfgmgr32.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\wintrust.dll" geladen. 
"netbird.exe" (Win32): "C:\Program Files\Netbird\wintun.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\devrtl.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\drvstore.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\spinf.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\nci.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\NetSetupApi.dll" geladen. 
"netbird.exe" (Win32): "C:\Windows\System32\winnsi.dll" geladen. 
Der Thread 6220 hat mit Code 0 (0x0) geendet.
Der Thread 19328 hat mit Code 0 (0x0) geendet.
Der Thread 9284 hat mit Code 0 (0x0) geendet.
Der Thread 8884 hat mit Code 0 (0x0) geendet.
Der Thread 6988 hat mit Code 0 (0x0) geendet.
Der Thread 21352 hat mit Code 0 (0x0) geendet.
Der Thread 4628 hat mit Code 0 (0x0) geendet.
Der Thread 7112 hat mit Code 0 (0x0) geendet.
Der Thread 20744 hat mit Code 0 (0x0) geendet.
Der Thread 2360 hat mit Code 0 (0x0) geendet.
Der Thread 17656 hat mit Code 0 (0x0) geendet.
Der Thread 940 hat mit Code 0 (0x0) geendet.
Der Thread 18484 hat mit Code 0 (0x0) geendet.
Der Thread 12208 hat mit Code 0 (0x0) geendet.
Der Thread 11912 hat mit Code 0 (0x0) geendet.
Der Thread 3580 hat mit Code 0 (0x0) geendet.
Der Thread 12672 hat mit Code 0 (0x0) geendet.
Der Thread 15424 hat mit Code 0 (0x0) geendet.
Der Thread 15532 hat mit Code 0 (0x0) geendet.
Der Thread 14020 hat mit Code 0 (0x0) geendet.
Der Thread 6212 hat mit Code 0 (0x0) geendet.
Der Thread 5452 hat mit Code 0 (0x0) geendet.
Der Thread 19420 hat mit Code 0 (0x0) geendet.
Der Thread 7084 hat mit Code 0 (0x0) geendet.
Der Thread 11508 hat mit Code 0 (0x0) geendet.
Der Thread 15720 hat mit Code 0 (0x0) geendet.
Der Thread 10152 hat mit Code 0 (0x0) geendet.
Der Thread 5380 hat mit Code 0 (0x0) geendet.
Der Thread 15540 hat mit Code 0 (0x0) geendet.
Der Thread 2372 hat mit Code 0 (0x0) geendet.
Der Thread 10516 hat mit Code 0 (0x0) geendet.
Der Thread 8784 hat mit Code 0 (0x0) geendet.
Der Thread 828 hat mit Code 0 (0x0) geendet.
Das Programm "[13208] netbird.exe" wurde mit Code 0 (0x0) beendet.

Originally created by @v1rusnl on GitHub (Oct 17, 2024). **Describe the problem** Error when disconnecting Windows Client followed by not being able to reconnect until a system reboot System: ![image](https://github.com/user-attachments/assets/61f0e7da-eb36-4a3d-8a32-9eca6dcb6e93) **To Reproduce** Steps to reproduce the behavior: 1. Go to Netbird UI Tray Icon and 2. Click on disconnect 3. The following error appears: ![image](https://github.com/user-attachments/assets/babc6b52-a114-4600-95ec-5b2a8116fef0) 4. Try to reconnect 5. Above error appears again and no connection is possible. 6. Restarting service and UI. 7. The following error appears: ![image](https://github.com/user-attachments/assets/d1f8a52e-4fcf-48f8-a8a5-a3c5001ceac3) **Expected behavior** You disconnect without error and can reconnect at any time later without errors. **Are you using NetBird Cloud?** Self-host **NetBird version** 0.30.2, but issue is present since 0.30.0 (the version I started uing Netbird). **NetBird status -dA output:** ```powershell Error: failed to connect to daemon error: context deadline exceeded If the daemon is not running please run: netbird service install netbird service start ``` But Service is running: ![image](https://github.com/user-attachments/assets/9b5f6be3-a0c0-4032-ae39-84380a277e3d) **Do you face any (non-mobile) client issues?** ```powershell Error: failed to connect to daemon error: context deadline exceeded If the daemon is not running please run: netbird service install netbird service start ``` **Screenshots** see above **Additional context** If I boot PC, averything is running smoothly including Netbird properly connected over P2P with the other peers. Above issue only occurs when Netbird connection is lost or manually disconnected, until I reboot. Debug log when restarting service: ``` "netbird.exe" (Win32): "C:\Program Files\Netbird\netbird.exe" geladen. Das Modul wurde ohne Symbole erstellt. "netbird.exe" (Win32): "C:\Windows\System32\ntdll.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\kernel32.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\KernelBase.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\bcryptprimitives.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\powrprof.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\ucrtbase.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\rpcrt4.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\umpdc.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\ws2_32.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\advapi32.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\msvcrt.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\sechost.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\bcrypt.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\mswsock.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\IPHLPAPI.DLL" geladen. "netbird.exe" (Win32): "C:\Windows\System32\nsi.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\dhcpcsvc6.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\dhcpcsvc.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\dnsapi.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\rasadhlp.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\FWPUCLNT.DLL" geladen. "netbird.exe" (Win32): "C:\Windows\System32\crypt32.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\msasn1.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\cryptsp.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\rsaenh.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\cryptbase.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\gpapi.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\ole32.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\msvcp_win.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\gdi32.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\win32u.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\gdi32full.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\user32.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\combase.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\kernel.appcore.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\clbcatq.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\oleaut32.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\sxs.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\amsi.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\userenv.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\profapi.dll" geladen. "netbird.exe" (Win32): "C:\ProgramData\Microsoft\Windows Defender\Platform\4.18.24080.9-0\MpOAV.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\version.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\setupapi.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\devobj.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\cfgmgr32.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\wintrust.dll" geladen. "netbird.exe" (Win32): "C:\Program Files\Netbird\wintun.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\devrtl.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\drvstore.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\spinf.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\nci.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\NetSetupApi.dll" geladen. "netbird.exe" (Win32): "C:\Windows\System32\winnsi.dll" geladen. Der Thread 6220 hat mit Code 0 (0x0) geendet. Der Thread 19328 hat mit Code 0 (0x0) geendet. Der Thread 9284 hat mit Code 0 (0x0) geendet. Der Thread 8884 hat mit Code 0 (0x0) geendet. Der Thread 6988 hat mit Code 0 (0x0) geendet. Der Thread 21352 hat mit Code 0 (0x0) geendet. Der Thread 4628 hat mit Code 0 (0x0) geendet. Der Thread 7112 hat mit Code 0 (0x0) geendet. Der Thread 20744 hat mit Code 0 (0x0) geendet. Der Thread 2360 hat mit Code 0 (0x0) geendet. Der Thread 17656 hat mit Code 0 (0x0) geendet. Der Thread 940 hat mit Code 0 (0x0) geendet. Der Thread 18484 hat mit Code 0 (0x0) geendet. Der Thread 12208 hat mit Code 0 (0x0) geendet. Der Thread 11912 hat mit Code 0 (0x0) geendet. Der Thread 3580 hat mit Code 0 (0x0) geendet. Der Thread 12672 hat mit Code 0 (0x0) geendet. Der Thread 15424 hat mit Code 0 (0x0) geendet. Der Thread 15532 hat mit Code 0 (0x0) geendet. Der Thread 14020 hat mit Code 0 (0x0) geendet. Der Thread 6212 hat mit Code 0 (0x0) geendet. Der Thread 5452 hat mit Code 0 (0x0) geendet. Der Thread 19420 hat mit Code 0 (0x0) geendet. Der Thread 7084 hat mit Code 0 (0x0) geendet. Der Thread 11508 hat mit Code 0 (0x0) geendet. Der Thread 15720 hat mit Code 0 (0x0) geendet. Der Thread 10152 hat mit Code 0 (0x0) geendet. Der Thread 5380 hat mit Code 0 (0x0) geendet. Der Thread 15540 hat mit Code 0 (0x0) geendet. Der Thread 2372 hat mit Code 0 (0x0) geendet. Der Thread 10516 hat mit Code 0 (0x0) geendet. Der Thread 8784 hat mit Code 0 (0x0) geendet. Der Thread 828 hat mit Code 0 (0x0) geendet. Das Programm "[13208] netbird.exe" wurde mit Code 0 (0x0) beendet. ```
saavagebueno added the clientwaiting-feedbackwindows labels 2025-11-20 05:28:47 -05:00
Author
Owner

@roberthase commented on GitHub (Oct 21, 2024):

I recently stumbled over this issue too. Six of our 275 windows-notebooks with netbird needed a reboot to connect properly again.
I am not 100% sure yet, but it seems that netbird is unable to route matched domains and cant connect to the controller this way. I was able to fix this issue without reboot on 2 machines by deleting the following reg-key:

Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Dnscache\Parameters\DnsPolicyConfig\NetBird-Match

@roberthase commented on GitHub (Oct 21, 2024): I recently stumbled over this issue too. Six of our 275 windows-notebooks with netbird needed a reboot to connect properly again. I am not 100% sure yet, but it seems that netbird is unable to route matched domains and cant connect to the controller this way. I was able to fix this issue without reboot on 2 machines by deleting the following reg-key: Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Dnscache\Parameters\DnsPolicyConfig\NetBird-Match
Author
Owner

@v1rusnl commented on GitHub (Oct 21, 2024):

Thanks for the suggestion, but this did not change anything for me. Regkey gets regenerated on every Daemon/UI start. When disconnecting, I get the same error as in start post.

@v1rusnl commented on GitHub (Oct 21, 2024): Thanks for the suggestion, but this did not change anything for me. Regkey gets regenerated on every Daemon/UI start. When disconnecting, I get the same error as in start post.
Author
Owner

@Deddinho23 commented on GitHub (Oct 23, 2024):

I suggest that the problem was present even before the 0.30.x cause we already had it in the past, however the workaround proposed by @roberthase worked right for us at the moment

@Deddinho23 commented on GitHub (Oct 23, 2024): I suggest that the problem was present even before the 0.30.x cause we already had it in the past, however the workaround proposed by @roberthase worked right for us at the moment
Author
Owner

@roberthase commented on GitHub (Oct 23, 2024):

i also notice that on some systems the registry entry is not available after booting and auto start of netbird.
I cant connect do the set domains, when that happens.

After disconnecting and reconnecting or rebooting it gets created and it works.

@roberthase commented on GitHub (Oct 23, 2024): i also notice that on some systems the registry entry is not available after booting and auto start of netbird. I cant connect do the set domains, when that happens. After disconnecting and reconnecting or rebooting it gets created and it works.
Author
Owner

@v1rusnl commented on GitHub (Oct 24, 2024):

For people just running the Windows client to connect to other peers (e.g. the selfhosted VPS) via SSH like me, the alternative is using WSL2. Footprint is supersmall.

  1. Install a slick Distro like Debian or Ubuntu
  2. Install Netbird in WSL Distro
  3. Make WSL autostart after login using wslconfig and a small vbs script
  4. Configure WSL to run unattended in background https://github.com/gardengim/keepwsl

Just a small workaround until Windows Clients works reliable and perhaps not for everyones needs, but nevertheless I thought I'd share this one.

@v1rusnl commented on GitHub (Oct 24, 2024): For people just running the Windows client to connect to other peers (e.g. the selfhosted VPS) via SSH like me, the alternative is using WSL2. Footprint is supersmall. 1. Install a slick Distro like Debian or Ubuntu 2. Install Netbird in WSL Distro 3. Make WSL autostart after login using wslconfig and a small vbs script 4. Configure WSL to run unattended in background [https://github.com/gardengim/keepwsl](url) Just a small workaround until Windows Clients works reliable and perhaps not for everyones needs, but nevertheless I thought I'd share this one.
Author
Owner

@v1rusnl commented on GitHub (Nov 1, 2024):

Seems to be fixed in 0.31.0.

@v1rusnl commented on GitHub (Nov 1, 2024): Seems to be fixed in 0.31.0.
Author
Owner

@v1rusnl commented on GitHub (Nov 1, 2024):

Error came back.

@v1rusnl commented on GitHub (Nov 1, 2024): Error came back.
Author
Owner

@mlsmaycon commented on GitHub (Nov 5, 2024):

@v1rusnl can you check if there are routes staying in the system after the process exits?

You can do that by running route print, look for any IP address pointing to the domain of the management server. If you are using our cloud, this should be the address for api.netbird.io.

@mlsmaycon commented on GitHub (Nov 5, 2024): @v1rusnl can you check if there are routes staying in the system after the process exits? You can do that by running `route print`, look for any IP address pointing to the domain of the management server. If you are using our cloud, this should be the address for api.netbird.io.
Author
Owner

@v1rusnl commented on GitHub (Nov 6, 2024):

@v1rusnl can you check if there are routes staying in the system after the process exits?

You can do that by running route print, look for any IP address pointing to the domain of the management server. If you are using our cloud, this should be the address for api.netbird.io.

Today for some reason I was not able to reproduce the error. Will investigate further and reply back when the error reoccurs.

@v1rusnl commented on GitHub (Nov 6, 2024): > @v1rusnl can you check if there are routes staying in the system after the process exits? > > You can do that by running `route print`, look for any IP address pointing to the domain of the management server. If you are using our cloud, this should be the address for api.netbird.io. Today for some reason I was not able to reproduce the error. Will investigate further and reply back when the error reoccurs.
Author
Owner

@nazarewk commented on GitHub (Apr 28, 2025):

Hello @v1rusnl,

We're currently reviewing our open issues and would like to verify if this problem still exists in the latest NetBird version.

Could you please confirm if the issue is still there?

We may close this issue temporarily if we don't hear back from you within 2 weeks, but feel free to reopen it with updated information.

Thanks for your contribution to improving the project!

@nazarewk commented on GitHub (Apr 28, 2025): Hello @v1rusnl, We're currently reviewing our open issues and would like to verify if this problem still exists in the [latest NetBird version](https://github.com/netbirdio/netbird/releases). Could you please confirm if the issue is still there? We may close this issue temporarily if we don't hear back from you within **2 weeks**, but feel free to reopen it with updated information. Thanks for your contribution to improving the project!
Author
Owner

@mlsmaycon commented on GitHub (Jun 1, 2025):

closing issue due to no recent feedback. Feel free to open a new one if the issue persist or reopen if this was a feature request.

@mlsmaycon commented on GitHub (Jun 1, 2025): closing issue due to no recent feedback. Feel free to open a new one if the issue persist or reopen if this was a feature request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#1348