[GH-ISSUE #5398] Unable to delete Peer when was previously in Proxy Service config #11365

Closed
opened 2026-08-05 01:29:27 -04:00 by saavagebueno · 8 comments
Owner

Originally created by @gav1nall3n on GitHub (Feb 19, 2026).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/5398

Describe the problem

Unable to delete a peer that was part of reverse proxy config. The peer was a Netbird sidecar for a service that was added to the new reverse proxy configuration. The reverse proxy service has been removed, but deleting the peer gives:

Code 412: Peer d68v7prk8vos73edapag is in use by proxy d68vitbk8vos73edar50

To Reproduce

Steps to reproduce the behavior:
Remove a reverse proxy service. Attempt to remove the peer from netbird console.

Expected behavior

Peer should delete successfully if the proxy service has been removed.

Are you using NetBird Cloud?

Self-Hosted

NetBird version

0.65.2

No

If yes, which one?

NA

To help us resolve the problem, please attach the following anonymized status output

debian@satoshi:/opt/stacks/netbird-selfhosted$ netbird status -dA
Peers detail:
nakamoto.anon-WNLej.domain:
NetBird IP: 100.69.2.100
Public key: fkI33tRLvay5VNzOVOyhzeVxm6c4Kb3lh7AbhzV2pyI=
Status: Connected
-- detail --
Connection type: P2P
ICE candidate (Local/Remote): host/host
ICE candidate endpoints (Local/Remote): 198.51.100.0:51820/198.51.100.1:51820
Relay server address:
Last connection update: 1 day, 6 hours ago
Last WireGuard handshake: 55 seconds ago
Transfer status (received/sent) 210.2 KiB/143.1 KiB
Quantum resistance: false
Networks: -
Latency: 12.633658ms

debian.anon-WNLej.domain:
NetBird IP: 100.69.58.139
Public key: ceQ5DKjr/byQx3y05lo004EnUztyd0bovM4EHQ6loEo=
Status: Connected
-- detail --
Connection type: P2P
ICE candidate (Local/Remote): host/prflx
ICE candidate endpoints (Local/Remote): 100:::51820/100::1:51820
Relay server address: rels://netbird.anon-vVER8.domain:443
Last connection update: 1 day, 8 hours ago
Last WireGuard handshake: 1 minute, 49 seconds ago
Transfer status (received/sent) 2.9 MiB/5.2 MiB
Quantum resistance: false
Networks: -
Latency: 46.387476ms

halfinney.anon-WNLej.domain:
NetBird IP: 100.69.90.81
Public key: wWLFoj35u8Gvx6qPTzjKMPUe5mZTDx7gYBz4lg3lD2U=
Status: Connected
-- detail --
Connection type: P2P
ICE candidate (Local/Remote): host/host
ICE candidate endpoints (Local/Remote): 100:::51820/100::2:51820
Relay server address: rels://netbird.anon-vVER8.domain:443
Last connection update: 8 minutes, 17 seconds ago
Last WireGuard handshake: 21 seconds ago
Transfer status (received/sent) 107.7 KiB/73.5 KiB
Quantum resistance: false
Networks: -
Latency: 6.135944ms

arcane.anon-WNLej.domain:
NetBird IP: 100.69.121.82
Public key: QP6Z7xEN05QNbU1ipJPKW/VZ0NKr6DfpBRIcevCyrVs=
Status: Connecting
-- detail --
Connection type: -
ICE candidate (Local/Remote): -/-
ICE candidate endpoints (Local/Remote): -/-
Relay server address:
Last connection update: 1 day, 23 hours ago
Last WireGuard handshake: -
Transfer status (received/sent) 0 B/0 B
Quantum resistance: false
Networks: -
Latency: 0s

beelink-ser5.anon-WNLej.domain:
NetBird IP: 100.69.233.149
Public key: gob8jmgOngYCqn9JThsYiXA1Ag/79B5oiTpz0ixK5jA=
Status: Connected
-- detail --
Connection type: P2P
ICE candidate (Local/Remote): host/host
ICE candidate endpoints (Local/Remote): 100:::51820/100::3:51820
Relay server address: rels://netbird.anon-vVER8.domain:443
Last connection update: 54 minutes, 24 seconds ago
Last WireGuard handshake: 1 minute ago
Transfer status (received/sent) 3.3 MiB/9.0 MiB
Quantum resistance: false
Networks: -
Latency: 80.725118ms

Events:
[INFO] SYSTEM (e94a73bf-284f-4bb6-afe4-3383ddaeee8e)
Message: Network map updated
Time: 57 minutes, 28 seconds ago
[INFO] SYSTEM (a349ae43-3e4c-42ed-b7ae-65fc524b9bb5)
Message: Network map updated
Time: 54 minutes, 31 seconds ago
[INFO] SYSTEM (033f13fa-f5b1-43f5-a985-7878dd84b18d)
Message: Network map updated
Time: 54 minutes, 29 seconds ago
[INFO] SYSTEM (17750214-2f25-4ab6-b659-877c61631d16)
Message: Network map updated
Time: 54 minutes, 27 seconds ago
[INFO] SYSTEM (9d7ebfe5-5f72-49e2-b6db-3541f2340b76)
Message: Network map updated
Time: 51 minutes, 52 seconds ago
[INFO] SYSTEM (1584da5d-2179-44ee-9abf-02ecddfaeae7)
Message: Network map updated
Time: 51 minutes, 50 seconds ago
[INFO] SYSTEM (64d806c2-629f-48b2-b984-f911d6b438fe)
Message: Network map updated
Time: 44 minutes, 32 seconds ago
[INFO] SYSTEM (fff83bad-ce6d-4bde-81c0-1e384cae5f87)
Message: Network map updated
Time: 35 minutes, 21 seconds ago
[INFO] SYSTEM (9363cb0a-6a14-448a-9d7a-965b45d89754)
Message: Network map updated
Time: 12 minutes, 48 seconds ago
[INFO] SYSTEM (7a10230c-ca18-4989-bf6b-6426abe76bea)
Message: Network map updated
Time: 8 minutes, 11 seconds ago
OS: linux/amd64
Daemon version: 0.65.1
CLI version: 0.65.1
Profile: default
Management: Connected to https://netbird.anon-vVER8.domain:443
Signal: Connected to https://netbird.anon-vVER8.domain:443
Relays:
[stun:netbird.anon-vVER8.domain:3478] is Available
[rels://netbird.anon-vVER8.domain:443] is Available
Nameservers:
FQDN: satoshi.anon-WNLej.domain
NetBird IP: 100.69.223.169/16
Interface type: Kernel
Quantum resistance: false
Lazy connection: false
SSH Server: Disabled
Networks: -
Peers count: 4/5 Connected

Create and upload a debug bundle, and share the returned file key:

6ac746539e63ecf84e5d1fc5faf2cc6466bbde53e94c0c3ecaf4b880ce648773/c0a17303-d75b-4eb9-9b88-06ad163571b4

Uploaded files are automatically deleted after 30 days.

Alternatively, create the file only and attach it here manually:

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

Have you tried these troubleshooting steps?

  • [X ] Reviewed client troubleshooting (if applicable)
  • [X ] Checked for newer NetBird versions
  • [X ] Searched for similar issues on GitHub (including closed ones)
  • [ X] Restarted the NetBird client
  • [X ] Disabled other VPN software
  • [X ] Checked firewall settings
Originally created by @gav1nall3n on GitHub (Feb 19, 2026). Original GitHub issue: https://github.com/netbirdio/netbird/issues/5398 **Describe the problem** Unable to delete a peer that was part of reverse proxy config. The peer was a Netbird sidecar for a service that was added to the new reverse proxy configuration. The reverse proxy service has been removed, but deleting the peer gives: Code 412: Peer d68v7prk8vos73edapag is in use by proxy d68vitbk8vos73edar50 **To Reproduce** Steps to reproduce the behavior: Remove a reverse proxy service. Attempt to remove the peer from netbird console. **Expected behavior** Peer should delete successfully if the proxy service has been removed. **Are you using NetBird Cloud?** Self-Hosted **NetBird version** 0.65.2 No If yes, which one? NA To help us resolve the problem, please attach the following anonymized status output debian@satoshi:/opt/stacks/netbird-selfhosted$ netbird status -dA Peers detail: nakamoto.anon-WNLej.domain: NetBird IP: 100.69.2.100 Public key: fkI33tRLvay5VNzOVOyhzeVxm6c4Kb3lh7AbhzV2pyI= Status: Connected -- detail -- Connection type: P2P ICE candidate (Local/Remote): host/host ICE candidate endpoints (Local/Remote): 198.51.100.0:51820/198.51.100.1:51820 Relay server address: Last connection update: 1 day, 6 hours ago Last WireGuard handshake: 55 seconds ago Transfer status (received/sent) 210.2 KiB/143.1 KiB Quantum resistance: false Networks: - Latency: 12.633658ms debian.anon-WNLej.domain: NetBird IP: 100.69.58.139 Public key: ceQ5DKjr/byQx3y05lo004EnUztyd0bovM4EHQ6loEo= Status: Connected -- detail -- Connection type: P2P ICE candidate (Local/Remote): host/prflx ICE candidate endpoints (Local/Remote): 100:::51820/100::1:51820 Relay server address: rels://netbird.anon-vVER8.domain:443 Last connection update: 1 day, 8 hours ago Last WireGuard handshake: 1 minute, 49 seconds ago Transfer status (received/sent) 2.9 MiB/5.2 MiB Quantum resistance: false Networks: - Latency: 46.387476ms halfinney.anon-WNLej.domain: NetBird IP: 100.69.90.81 Public key: wWLFoj35u8Gvx6qPTzjKMPUe5mZTDx7gYBz4lg3lD2U= Status: Connected -- detail -- Connection type: P2P ICE candidate (Local/Remote): host/host ICE candidate endpoints (Local/Remote): 100:::51820/100::2:51820 Relay server address: rels://netbird.anon-vVER8.domain:443 Last connection update: 8 minutes, 17 seconds ago Last WireGuard handshake: 21 seconds ago Transfer status (received/sent) 107.7 KiB/73.5 KiB Quantum resistance: false Networks: - Latency: 6.135944ms arcane.anon-WNLej.domain: NetBird IP: 100.69.121.82 Public key: QP6Z7xEN05QNbU1ipJPKW/VZ0NKr6DfpBRIcevCyrVs= Status: Connecting -- detail -- Connection type: - ICE candidate (Local/Remote): -/- ICE candidate endpoints (Local/Remote): -/- Relay server address: Last connection update: 1 day, 23 hours ago Last WireGuard handshake: - Transfer status (received/sent) 0 B/0 B Quantum resistance: false Networks: - Latency: 0s beelink-ser5.anon-WNLej.domain: NetBird IP: 100.69.233.149 Public key: gob8jmgOngYCqn9JThsYiXA1Ag/79B5oiTpz0ixK5jA= Status: Connected -- detail -- Connection type: P2P ICE candidate (Local/Remote): host/host ICE candidate endpoints (Local/Remote): 100:::51820/100::3:51820 Relay server address: rels://netbird.anon-vVER8.domain:443 Last connection update: 54 minutes, 24 seconds ago Last WireGuard handshake: 1 minute ago Transfer status (received/sent) 3.3 MiB/9.0 MiB Quantum resistance: false Networks: - Latency: 80.725118ms Events: [INFO] SYSTEM (e94a73bf-284f-4bb6-afe4-3383ddaeee8e) Message: Network map updated Time: 57 minutes, 28 seconds ago [INFO] SYSTEM (a349ae43-3e4c-42ed-b7ae-65fc524b9bb5) Message: Network map updated Time: 54 minutes, 31 seconds ago [INFO] SYSTEM (033f13fa-f5b1-43f5-a985-7878dd84b18d) Message: Network map updated Time: 54 minutes, 29 seconds ago [INFO] SYSTEM (17750214-2f25-4ab6-b659-877c61631d16) Message: Network map updated Time: 54 minutes, 27 seconds ago [INFO] SYSTEM (9d7ebfe5-5f72-49e2-b6db-3541f2340b76) Message: Network map updated Time: 51 minutes, 52 seconds ago [INFO] SYSTEM (1584da5d-2179-44ee-9abf-02ecddfaeae7) Message: Network map updated Time: 51 minutes, 50 seconds ago [INFO] SYSTEM (64d806c2-629f-48b2-b984-f911d6b438fe) Message: Network map updated Time: 44 minutes, 32 seconds ago [INFO] SYSTEM (fff83bad-ce6d-4bde-81c0-1e384cae5f87) Message: Network map updated Time: 35 minutes, 21 seconds ago [INFO] SYSTEM (9363cb0a-6a14-448a-9d7a-965b45d89754) Message: Network map updated Time: 12 minutes, 48 seconds ago [INFO] SYSTEM (7a10230c-ca18-4989-bf6b-6426abe76bea) Message: Network map updated Time: 8 minutes, 11 seconds ago OS: linux/amd64 Daemon version: 0.65.1 CLI version: 0.65.1 Profile: default Management: Connected to https://netbird.anon-vVER8.domain:443 Signal: Connected to https://netbird.anon-vVER8.domain:443 Relays: [stun:netbird.anon-vVER8.domain:3478] is Available [rels://netbird.anon-vVER8.domain:443] is Available Nameservers: FQDN: satoshi.anon-WNLej.domain NetBird IP: 100.69.223.169/16 Interface type: Kernel Quantum resistance: false Lazy connection: false SSH Server: Disabled Networks: - Peers count: 4/5 Connected Create and upload a debug bundle, and share the returned file key: 6ac746539e63ecf84e5d1fc5faf2cc6466bbde53e94c0c3ecaf4b880ce648773/c0a17303-d75b-4eb9-9b88-06ad163571b4 *Uploaded files are automatically deleted after 30 days.* Alternatively, create the file only and attach it here manually: **Screenshots** If applicable, add screenshots to help explain your problem. **Additional context** Add any other context about the problem here. **Have you tried these troubleshooting steps?** - [X ] Reviewed [client troubleshooting](https://docs.netbird.io/how-to/troubleshooting-client) (if applicable) - [X ] Checked for newer NetBird versions - [X ] Searched for similar issues on GitHub (including closed ones) - [ X] Restarted the NetBird client - [X ] Disabled other VPN software - [X ] Checked firewall settings
saavagebueno added the triage-needed label 2026-08-05 01:29:27 -04:00
Author
Owner

@pascal-fischer commented on GitHub (Feb 20, 2026):

Hi @gav1nall3n can you check the DB.
SELECT * FROM services WHERE id='d68vitbk8vos73edar50';
It looks like the service config still exists?

<!-- gh-comment-id:3934685780 --> @pascal-fischer commented on GitHub (Feb 20, 2026): Hi @gav1nall3n can you check the DB. `SELECT * FROM services WHERE id='d68vitbk8vos73edar50';` It looks like the service config still exists?
Author
Owner

@Nilox42 commented on GitHub (Feb 20, 2026):

I have the same problem.

<!-- gh-comment-id:3936223049 --> @Nilox42 commented on GitHub (Feb 20, 2026): I have the same problem.
Author
Owner

@pascal-fischer commented on GitHub (Feb 21, 2026):

Ah I think I know what it is. You are all using sqlite DB right?

<!-- gh-comment-id:3938438176 --> @pascal-fischer commented on GitHub (Feb 21, 2026): Ah I think I know what it is. You are all using sqlite DB right?
Author
Owner

@gav1nall3n commented on GitHub (Feb 21, 2026):

Yes, believe so. Quickstart script deployment. Away from home without laptop until Mon so can run any tests/actions when back.

Thanks guys, the new reverse proxy service functionality is a massive unlock. Especially combined with the authentication options.

<!-- gh-comment-id:3938501119 --> @gav1nall3n commented on GitHub (Feb 21, 2026): Yes, believe so. Quickstart script deployment. Away from home without laptop until Mon so can run any tests/actions when back. Thanks guys, the new reverse proxy service functionality is a massive unlock. Especially combined with the authentication options.
Author
Owner

@gav1nall3n commented on GitHub (Feb 23, 2026):

SELECT * FROM services WHERE id='d68vitbk8vos73edar50'; returns nothing

SELECT * FROM services returns results for the three services I have configured on the reverse proxy presently.

<!-- gh-comment-id:3945126820 --> @gav1nall3n commented on GitHub (Feb 23, 2026): SELECT * FROM services WHERE id='d68vitbk8vos73edar50'; returns nothing SELECT * FROM services returns results for the three services I have configured on the reverse proxy presently.
Author
Owner

@pascal-fischer commented on GitHub (Feb 23, 2026):

I was wrong. The orphan should be in the targets table. The issue is that the cascading delete from the DB is not working on sqlite so we need an explicit cleanup when deleting a service.

<!-- gh-comment-id:3945460157 --> @pascal-fischer commented on GitHub (Feb 23, 2026): I was wrong. The orphan should be in the `targets` table. The issue is that the cascading delete from the DB is not working on sqlite so we need an explicit cleanup when deleting a service.
Author
Owner

@gav1nall3n commented on GitHub (Feb 24, 2026):

Will the fix retroactively remove the ghost entries or will the db need manual intervention?

<!-- gh-comment-id:3949250220 --> @gav1nall3n commented on GitHub (Feb 24, 2026): Will the fix retroactively remove the ghost entries or will the db need manual intervention?
Author
Owner

@Skinner927 commented on GitHub (Apr 8, 2026):

For those who have come here in search of a solution. I needed to deregister but was blocked with the following error:

Error: deregister: rpc error: code = FailedPrecondition desc = logout: rpc error: code = FailedPrecondition desc = peer d63d7rq7i96000boni30 is in use by proxy d6no0hacoh2g00cug3bg

This fixed it:

Update your target_id below to the "peer" ID in the error message.

sqlite3 /var/lib/docker/volumes/root_netbird_management/_data/store.db \
  'DELETE FROM targets WHERE target_id = "d63d7rq7i96000boni30";'
<!-- gh-comment-id:4208018942 --> @Skinner927 commented on GitHub (Apr 8, 2026): For those who have come here in search of a solution. I needed to deregister but was blocked with the following error: ``` Error: deregister: rpc error: code = FailedPrecondition desc = logout: rpc error: code = FailedPrecondition desc = peer d63d7rq7i96000boni30 is in use by proxy d6no0hacoh2g00cug3bg ``` This fixed it: Update your `target_id` below to the "peer" ID in the error message. ``` sqlite3 /var/lib/docker/volumes/root_netbird_management/_data/store.db \ 'DELETE FROM targets WHERE target_id = "d63d7rq7i96000boni30";' ```
Sign in to join this conversation.
No Label triage-needed
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#11365