[GH-ISSUE #1685] Windows 10 netbird service not starting (context deadline exceeded) #2979

Closed
opened 2026-08-05 00:49:58 -04:00 by saavagebueno · 6 comments
Owner

Originally created by @xiya233 on GitHub (Mar 9, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/1685

Describe the problem

Install the current latest version (v0.26.2) and check the running status: Error: failed to connect to daemon error: context deadline exceeded

Executing the following command tries to fix it, but it does not work:

netbird service uninstall
netbird service install --log-level debug
netbird service start

Suspected to be related to this issue: https://github.com/netbirdio/netbird/issues/1418

To Reproduce

Steps to reproduce the behavior:

1.Install the latest version
2.Error received

Are you using NetBird Cloud?

Self-host NetBird's control plane

Deploy according to this document: https://docs.netbird.io/selfhosted/selfhosted-quickstart

NetBird version

0.26.2

NetBird status -d 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

Screenshots

2024-03-10_11-02-19
2024-03-10_11-03-14

Originally created by @xiya233 on GitHub (Mar 9, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/1685 **Describe the problem** Install the current latest version (v0.26.2) and check the running status: Error: failed to connect to daemon error: context deadline exceeded Executing the following command tries to fix it, but it does not work: ``` netbird service uninstall netbird service install --log-level debug netbird service start ``` Suspected to be related to this issue: https://github.com/netbirdio/netbird/issues/1418 **To Reproduce** Steps to reproduce the behavior: 1.Install the latest version 2.Error received **Are you using NetBird Cloud?** Self-host NetBird's control plane Deploy according to this document: https://docs.netbird.io/selfhosted/selfhosted-quickstart **NetBird version** 0.26.2 **NetBird status -d 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 **Screenshots** ![2024-03-10_11-02-19](https://github.com/netbirdio/netbird/assets/33951857/0f26f826-a77f-4ce7-9a93-d2f540a982ad) ![2024-03-10_11-03-14](https://github.com/netbirdio/netbird/assets/33951857/4fc7b70c-f74b-4fcf-85a0-6493144e2e70)
Author
Owner

@pappz commented on GitHub (Mar 11, 2024):

Hello!

I saw you started the service in debug mode. Could you send me the log file?
You can see the steps about how you can collect the logs in this page.

<!-- gh-comment-id:1988161194 --> @pappz commented on GitHub (Mar 11, 2024): Hello! I saw you started the service in debug mode. Could you send me the log file? You can see the steps about how you can collect the logs in [this](https://docs.netbird.io/how-to/troubleshooting-client) page.
Author
Owner

@xiya233 commented on GitHub (Mar 11, 2024):

Hello!

I saw you started the service in debug mode. Could you send me the log file? You can see the steps about how you can collect the logs in this page.

Hello

There is nothing of value within the client.log file

2024-03-11T20:47:30+08:00 INFO client/cmd/service_controller.go:24: starting Netbird service
2024-03-11T20:48:43+08:00 INFO client/cmd/service_controller.go:24: starting Netbird service
2024-03-11T20:49:26+08:00 INFO client/cmd/service_controller.go:24: starting Netbird service
2024-03-11T20:52:26+08:00 INFO client/cmd/service_controller.go:24: starting Netbird service
2024-03-11T20:52:48+08:00 INFO client/cmd/service_controller.go:24: starting Netbird service
2024-03-11T20:55:58+08:00 INFO client/cmd/service_controller.go:24: starting Netbird service
2024-03-11T20:57:02+08:00 INFO client/cmd/service_controller.go:24: starting Netbird service

But if I run the command within powershell:

netbird service run --config C:\ProgramData\Netbird\config.json --log-level debug --log-file C:\ProgramData\Netbird\client.log

I will get an error message:

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x28 pc=0x1723a9d]

goroutine 24 [running]:
net/url.(*URL).Hostname(...)
        /opt/hostedtoolcache/go/1.21.7/x64/src/net/url/url.go:1144
github.com/netbirdio/netbird/client/internal.UpdateOldManagementURL({0x1d1bd68, 0xc0003745f0}, 0xc0000b9130, {0xc00010e4b0, 0x22})
        /home/runner/work/netbird/netbird/client/internal/config.go:398 +0xfd
github.com/netbirdio/netbird/client/server.(*Server).Start(0xc0006c61a0)
        /home/runner/work/netbird/netbird/client/server/server.go:109 +0x533
github.com/netbirdio/netbird/client/cmd.(*program).Start.func1()
        /home/runner/work/netbird/netbird/client/cmd/service_controller.go:59 +0x513
created by github.com/netbirdio/netbird/client/cmd.(*program).Start in goroutine 1
        /home/runner/work/netbird/netbird/client/cmd/service_controller.go:47 +0x315
<!-- gh-comment-id:1988413164 --> @xiya233 commented on GitHub (Mar 11, 2024): > Hello! > > I saw you started the service in debug mode. Could you send me the log file? You can see the steps about how you can collect the logs in [this](https://docs.netbird.io/how-to/troubleshooting-client) page. Hello There is nothing of value within the client.log file ``` 2024-03-11T20:47:30+08:00 INFO client/cmd/service_controller.go:24: starting Netbird service 2024-03-11T20:48:43+08:00 INFO client/cmd/service_controller.go:24: starting Netbird service 2024-03-11T20:49:26+08:00 INFO client/cmd/service_controller.go:24: starting Netbird service 2024-03-11T20:52:26+08:00 INFO client/cmd/service_controller.go:24: starting Netbird service 2024-03-11T20:52:48+08:00 INFO client/cmd/service_controller.go:24: starting Netbird service 2024-03-11T20:55:58+08:00 INFO client/cmd/service_controller.go:24: starting Netbird service 2024-03-11T20:57:02+08:00 INFO client/cmd/service_controller.go:24: starting Netbird service ``` But if I run the command within powershell: `netbird service run --config C:\ProgramData\Netbird\config.json --log-level debug --log-file C:\ProgramData\Netbird\client.log` I will get an error message: ``` panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x28 pc=0x1723a9d] goroutine 24 [running]: net/url.(*URL).Hostname(...) /opt/hostedtoolcache/go/1.21.7/x64/src/net/url/url.go:1144 github.com/netbirdio/netbird/client/internal.UpdateOldManagementURL({0x1d1bd68, 0xc0003745f0}, 0xc0000b9130, {0xc00010e4b0, 0x22}) /home/runner/work/netbird/netbird/client/internal/config.go:398 +0xfd github.com/netbirdio/netbird/client/server.(*Server).Start(0xc0006c61a0) /home/runner/work/netbird/netbird/client/server/server.go:109 +0x533 github.com/netbirdio/netbird/client/cmd.(*program).Start.func1() /home/runner/work/netbird/netbird/client/cmd/service_controller.go:59 +0x513 created by github.com/netbirdio/netbird/client/cmd.(*program).Start in goroutine 1 /home/runner/work/netbird/netbird/client/cmd/service_controller.go:47 +0x315 ```
Author
Owner

@xiya233 commented on GitHub (Mar 11, 2024):

Also I can't set the Management URL through the GUI, once I enter the self-hosted URL to save it, the content is reset

I check config.json and it shows:

"ManagementURL": null,

If I set inside config.json

"ManagementURL": "https://netbird.xxxxx.com",

then run

netbird service run --config C:\ProgramData\Netbird\config.json --log-level debug --log-file C:\ProgramData\Netbird\client.log

client.log will receive error message:

2024-03-11T21:35:05+08:00 WARN client/server/server.go:104: unable to create configuration file: json: cannot unmarshal string into Go struct field Config.ManagementURL of type url.URL
2024-03-11T21:35:05+08:00 FATL client/cmd/service_controller.go:60: failed to start daemon: json: cannot unmarshal string into Go struct field Config.ManagementURL of type url.URL
<!-- gh-comment-id:1988427665 --> @xiya233 commented on GitHub (Mar 11, 2024): Also I can't set the Management URL through the GUI, once I enter the self-hosted URL to save it, the content is reset I check config.json and it shows: `"ManagementURL": null,` If I set inside config.json `"ManagementURL": "https://netbird.xxxxx.com",` then run `netbird service run --config C:\ProgramData\Netbird\config.json --log-level debug --log-file C:\ProgramData\Netbird\client.log` client.log will receive error message: ``` 2024-03-11T21:35:05+08:00 WARN client/server/server.go:104: unable to create configuration file: json: cannot unmarshal string into Go struct field Config.ManagementURL of type url.URL 2024-03-11T21:35:05+08:00 FATL client/cmd/service_controller.go:60: failed to start daemon: json: cannot unmarshal string into Go struct field Config.ManagementURL of type url.URL ```
Author
Owner

@pappz commented on GitHub (Mar 11, 2024):

The correct syntax of the URL config looks like this:

    "ManagementURL": {
        "Scheme": "https",
        "Opaque": "",
        "User": null,
        "Host": "netbird.xxxxx.com:443",
        "Path": "",
        "RawPath": "",
        "OmitHost": false,
        "ForceQuery": false,
        "RawQuery": "",
        "Fragment": "",
        "RawFragment": ""
    },
    "AdminURL": {
        "Scheme": "https",
        "Opaque": "",
        "User": null,
        "Host": "app.netbird.xxxxx.com:443",
        "Path": "",
        "RawPath": "",
        "OmitHost": false,
        "ForceQuery": false,
        "RawQuery": "",
        "Fragment": "",
        "RawFragment": ""
    },
<!-- gh-comment-id:1988697796 --> @pappz commented on GitHub (Mar 11, 2024): The correct syntax of the URL config looks like this: ```JSON "ManagementURL": { "Scheme": "https", "Opaque": "", "User": null, "Host": "netbird.xxxxx.com:443", "Path": "", "RawPath": "", "OmitHost": false, "ForceQuery": false, "RawQuery": "", "Fragment": "", "RawFragment": "" }, "AdminURL": { "Scheme": "https", "Opaque": "", "User": null, "Host": "app.netbird.xxxxx.com:443", "Path": "", "RawPath": "", "OmitHost": false, "ForceQuery": false, "RawQuery": "", "Fragment": "", "RawFragment": "" }, ```
Author
Owner

@xiya233 commented on GitHub (Mar 11, 2024):

The correct syntax of the URL config looks like this:

    "ManagementURL": {
        "Scheme": "https",
        "Opaque": "",
        "User": null,
        "Host": "netbird.xxxxx.com:443",
        "Path": "",
        "RawPath": "",
        "OmitHost": false,
        "ForceQuery": false,
        "RawQuery": "",
        "Fragment": "",
        "RawFragment": ""
    },
    "AdminURL": {
        "Scheme": "https",
        "Opaque": "",
        "User": null,
        "Host": "app.netbird.xxxxx.com:443",
        "Path": "",
        "RawPath": "",
        "OmitHost": false,
        "ForceQuery": false,
        "RawQuery": "",
        "Fragment": "",
        "RawFragment": ""
    },

Thanks for the sample configuration, I've fixed it!

<!-- gh-comment-id:1990050800 --> @xiya233 commented on GitHub (Mar 11, 2024): > The correct syntax of the URL config looks like this: > > ```json > "ManagementURL": { > "Scheme": "https", > "Opaque": "", > "User": null, > "Host": "netbird.xxxxx.com:443", > "Path": "", > "RawPath": "", > "OmitHost": false, > "ForceQuery": false, > "RawQuery": "", > "Fragment": "", > "RawFragment": "" > }, > "AdminURL": { > "Scheme": "https", > "Opaque": "", > "User": null, > "Host": "app.netbird.xxxxx.com:443", > "Path": "", > "RawPath": "", > "OmitHost": false, > "ForceQuery": false, > "RawQuery": "", > "Fragment": "", > "RawFragment": "" > }, > ``` Thanks for the sample configuration, I've fixed it!
Author
Owner

@xiya233 commented on GitHub (Mar 11, 2024):

For the previous problem, it may have been caused by netbird copying an old wiretrustee config file that I used a few years ago

lmao

<!-- gh-comment-id:1990073286 --> @xiya233 commented on GitHub (Mar 11, 2024): For the previous problem, it may have been caused by netbird copying an old wiretrustee config file that I used a few years ago lmao
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#2979