mirror of
https://github.com/fosrl/pangolin.git
synced 2026-11-13 06:14:30 -06:00
Error on site deletion #638
Closed
opened 2025-11-13 12:06:28 -06:00 by GiteaMirror
·
8 comments
No Branch/Tag Specified
main
dependabot/npm_and_yarn/npm-dependencies-adef1355ca
dependabot/go_modules/install/go-install-dependencies-1560069833
1-27
dependabot/npm_and_yarn/node-forge-1.4.3
feat/sync-idp-user-dir
l10n_dev
dev
website-checkout
dependabot/github_actions/github-actions-dependencies-6e53f9d9a5
dependabot/npm_and_yarn/node-forge-1.4.2
dependabot/github_actions/github-actions-dependencies-0c219a018e
extern-ws
1.26.0
1.26.0-rc.0
1.25.3
1.25.2
1.25.1
1.25.0
1.25.0-rc.0
1.24.0
1.24.0-rc.0
1.23.0
1.23.0-rc.0
1.22.2
1.22.1
1.22.0
1.22.0-rc.0
1.21.1
1.21.0
1.21.0-rc.0
1.20.0
1.20.0-rc.0
1.19.4
1.19.3
1.19.2
1.19.1
1.19.0
1.19.0-rc.1
1.19.0-rc.0
1.18.4
1.18.3
1.18.2
1.18.1
1.18.0
1.18.0-rc.0
1.17.1
1.17.0
1.17.0-rc.0
1.16.2
1.16.1
1.16.0
1.16.0-rc.0
1.15.4
1.15.3
1.15.2
1.15.1
1.15.0
1.15.0-rc.0
1.14.1
1.14.0
1.14.0-rc.0
1.13.1
1.13.0
1.13.0-rc.0
1.12.3
1.12.2
1.12.1
1.12.0
1.12.0-rc.0
1.11.1
1.11.0
1.10.3
1.10.2
1.10.1
1.10.0
1.9.4
1.9.3
1.9.2
1.9.1
1.9.0
1.8.0
1.7.3
1.7.2
1.7.1
1.7.0
1.6.2
1.6.1
1.6.0
1.5.1
1.5.0
1.4.0
1.3.2
1.3.1
1.3.0
1.2.0
1.1.0
1.0.1
1.0.0
1.0.0-beta.15
1.0.0-beta.14
1.0.0-beta.13
1.0.0-beta.12
1.0.0-beta.11
1.0.0-beta.10
1.0.0-beta.9
1.0.0-beta.8
1.0.0-beta.7
1.0.0-beta.6
1.0.0-beta.5
1.0.0-beta.4
1.0.0-beta.3
1.0.0-beta.2
1.0.0-beta.1
Labels
Clear labels
api
authentication
bug
config
dependencies
docker
documentation
enhancement
good first issue
help wanted
Improvement
Look Into
needs investigating
networking
new feature
non-critical bug
potential bug
pull-request
question
reverse proxy
Security
stale
ui
wontfix
Mirrored from GitHub Pull Request
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/pangolin#638
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @tayvermtos on GitHub (Sep 2, 2025).
Hi
I have a Site set up on a self hosted Pangolin Instance. The associated Resources have been deleted. Just this particular site throws an error on deletion. The site has been offline for a while.
I cannot replicate on any other site. Tried to rename the Site as well but hasn't helped.
Below a screenshot of the error:
Many thanks!
@Pallavikumarimdb commented on GitHub (Sep 2, 2025):
Hi @tayvermtos , Can you check if the site you’re trying to delete is a WireGuard site?
For WireGuard, it call:
deletePeer(site.exitNodeId, site.pubKey)If the peer was already removed (for example, if the site has been offline for a while), this call can throw an error and stop the deletion.
@tayvermtos commented on GitHub (Sep 2, 2025):
Hi @Pallavikumarimdb
This is a NEWT site. I actually only use NEWT sites except for one local one of the server itself.
How would I be able to check if something has already been removed?
@oschwartz10612 is this something You're aware off?
Thanks a lot!
@oschwartz10612 commented on GitHub (Sep 2, 2025):
Hi! I just tested and was not able to reproduce but does not mean this
is not an issue.
Do you think you could take a look at the Pangolin logs?
docker compose logs -f
...and look for any errors that might be there when you get the
deletion? Also looking in the browser console would be helpful!
@tayvermtos commented on GitHub (Sep 2, 2025):
@oschwartz10612
These are the logs when attempting to delete the site:
pangolin | 2025-09-02T19:07:48.956Z [error]: FOREIGN KEY constraint failed pangolin | Stack: SqliteError: FOREIGN KEY constraint failed pangolin | at PreparedQuery.run (file:///app/node_modules/drizzle-orm/better-sqlite3/session.js:72:22) pangolin | at QueryPromise.resultCb (file:///app/node_modules/drizzle-orm/sqlite-core/session.js:119:64) pangolin | at QueryPromise.execute (file:///app/node_modules/drizzle-orm/sqlite-core/session.js:13:17) pangolin | at QueryPromise.then (file:///app/node_modules/drizzle-orm/query-promise.js:21:17) pangolin | at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {"code":"SQLITE_CONSTRAINT_FOREIGNK@tayvermtos commented on GitHub (Sep 2, 2025):
4869-8e44405bcc0f1a7d.js:1 Warning: MissingDescriptionoraria-describedby={undefined}for {DialogContent}. (anonymous) @ 4869-8e44405bcc0f1a7d.js:1 o0 @ 4bd1b696-cc729d47eba2cee4.js:1 ux @ 4bd1b696-cc729d47eba2cee4.js:1 uS @ 4bd1b696-cc729d47eba2cee4.js:1 ux @ 4bd1b696-cc729d47eba2cee4.js:1 3709-d44e79904b6f871c.js:1 DELETE https://mydomain/api/v1/site/18 500 (Internal Server Error) (anonymous) @ 3709-d44e79904b6f871c.js:1 xhr @ 3709-d44e79904b6f871c.js:1 e4 @ 3709-d44e79904b6f871c.js:1 _request @ 3709-d44e79904b6f871c.js:1 request @ 3709-d44e79904b6f871c.js:1 (anonymous) @ 3709-d44e79904b6f871c.js:1 (anonymous) @ 3709-d44e79904b6f871c.js:1 onConfirm @ page-382ab9df38a2ae0c.js:1 I @ page-382ab9df38a2ae0c.js:1 push.62177.e_ @ 1089-6c16de2ffd5d475f.js:1 await in push.62177.e_ i4 @ 4bd1b696-cc729d47eba2cee4.js:1 (anonymous) @ 4bd1b696-cc729d47eba2cee4.js:1 nz @ 4bd1b696-cc729d47eba2cee4.js:1 se @ 4bd1b696-cc729d47eba2cee4.js:1 cs @ 4bd1b696-cc729d47eba2cee4.js:1 cu @ 4bd1b696-cc729d47eba2cee4.js:1 page-382ab9df38a2ae0c.js:1 Error deleting site K {message: 'Request failed with status code 500', name: 'AxiosError', code: 'ERR_BAD_RESPONSE', config: {…}, request: XMLHttpRequest, …}code: "ERR_BAD_RESPONSE"config: {transitional: {…}, adapter: Array(3), transformRequest: Array(1), transformResponse: Array(1), timeout: 10000, …}message: "Request failed with status code 500"name: "AxiosError"request: XMLHttpRequest {onreadystatechange: null, readyState: 4, timeout: 10000, withCredentials: false, upload: XMLHttpRequestUpload, …}response: {data: {…}, status: 500, statusText: '', headers: eT, config: {…}, …}status: 500stack: "AxiosError: Request failed with status code 500\n at eC (https://mydomain/_next/static/chunks/3709-d44e79904b6f871c.js:1:18904)\n at XMLHttpRequest.g (https://mydomain/_next/static/chunks/3709-d44e79904b6f871c.js:1:23333)\n at tn.request (https://mydomain/_next/static/chunks/3709-d44e79904b6f871c.js:1:31457)"[[Prototype]]: Errorconstructor: ƒ K(e,t,r,n,o)toJSON: ƒ ()isAxiosError: true[[Prototype]]: Object (anonymous) @ page-382ab9df38a2ae0c.js:1 Promise.catch onConfirm @ page-382ab9df38a2ae0c.js:1 I @ page-382ab9df38a2ae0c.js:1 push.62177.e_ @ 1089-6c16de2ffd5d475f.js:1 await in push.62177.e_ i4 @ 4bd1b696-cc729d47eba2cee4.js:1 (anonymous) @ 4bd1b696-cc729d47eba2cee4.js:1 nz @ 4bd1b696-cc729d47eba2cee4.js:1 se @ 4bd1b696-cc729d47eba2cee4.js:1 cs @ 4bd1b696-cc729d47eba2cee4.js:1 cu @ 4bd1b696-cc729d47eba2cee4.js:1@Pallavikumarimdb commented on GitHub (Sep 2, 2025):
It looks like the error is happening because the site is still “linked” somewhere else in the system. Even if you don’t see it directly, there may still be a record saying this site belongs to a client, a role, or a user.
If that link is broken (for example, the client or user no longer exists but the system still has a note about the site), then deleting the site won’t work.
Line:
pangolin | 2025-09-02T19:07:48.956Z [error]: FOREIGN KEY constraint failed pangolin | Stack: SqliteError: FOREIGN KEYThe quickest way to check is:
@tayvermtos commented on GitHub (Sep 2, 2025):
Hi
Thanks for the hint. There was a raw UDP Source still assigned to the site which I totally forgot about. In fact the resource was disabled (toggled off). Moved that to a different site and managed to delete the site.
There is only one User and one Role on this particular instance....
Many thanks!
@oschwartz10612 commented on GitHub (Sep 2, 2025):
Thanks for the info. This should not cause the error as it should delete
the resource / target as well. Will look into this!