[GH-ISSUE #2011] netbird service / connection is down when returning from sleep / hibernation #3836

Open
opened 2026-08-05 00:54:34 -04:00 by saavagebueno · 16 comments
Owner

Originally created by @ez1976 on GitHub (May 18, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/2011

Hi
on windows it seems that when the computer is resumed from sleep or Hibernation, although the service is up and the netbird-gui display as connected, the user gets:
"dial service - context deadline exceeded"

of course reboot / restart of the service / running "netbird down && nebird up" or "netbird service restart"
will resume the connection just fine.
attached one of the users client log
at line 10980 the user restarted the computer (or the service)
Uploading netbird-client.log…

Originally created by @ez1976 on GitHub (May 18, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/2011 Hi on windows it seems that when the computer is resumed from sleep or Hibernation, although the service is up and the netbird-gui display as connected, the user gets: "dial service - context deadline exceeded" of course reboot / restart of the service / running "netbird down && nebird up" or "netbird service restart" will resume the connection just fine. attached one of the users client log at line 10980 the user restarted the computer (or the service) [Uploading netbird-client.log…]()
saavagebueno added the bugwindows labels 2026-08-05 00:54:34 -04:00
Author
Owner

@mlsmaycon commented on GitHub (May 18, 2024):

Can you upgrade the client to 0.27.7 and enable the network monitor?

You can do that by:

netbird down
netbird up -N
<!-- gh-comment-id:2118843013 --> @mlsmaycon commented on GitHub (May 18, 2024): Can you upgrade the client to 0.27.7 and enable the network monitor? You can do that by: ``` netbird down netbird up -N ```
Author
Owner

@ez1976 commented on GitHub (May 18, 2024):

On it

On Sat, May 18, 2024, 15:34 Maycon Santos @.***> wrote:

Can you upgrade the client to 0.27.7 and enable the network monitor?

You can do that by:

netbird down
netbird up -N


Reply to this email directly, view it on GitHub
https://github.com/netbirdio/netbird/issues/2011#issuecomment-2118843013,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AANTDD2CEWIEVWPZLVSP6F3ZC5RI5AVCNFSM6AAAAABH5PO2ZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJYHA2DGMBRGM
.
You are receiving this because you authored the thread.Message ID:
@.***>

<!-- gh-comment-id:2118843380 --> @ez1976 commented on GitHub (May 18, 2024): On it On Sat, May 18, 2024, 15:34 Maycon Santos ***@***.***> wrote: > Can you upgrade the client to 0.27.7 and enable the network monitor? > > You can do that by: > > netbird down > netbird up -N > > — > Reply to this email directly, view it on GitHub > <https://github.com/netbirdio/netbird/issues/2011#issuecomment-2118843013>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AANTDD2CEWIEVWPZLVSP6F3ZC5RI5AVCNFSM6AAAAABH5PO2ZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJYHA2DGMBRGM> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Author
Owner

@hurricanehrndz commented on GitHub (May 20, 2024):

I can also create a PR to update the UI so that it is based on the full-status @mlsmaycon if you all want. The reason again is because of the internal state never gets updated when signal and management endpoints become unavailable.

Network-monitor does help though, from time to time tough in rare instances you will get a resource busy with the wireguard interface, restarting the service does solve that. Seems like when restarting the engine there is a race condition, or for some odd reason removing the interface fails.

2024-05-06T09:09:19-07:00 INFO client/internal/routemanager/manager.go:93: Routing setup complete
2024-05-06T09:09:19-07:00 ERRO client/internal/engine.go:284: failed creating tunnel interface utun100: [resource busy]
2024-05-06T09:09:19-07:00 INFO client/internal/routemanager/manager.go:117: Routing cleanup complete
2024-05-06T09:09:19-07:00 ERRO client/internal/connect.go:245: error while starting Netbird Connection Engine: create wg interface: resource busy
<!-- gh-comment-id:2120726001 --> @hurricanehrndz commented on GitHub (May 20, 2024): I can also create a PR to update the UI so that it is based on the full-status @mlsmaycon if you all want. The reason again is because of the internal state never gets updated when signal and management endpoints become unavailable. Network-monitor does help though, from time to time tough in rare instances you will get a resource busy with the wireguard interface, restarting the service does solve that. Seems like when restarting the engine there is a race condition, or for some odd reason removing the interface fails. ``` 2024-05-06T09:09:19-07:00 INFO client/internal/routemanager/manager.go:93: Routing setup complete 2024-05-06T09:09:19-07:00 ERRO client/internal/engine.go:284: failed creating tunnel interface utun100: [resource busy] 2024-05-06T09:09:19-07:00 INFO client/internal/routemanager/manager.go:117: Routing cleanup complete 2024-05-06T09:09:19-07:00 ERRO client/internal/connect.go:245: error while starting Netbird Connection Engine: create wg interface: resource busy ```
Author
Owner

@hurricanehrndz commented on GitHub (May 20, 2024):

2024-05-08T14:28:50+01:00 DEBG client/internal/engine.go:1135: removing Netbird interface utun100
2024-05-08T14:28:50+01:00 ERRO client/internal/connect.go:245: error while starting Netbird Connection Engine: create wg interface: resource busy

https://github.com/netbirdio/netbird/blob/main/client/internal/engine.go#L1168

<!-- gh-comment-id:2120739432 --> @hurricanehrndz commented on GitHub (May 20, 2024): ``` 2024-05-08T14:28:50+01:00 DEBG client/internal/engine.go:1135: removing Netbird interface utun100 2024-05-08T14:28:50+01:00 ERRO client/internal/connect.go:245: error while starting Netbird Connection Engine: create wg interface: resource busy ``` https://github.com/netbirdio/netbird/blob/main/client/internal/engine.go#L1168
Author
Owner

@hurricanehrndz commented on GitHub (May 21, 2024):

I believe issue #2006 is related

<!-- gh-comment-id:2122564342 --> @hurricanehrndz commented on GitHub (May 21, 2024): I believe issue #2006 is related
Author
Owner

@ghost commented on GitHub (Jul 1, 2024):

I have the same issue. Returning from a sleeping Mac and it shows as disconnected and won't connect.

error while starting Netbird Connection Engine: create wg interface: resource busy

<!-- gh-comment-id:2201192759 --> @ghost commented on GitHub (Jul 1, 2024): I have the same issue. Returning from a sleeping Mac and it shows as disconnected and won't connect. `error while starting Netbird Connection Engine: create wg interface: resource busy`
Author
Owner

@ez1976 commented on GitHub (Jul 1, 2024):

Try
netbird down
netbird up -N

On Mon, Jul 1, 2024, 23:23 Fossil @.***> wrote:

I have the same issue. Returning from a sleeping Mac and it shows as
disconnected and won't connect.

error while starting Netbird Connection Engine: create wg interface:
resource busy


Reply to this email directly, view it on GitHub
https://github.com/netbirdio/netbird/issues/2011#issuecomment-2201192759,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AANTDDZDINBHXKENUOSYR7DZKHJHFAVCNFSM6AAAAABH5PO2ZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBRGE4TENZVHE
.
You are receiving this because you authored the thread.Message ID:
@.***>

<!-- gh-comment-id:2201200467 --> @ez1976 commented on GitHub (Jul 1, 2024): Try netbird down netbird up -N On Mon, Jul 1, 2024, 23:23 Fossil ***@***.***> wrote: > I have the same issue. Returning from a sleeping Mac and it shows as > disconnected and won't connect. > > error while starting Netbird Connection Engine: create wg interface: > resource busy > > — > Reply to this email directly, view it on GitHub > <https://github.com/netbirdio/netbird/issues/2011#issuecomment-2201192759>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AANTDDZDINBHXKENUOSYR7DZKHJHFAVCNFSM6AAAAABH5PO2ZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBRGE4TENZVHE> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Author
Owner

@ghost commented on GitHub (Jul 1, 2024):

Yeah that works. But this is a bug obviously :P

<!-- gh-comment-id:2201203647 --> @ghost commented on GitHub (Jul 1, 2024): Yeah that works. But this is a bug obviously :P
Author
Owner

@ez1976 commented on GitHub (Jul 1, 2024):

No.
The -N adds a network monitor that resets the connection if the network
adapter status changes.
It is disabled by default

On Mon, Jul 1, 2024, 23:28 Fossil @.***> wrote:

Yeah that works. But this is a bug obviously :P


Reply to this email directly, view it on GitHub
https://github.com/netbirdio/netbird/issues/2011#issuecomment-2201203647,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AANTDD24XNSW57B2JG4U3L3ZKHJZHAVCNFSM6AAAAABH5PO2ZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBRGIYDGNRUG4
.
You are receiving this because you authored the thread.Message ID:
@.***>

<!-- gh-comment-id:2201231217 --> @ez1976 commented on GitHub (Jul 1, 2024): No. The -N adds a network monitor that resets the connection if the network adapter status changes. It is disabled by default On Mon, Jul 1, 2024, 23:28 Fossil ***@***.***> wrote: > Yeah that works. But this is a bug obviously :P > > — > Reply to this email directly, view it on GitHub > <https://github.com/netbirdio/netbird/issues/2011#issuecomment-2201203647>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AANTDD24XNSW57B2JG4U3L3ZKHJZHAVCNFSM6AAAAABH5PO2ZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBRGIYDGNRUG4> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Author
Owner

@ghost commented on GitHub (Jul 2, 2024):

So I looked at it some more, running netbird up -N comes back with Connected. But running netbird status returns Error: status failed: create wg interface: resource busy. The admin panel also says I am still offline.

What I meant before, was that the -N flag should probably become an option in the app itself, and an option the client automatically configures when told to do so in the admin panel.

<!-- gh-comment-id:2202301247 --> @ghost commented on GitHub (Jul 2, 2024): So I looked at it some more, running `netbird up -N` comes back with `Connected`. But running `netbird status` returns `Error: status failed: create wg interface: resource busy`. The admin panel also says I am still offline. What I meant before, was that the -N flag should probably become an option in the app itself, and an option the client automatically configures when told to do so in the admin panel.
Author
Owner

@ez1976 commented on GitHub (Jul 2, 2024):

Or even better, enabled by default.
After the laptop resumes from sleep give it a bit of time and it will
restart the service.
On windows laptops i actually pushed a task schedule to restart the service
every time the laptop restarts or resumes from sleep

On Tue, Jul 2, 2024, 09:25 Fossil @.***> wrote:

So I looked at it some more, running netbird up -N comes back with
Connected. But running netbird status returns Error: status failed:
create wg interface: resource busy.

What I meant before, was that the -N flag should probably become an option
in the app itself, and an option the client automatically configures when
told to do so in the admin panel.


Reply to this email directly, view it on GitHub
https://github.com/netbirdio/netbird/issues/2011#issuecomment-2202301247,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AANTDD7ZZOHN4PC5QYKUHC3ZKJPZHAVCNFSM6AAAAABH5PO2ZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBSGMYDCMRUG4
.
You are receiving this because you authored the thread.Message ID:
@.***>

<!-- gh-comment-id:2202327347 --> @ez1976 commented on GitHub (Jul 2, 2024): Or even better, enabled by default. After the laptop resumes from sleep give it a bit of time and it will restart the service. On windows laptops i actually pushed a task schedule to restart the service every time the laptop restarts or resumes from sleep On Tue, Jul 2, 2024, 09:25 Fossil ***@***.***> wrote: > So I looked at it some more, running netbird up -N comes back with > Connected. But running netbird status returns Error: status failed: > create wg interface: resource busy. > > What I meant before, was that the -N flag should probably become an option > in the app itself, and an option the client automatically configures when > told to do so in the admin panel. > > — > Reply to this email directly, view it on GitHub > <https://github.com/netbirdio/netbird/issues/2011#issuecomment-2202301247>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AANTDD7ZZOHN4PC5QYKUHC3ZKJPZHAVCNFSM6AAAAABH5PO2ZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBSGMYDCMRUG4> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Author
Owner

@ghost commented on GitHub (Jul 2, 2024):

Agree. Tailscale seems to just always work, even right after waking from sleep.

<!-- gh-comment-id:2202329317 --> @ghost commented on GitHub (Jul 2, 2024): Agree. Tailscale seems to just always work, even right after waking from sleep.
Author
Owner

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

Try
netbird down
netbird up -N

This did not work for me. After running both commands I get

$ netbird status
Error: status failed: create wg interface: resource busy
<!-- gh-comment-id:2452656559 --> @clarkmcc commented on GitHub (Nov 1, 2024): > Try netbird down netbird up -N This did not work for me. After running both commands I get ```shell $ netbird status Error: status failed: create wg interface: resource busy ```
Author
Owner

@ez1976 commented on GitHub (Nov 2, 2024):

Do you have virtualbox or any other virtualization on your computer?

On Fri, Nov 1, 2024, 22:10 Clark McCauley @.***> wrote:

Try
netbird down
netbird up -N

This did not work for me. After running both commands I get

$ netbird status
Error: status failed: create wg interface: resource busy


Reply to this email directly, view it on GitHub
https://github.com/netbirdio/netbird/issues/2011#issuecomment-2452656559,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AANTDDZWS27GI6BYI3M2E5LZ6P35BAVCNFSM6AAAAABH5PO2ZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJSGY2TMNJVHE
.
You are receiving this because you authored the thread.Message ID:
@.***>

<!-- gh-comment-id:2452951282 --> @ez1976 commented on GitHub (Nov 2, 2024): Do you have virtualbox or any other virtualization on your computer? On Fri, Nov 1, 2024, 22:10 Clark McCauley ***@***.***> wrote: > Try > netbird down > netbird up -N > > This did not work for me. After running both commands I get > > $ netbird status > Error: status failed: create wg interface: resource busy > > — > Reply to this email directly, view it on GitHub > <https://github.com/netbirdio/netbird/issues/2011#issuecomment-2452656559>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AANTDDZWS27GI6BYI3M2E5LZ6P35BAVCNFSM6AAAAABH5PO2ZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJSGY2TMNJVHE> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Author
Owner

@clarkmcc commented on GitHub (Nov 2, 2024):

I have Parallels. I was able to resolve it by killing the NetBird service and restarting it.

<!-- gh-comment-id:2453000692 --> @clarkmcc commented on GitHub (Nov 2, 2024): I have Parallels. I was able to resolve it by killing the NetBird service and restarting it.
Author
Owner

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

Hello folks, recently we released a new version with a new handler. Can you run a test with the latest version?

<!-- gh-comment-id:2453006040 --> @mlsmaycon commented on GitHub (Nov 2, 2024): Hello folks, recently we released a new version with a new handler. Can you run a test with the latest version?
Sign in to join this conversation.
No Label bug windows
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#3836