Clients can't connect to server #945

Open
opened 2025-11-20 05:20:23 -05:00 by saavagebueno · 0 comments
Owner

Originally created by @Amplificator on GitHub (Jun 2, 2024).

I'm using the self-hosted option and have set up Netbird behind another virtual machine that runs a Caddy reverse proxy.

I used the getting-started-with-zitadel.sh script to install Netbird.

My reverse proxy Caddyfile is this:

{
    admin off

    servers netbird.REDACTED.dk {
        protocols h1 h2c
    }
}

http://netbird.REDACTED.dk {
    @http protocol http

    handle_path /auth {
        redir @http https://{host}{uri} html
    }

    handle_path / {
        redir @http https://{host}{uri}
    }
}

netbird.REDACTED.dk {
    import /etc/caddy/imports/log.import netbird.REDACTED.dk

    import /etc/caddy/imports/gzip.import

    import /etc/caddy/imports/tls-email.import

    import /etc/caddy/imports/headers.import

    reverse_proxy /signalexchange.SignalExchange/* h2c://10.0.0.40:10000 {
        import /etc/caddy/imports/reverseproxy-headers.import

        import /etc/caddy/imports/trusted-proxies.import
    }

    reverse_proxy /api/* 10.0.0.40:80 {
        import /etc/caddy/imports/reverseproxy-headers.import

        import /etc/caddy/imports/trusted-proxies.import
    }

    reverse_proxy /management.ManagementService/* h2c://10.0.0.40:80 {
        import /etc/caddy/imports/reverseproxy-headers.import

        import /etc/caddy/imports/trusted-proxies.import
    }

    reverse_proxy /* 10.0.0.40:80 {
        import /etc/caddy/imports/reverseproxy-headers.import

        import /etc/caddy/imports/trusted-proxies.import
    }
}

Installation goes fine and I can load up the interface, sign in, add 2FA and change things - everything in the interface appears to work and no errors are shown in the logs.

But when I want to connect any client, for example my Mac, I change the server info to my own (https://netbird.REDACTED.dk:443 and also tried without :443 at the end) and click the "Connect" button in the app and I get this error:
https://share.cleanshot.com/kgKDxVC1SvHW0S0XWtYJ

Trying to connect using the command line gives me the same error with no more details:

❯ netbird up --management-url https://netbird.REDACTED.dk
2024-06-02T16:57:29+02:00 WARN client/cmd/root.go:231: retrying Login to the Management service in 613.391081ms due to error rpc error: code = Unknown desc = getting device authorization flow info failed with error: failed while getting Management Service public key
2024-06-02T16:57:29+02:00 WARN client/cmd/root.go:231: retrying Login to the Management service in 1.326498153s due to error rpc error: code = Unknown desc = getting device authorization flow info failed with error: failed while getting Management Service public key
2024-06-02T16:57:31+02:00 WARN client/cmd/root.go:231: retrying Login to the Management service in 2.351547107s due to error rpc error: code = Unknown desc = getting device authorization flow info failed with error: failed while getting Management Service public key
2024-06-02T16:57:33+02:00 WARN client/cmd/root.go:231: retrying Login to the Management service in 4.38098465s due to error rpc error: code = Unknown desc = getting device authorization flow info failed with error: failed while getting Management Service public key
2024-06-02T16:57:38+02:00 WARN client/cmd/root.go:231: retrying Login to the Management service in 6.210155842s due to error rpc error: code = Unknown desc = getting device authorization flow info failed with error: failed while getting Management Service public key
2024-06-02T16:57:44+02:00 WARN client/cmd/root.go:231: retrying Login to the Management service in 9.557422609s due to error rpc error: code = Unknown desc = getting device authorization flow info failed with error: failed while getting Management Service public key
Error: login backoff cycle failed: rpc error: code = Unknown desc = getting device authorization flow info failed with error: failed while getting Management Service public key

On my iPhone I simply get a loading animation where it says "Veryfing..." after entering the server details.

I have checked logs using "docker compose logs -f" and I see nothing at all, when doing this.

Any idea on where to start to solve this?

Originally created by @Amplificator on GitHub (Jun 2, 2024). I'm using the self-hosted option and have set up Netbird behind another virtual machine that runs a Caddy reverse proxy. I used the getting-started-with-zitadel.sh script to install Netbird. My reverse proxy Caddyfile is this: ``` { admin off servers netbird.REDACTED.dk { protocols h1 h2c } } http://netbird.REDACTED.dk { @http protocol http handle_path /auth { redir @http https://{host}{uri} html } handle_path / { redir @http https://{host}{uri} } } netbird.REDACTED.dk { import /etc/caddy/imports/log.import netbird.REDACTED.dk import /etc/caddy/imports/gzip.import import /etc/caddy/imports/tls-email.import import /etc/caddy/imports/headers.import reverse_proxy /signalexchange.SignalExchange/* h2c://10.0.0.40:10000 { import /etc/caddy/imports/reverseproxy-headers.import import /etc/caddy/imports/trusted-proxies.import } reverse_proxy /api/* 10.0.0.40:80 { import /etc/caddy/imports/reverseproxy-headers.import import /etc/caddy/imports/trusted-proxies.import } reverse_proxy /management.ManagementService/* h2c://10.0.0.40:80 { import /etc/caddy/imports/reverseproxy-headers.import import /etc/caddy/imports/trusted-proxies.import } reverse_proxy /* 10.0.0.40:80 { import /etc/caddy/imports/reverseproxy-headers.import import /etc/caddy/imports/trusted-proxies.import } } ``` Installation goes fine and I can load up the interface, sign in, add 2FA and change things - everything in the interface appears to work and no errors are shown in the logs. But when I want to connect any client, for example my Mac, I change the server info to my own (https://netbird.REDACTED.dk:443 and also tried without :443 at the end) and click the "Connect" button in the app and I get this error: https://share.cleanshot.com/kgKDxVC1SvHW0S0XWtYJ Trying to connect using the command line gives me the same error with no more details: ``` ❯ netbird up --management-url https://netbird.REDACTED.dk 2024-06-02T16:57:29+02:00 WARN client/cmd/root.go:231: retrying Login to the Management service in 613.391081ms due to error rpc error: code = Unknown desc = getting device authorization flow info failed with error: failed while getting Management Service public key 2024-06-02T16:57:29+02:00 WARN client/cmd/root.go:231: retrying Login to the Management service in 1.326498153s due to error rpc error: code = Unknown desc = getting device authorization flow info failed with error: failed while getting Management Service public key 2024-06-02T16:57:31+02:00 WARN client/cmd/root.go:231: retrying Login to the Management service in 2.351547107s due to error rpc error: code = Unknown desc = getting device authorization flow info failed with error: failed while getting Management Service public key 2024-06-02T16:57:33+02:00 WARN client/cmd/root.go:231: retrying Login to the Management service in 4.38098465s due to error rpc error: code = Unknown desc = getting device authorization flow info failed with error: failed while getting Management Service public key 2024-06-02T16:57:38+02:00 WARN client/cmd/root.go:231: retrying Login to the Management service in 6.210155842s due to error rpc error: code = Unknown desc = getting device authorization flow info failed with error: failed while getting Management Service public key 2024-06-02T16:57:44+02:00 WARN client/cmd/root.go:231: retrying Login to the Management service in 9.557422609s due to error rpc error: code = Unknown desc = getting device authorization flow info failed with error: failed while getting Management Service public key Error: login backoff cycle failed: rpc error: code = Unknown desc = getting device authorization flow info failed with error: failed while getting Management Service public key ``` On my iPhone I simply get a loading animation where it says "Veryfing..." after entering the server details. I have checked logs using "docker compose logs -f" and I see nothing at all, when doing this. Any idea on where to start to solve this?
saavagebueno added the waiting-feedbacktriage-needed labels 2025-11-20 05:20:23 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#945