[GH-ISSUE #2812] Zero peers after restart management service #5929

Closed
opened 2026-08-05 01:05:52 -04:00 by saavagebueno · 3 comments
Owner

Originally created by @netandreus on GitHub (Oct 30, 2024).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/2812

Describe the problem

I have fresh installation of Self hosted Netbird , builded from quick start guide (with Zitadel). Netbird client installed on the same machine and It looks like it's connected.

$ netbird status
OS: linux/amd64
Daemon version: 0.30.2
CLI version: 0.30.2
Management: Connected
Signal: Connected
Relays: 3/3 Available
Nameservers: 0/0 Available
FQDN: node-0.netbird.selfhosted
NetBird IP: 100.81.205.48/16
Interface type: Kernel
Quantum resistance: false
Routes: -
Peers count: 9/11 Connected

To Reproduce

Restart management service:

cd /home/adin/netbird/current
docker compose stop
docker compose up -d

Expected behavior

All peers connected and listed in managmant UI.

Are you using NetBird Cloud?

I use self-host NetBird's control plane.

NetBird version

0.30.2

Screenshots

Screenshot 2024-10-30 at 17 25 45 Screenshot 2024-10-30 at 17 26 36

What have I already tried

  • Click to Refresh button in peers list
  • Restart containers one more time
  • Restore VMWare snapshot with this VM
  • Upgrade NetBird Self-Hosted to the latest version
  • Logout and login
Originally created by @netandreus on GitHub (Oct 30, 2024). Original GitHub issue: https://github.com/netbirdio/netbird/issues/2812 **Describe the problem** I have fresh installation of Self hosted Netbird , builded from quick start guide (with Zitadel). Netbird client installed on the same machine and It looks like it's connected. ``` $ netbird status OS: linux/amd64 Daemon version: 0.30.2 CLI version: 0.30.2 Management: Connected Signal: Connected Relays: 3/3 Available Nameservers: 0/0 Available FQDN: node-0.netbird.selfhosted NetBird IP: 100.81.205.48/16 Interface type: Kernel Quantum resistance: false Routes: - Peers count: 9/11 Connected ``` **To Reproduce** Restart management service: ```bash cd /home/adin/netbird/current docker compose stop docker compose up -d ``` **Expected behavior** All peers connected and listed in managmant UI. **Are you using NetBird Cloud?** I use self-host NetBird's control plane. **NetBird version** 0.30.2 **Screenshots** <img width="1411" alt="Screenshot 2024-10-30 at 17 25 45" src="https://github.com/user-attachments/assets/87c93434-269a-48b7-a2c0-94693dfb441c"> <img width="1933" alt="Screenshot 2024-10-30 at 17 26 36" src="https://github.com/user-attachments/assets/a0db7605-3f4b-4a5a-bf90-6f219882e8d7"> **What have I already tried** - Click to Refresh button in peers list - Restart containers one more time - Restore VMWare snapshot with this VM - Upgrade NetBird Self-Hosted to the latest version - Logout and login
saavagebueno added the self-hosting label 2026-08-05 01:05:52 -04:00
Author
Owner

@BizkitX commented on GitHub (Oct 30, 2024):

We ran into this same issue when we upgraded last week. Turns out we needed to migrate to SQLite as per the documentation located here:
https://docs.netbird.io/selfhosted/sqlite-store

Hope this helps!

<!-- gh-comment-id:2447284903 --> @BizkitX commented on GitHub (Oct 30, 2024): We ran into this same issue when we upgraded last week. Turns out we needed to migrate to SQLite as per the documentation located here: https://docs.netbird.io/selfhosted/sqlite-store Hope this helps!
Author
Owner

@mgarces commented on GitHub (Oct 30, 2024):

@netandreus can you validate the provided solution?

<!-- gh-comment-id:2447723043 --> @mgarces commented on GitHub (Oct 30, 2024): @netandreus can you validate the provided solution?
Author
Owner

@netandreus commented on GitHub (Oct 31, 2024):

@BizkitX thanks a lot for this solution! You're my hero!

Source of problem:

The problem was that there was no group "All Groups" in dropdown, but it was selected.
Screenshot 2024-10-30 at 18 09 09

Quick workaround:

So simple workaround was to check group "All" and now you can see all your peers.

Full solution:

Here is full solution ( thanks @BizkitX ) , which can resolve this issue:

  1. Migrate
docker compose stop management
mkdir backup
docker compose cp -a management:/var/lib/netbird/ backup/
docker compose start management
docker compose exec management /go/bin/netbird-mgmt sqlite-migration upgrade --log-file console
  1. Enable SQLite by updating the management.json file and setting the Engine field to sqlite as the following example:
    So here I had empty string:
    "StoreConfig": {
        "Engine": ""
    }

And I update it to:

    "StoreConfig": {
        "Engine": "sqlite"
    }
  1. Restart
docker compose restart management
  1. Chek store engine after startup
docker compose logs management
Screenshot 2024-10-31 at 08 37 42

Yep, now we use SQLite.

  1. Logout from Netbird UI.
  2. Clear all data related to your UI in Chrome.
  • Open Chrome and go to the website for which you want to clear data.
  • Click the padlock icon 🔒 (or “Not Secure” message) on the left side of the address bar.
  • Select Site settings from the dropdown menu. This will open the site’s specific settings page.
  • In the new tab, click on Clear data to delete all cached files, cookies, and other site-specific data.
  1. Open new tab, Login and now you can see all peers and group "All Groups" in the list.
Screenshot 2024-10-31 at 08 39 54

P.S. Warm thanks to the @BizkitX

<!-- gh-comment-id:2448998741 --> @netandreus commented on GitHub (Oct 31, 2024): @BizkitX thanks a lot for this solution! You're my hero! **Source of problem:** The problem was that there was no group "All Groups" in dropdown, but it was selected. <img width="1634" alt="Screenshot 2024-10-30 at 18 09 09" src="https://github.com/user-attachments/assets/2ee9595b-95ce-44f6-8d5d-5a48d93f12c8"> **Quick workaround:** So simple workaround was to check group "All" and now you can see all your peers. **Full solution:** Here is full solution ( thanks @BizkitX ) , which can resolve this issue: 1. Migrate ```bash docker compose stop management mkdir backup docker compose cp -a management:/var/lib/netbird/ backup/ docker compose start management docker compose exec management /go/bin/netbird-mgmt sqlite-migration upgrade --log-file console ``` 3. Enable SQLite by updating the ```management.json``` file and setting the Engine field to sqlite as the following example: So here I had empty string: ``` "StoreConfig": { "Engine": "" } ``` And I update it to: ``` "StoreConfig": { "Engine": "sqlite" } ``` 4. Restart ```bash docker compose restart management ``` 5. Chek store engine after startup ```bash docker compose logs management ``` <img width="1258" alt="Screenshot 2024-10-31 at 08 37 42" src="https://github.com/user-attachments/assets/dd6c6e32-523b-4d48-863b-f1dddd48ac32"> Yep, now we use SQLite. 6. Logout from Netbird UI. 7. Clear all data related to your UI in Chrome. - Open Chrome and go to the website for which you want to clear data. - Click the padlock icon 🔒 (or “Not Secure” message) on the left side of the address bar. - Select Site settings from the dropdown menu. This will open the site’s specific settings page. - In the new tab, click on Clear data to delete all cached files, cookies, and other site-specific data. 8. Open new tab, Login and now you can see all peers and group "All Groups" in the list. <img width="1589" alt="Screenshot 2024-10-31 at 08 39 54" src="https://github.com/user-attachments/assets/81f1ee81-eec4-4d54-b7c8-bb9a277973c0"> P.S. Warm thanks to the @BizkitX
Sign in to join this conversation.
No Label self-hosting
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#5929