netbirdio / netbird

Connect your devices into a secure WireGuard®-based overlay network with SSO, MFA and granular access controls.
https://netbird.io
BSD 3-Clause "New" or "Revised" License
10.04k stars 441 forks source link

401 #1989

Open CYQ00 opened 2 months ago

CYQ00 commented 2 months ago

management-1 | 2024-05-15T07:54:02Z ERRO management/server/http/middleware/auth_middleware.go:88: Error when validating JWT claims: issue getting account from store management-1 | 2024-05-15T07:54:02Z ERRO management/server/http/util/util.go:80: got a handler error: token invalid management-1 | 2024-05-15T07:54:02Z ERRO management/server/telemetry/http_api_metrics.go:181: HTTP response 1294220147: GET /api/users status 401 management-1 | 2024-05-15T08:06:40Z ERRO management/server/sqlite_store.go:307: error when getting account from the store: failed to unmarshal gob value: "{\"IP\":\"100.86.0.0\",\"Mask\":\"//8AAA==\"}"

Hello, the above error occurred when running the self built management image.

lixmal commented 2 months ago

Can you tell us the version you're running? Did you happen to downgrade from a newer version?

CYQ00 commented 2 months ago

The version of management is 0.27.1.

mlsmaycon commented 2 months ago

Hello @CYQ00 it seems like there was a rollback from 0.27.5 to 0.27.1. Can you update the management service to the 0.27.5+ or the latest or downgrade it and restore a backup?

assuming you've followed the backup guide from our docs. You can follow these steps to restore a backup:

docker compose stop management
docker compose cp backup/netbird/store.db management:/var/lib/netbird/
docker compose start management
CYQ00 commented 2 months ago

Built with version 0.27.5, it can run normally.Are there any strict requirements for this management version? Is it not possible to use versions lower than v0.27.5?

mlsmaycon commented 2 months ago

We've migrated a few fields onto JSON so that we have better Postgres support. For the time being, there is no direct option for rolling back. Besides, converting to json and then converting back to sqlite in an older version.

Overall, from 0.27.1 to 0.27.7 we had only this change in management, so besides that, the behavior and features should be the same.