Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't add peers to groups when upgrade to 0.30.1 #2745

Closed
Marcus1Pierce opened this issue Oct 16, 2024 · 6 comments · Fixed by #2746
Closed

Can't add peers to groups when upgrade to 0.30.1 #2745

Marcus1Pierce opened this issue Oct 16, 2024 · 6 comments · Fixed by #2746

Comments

@Marcus1Pierce
Copy link

Marcus1Pierce commented Oct 16, 2024

Describe the problem

I cannot add peers to the group. There is an error when adding peers to the group.

Error from the management container:

2024-10-16T09:02:06Z ERRO [requestID: 7e057e29-69c0-4317-bb93-2f070bc62021, accountID: , userID: 29, context: HTTP] management/server/http/util/util.go:81: got a handler error: failed to get group from store: ERROR: function json_array_length(text) does not exist (SQLSTATE 42883)

2024-10-16T09:02:06Z ERRO [context: HTTP, requestID: 7e057e29-69c0-4317-bb93-2f070bc62021] management/server/telemetry/http_api_metrics.go:168: HTTP response 7e057e29-69c0-4317-bb93-2f070bc62021: PUT /api/groups/cqm5va7dc18s73ee9tkg status 500

Error from Postgres:

2024-10-16 09:25:13.795 UTC [35] ERROR:  function json_array_length(text) does not exist at character 69

2024-10-16 09:25:13.795 UTC [35] HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

2024-10-16 09:25:13.795 UTC [35] STATEMENT:  SELECT * FROM "groups" WHERE name = $1 and account_id = $2 ORDER BY json_array_length(peers) DESC,"groups"."id" LIMIT 1 FOR SHARE

To Reproduce

Steps to reproduce the behavior:

  1. Update Netbird to Version 0.30.1
  2. Go to Dashboard and select any peers
  3. Assign groups to selected peer.
  4. See error

Expected behavior

There is a notification that peers were successfully added.

Are you using NetBird Cloud?

No. I'm using self hosted NetBird

NetBird version

netbird version 0.30.1

NetBird status -dA output:

Peers detail:
 it-pc.anon-ygMmS.domain:
  NetBird IP: 100.111.52.41
  Public key: hSFhlgAYUf/U3c8pJkb6pA1Iuqww/niannR07e1H5Fs=
  Status: Disconnected
  -- detail --
  Connection type: 
  ICE candidate (Local/Remote): -/-
  ICE candidate endpoints (Local/Remote): -/-
  Relay server address: 
  Last connection update: 17 minutes, 31 seconds ago
  Last WireGuard handshake: -
  Transfer status (received/sent) 0 B/0 B
  Quantum resistance: false
  Routes: -
  Latency: 775.129µs

 tm-1.anon-ygMmS.domain:
  NetBird IP: 100.111.56.189
  Public key: 6div7rjJkye7EYiqOZGqISzDqheaSxuyQb04UYqa0mc=
  Status: Disconnected
  -- detail --
  Connection type: 
  ICE candidate (Local/Remote): -/-
  ICE candidate endpoints (Local/Remote): -/-
  Relay server address: 
  Last connection update: -
  Last WireGuard handshake: -
  Transfer status (received/sent) 0 B/0 B
  Quantum resistance: false
  Routes: -
  Latency: 0s

 test-laptop.anon-ygMmS.domain:
  NetBird IP: 100.111.65.128
  Public key: VRH5TEo9QOxBHwt1lgMfUQT32hx7pVJ24qdawTkau3s=
  Status: Disconnected
  -- detail --
  Connection type: 
  ICE candidate (Local/Remote): -/-
  ICE candidate endpoints (Local/Remote): -/-
  Relay server address: 
  Last connection update: -
  Last WireGuard handshake: -
  Transfer status (received/sent) 0 B/0 B
  Quantum resistance: false
  Routes: -
  Latency: 0s

 server-mix.anon-ygMmS.domain:
  NetBird IP: 100.111.134.235
  Public key: uM4b+UxO0me/p4SLGONh/vXZEwy4y3mB14U1+nPGVBo=
  Status: Connected
  -- detail --
  Connection type: P2P
  ICE candidate (Local/Remote): host/host
  ICE candidate endpoints (Local/Remote): 172.16.1.102:51820/172.16.1.17:51820
  Relay server address: rels://overlay-network.anon-MzLdE.domain:443
  Last connection update: 1 hour, 11 minutes ago
  Last WireGuard handshake: 1 minute, 34 seconds ago
  Transfer status (received/sent) 20.5 KiB/22.8 KiB
  Quantum resistance: false
  Routes: -
  Latency: 254.39µs

 m1p.anon-ygMmS.domain:
  NetBird IP: 100.111.173.203
  Public key: PgDYOwhcZAbpM6h2BYEEaCv0tOOwxdjU0ZAwY3vqtXM=
  Status: Disconnected
  -- detail --
  Connection type: 
  ICE candidate (Local/Remote): -/-
  ICE candidate endpoints (Local/Remote): -/-
  Relay server address: 
  Last connection update: -
  Last WireGuard handshake: -
  Transfer status (received/sent) 0 B/0 B
  Quantum resistance: false
  Routes: -
  Latency: 0s

OS: linux/amd64
Daemon version: 0.30.1
CLI version: 0.30.1
Management: Connected to https://overlay-network.anon-MzLdE.domain:443
Signal: Connected to https://overlay-network.anon-MzLdE.domain:443
Relays: 
  [stun:overlay-network.anon-MzLdE.domain:3478] is Available
  [turn:overlay-network.anon-MzLdE.domain:3478?transport=udp] is Available
  [rels://overlay-network.anon-MzLdE.domain:443] is Available
Nameservers: 
  [100.111.134.235:53] for [anon-MzLdE.domain] is Available
FQDN: test-outline.anon-ygMmS.domain
NetBird IP: 100.111.170.31/16
Interface type: Kernel
Quantum resistance: false
Routes: -
Peers count: 1/5 

Screenshots

Untitled

Additional context

I am using Netbird version 0.30.1, with SSO using Authentik, a Postgres database and Caddy as the reverse proxy.

When I downgrade to version 0.29.4, there are no errors at all and everything works normally.

@Marcus1Pierce
Copy link
Author

And when I add peers to the group in version 0.29.4, everything works normally.

Untitled2

@mgarces
Copy link
Contributor

mgarces commented Oct 16, 2024

hello,

And when I add peers to the group in version 0.29.4, everything works normally.

What version are you referring to? The test-outline peer? The screenshot shows that the version is still 0.30.1

@mgarces
Copy link
Contributor

mgarces commented Oct 16, 2024

Which version of PostgreSQL are you using?

@Marcus1Pierce
Copy link
Author

@mgarces I'm using Postgres 16 alpine on docker

@Marcus1Pierce
Copy link
Author

@mgarces Sorry i didn't notice your first comment. I'm referring to management server. On client, it doesn't matter if it's version 0.30.1 i can still add that peers to group if management server have version 0.29.4.

@bcmmbaga
Copy link
Contributor

@Marcus1Pierce We were able to reproduce this, and we will fix this issue in the next release. Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants