mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-04-25 16:55:56 +03:00
[GH-ISSUE #673] beta.38 - nginx-ui wont start anymore #3443
Labels
No labels
Q/A
bug
casdoor
dependencies
docker
documentation
duplicate
enhancement
help wanted
invalid
lego
platform:openwrt
platform:windows
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-ui#3443
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jiriteach on GitHub (Oct 28, 2024).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/673
Upgraded to beta.38 and the update hung.
Checked the service and it was stopped. Trying to restart - just errors.
How do I restart? I tried re-installing and no luck either.
Here is the log from /var/log/syslog
Looks like the error -
2024-10-28T23:29:38.003289+13:00 moober nginx-ui[51777]: 2024-10-28 23:29:38#011FATAL#011model/model.go:76#011UNIQUE constraint failed: sites.path@0xJacky commented on GitHub (Oct 28, 2024):
Hi @jiriteach, If you have an SQLite editor, open the database.db under /usr/local/etc/nginx-ui, clear the sites table, and restart the nginx-ui. Normally, this issue should not happend.
@jiriteach commented on GitHub (Oct 28, 2024):
Perfect - thanks. Looks like its worked. Will run some tests.
@jiriteach commented on GitHub (Oct 28, 2024):
Re-opened this as it is a bug. The fix you mentioned above works and my main instance is working fine after clearing the sites table.
Trying on my backup instance going from beta.36 > beta.38. Stuck on ~ 80%. Performing core upgrade.
systemctl status nginx-ui and its failed with the same errors as I posted above.
Its an almost replica of my main instance. Looks like I will have to clear the sites table on this one as well but I might just revert to a previous snapshot and can re-test when the bug is fixed.
@0xJacky commented on GitHub (Oct 28, 2024):
Yes, I added a unique constraint in
github.com/0xJacky/nginx-ui@bb02d7be77/model/site.go (L5)since beta.37.
If the sites table has more than one row with the same path, the db migration will fail, so you have to clear the table manaully.
@0xJacky commented on GitHub (Oct 28, 2024):
This problem may be caused by the soft delete introduced in the previous version, I'm sorry about that.
@jiriteach commented on GitHub (Oct 28, 2024):
No worries - is there any issue with clearing the sites table? Does it have any affect? I see all my sites look fine so clearing it didnt break anything?
@0xJacky commented on GitHub (Oct 28, 2024):
No side effects if the database is created in previous versions.
If you clear the database since beta.37, you will lose the category and the sync nodes settings of the site.