gitea_ynh icon indicating copy to clipboard operation
gitea_ynh copied to clipboard

Cannot restore Gitea

Open tio-trom opened this issue 2 months ago • 2 comments

Using a Dedicated Server. The full log here - https://paste.yunohost.org/raw/nolikadoru

2025-09-16 10:32:50,421: WARNING - Please find here an extract of the end of the log of the service gitea:
2025-09-16 10:32:50,423: DEBUG - + ynh_print_warn 'The service gitea didn'\''t fully executed the action start before the timeout.'
2025-09-16 10:32:50,424: DEBUG - + ynh_print_warn 'Please find here an extract of the end of the log of the service gitea:'
2025-09-16 10:32:50,424: DEBUG - + journalctl --quiet --no-hostname --no-pager --lines=20 --unit=gitea
2025-09-16 10:32:50,430: WARNING - Sep 16 10:27:50 gitea[12616]: 2025/09/16 10:27:50 cmd/web.go:207:serveInstalled() [W] Table gpg_key Column content db nullable is true, struct nullable is false
2025-09-16 10:32:50,430: WARNING - Sep 16 10:27:50 gitea[12616]: 2025/09/16 10:27:50 cmd/web.go:207:serveInstalled() [W] Table gpg_key_import Column content db nullable is true, struct nullable is false
2025-09-16 10:32:50,432: DEBUG - + '[' -e /var/log/gitea/gitea.log ']'
2025-09-16 10:32:50,433: WARNING - Sep 16 10:27:50 gitea[12616]: 2025/09/16 10:27:50 cmd/web.go:207:serveInstalled() [W] Table public_key Column content db nullable is true, struct nullable is false
2025-09-16 10:32:50,433: DEBUG - + ynh_print_warn ===
2025-09-16 10:32:50,434: WARNING - Sep 16 10:27:50 gitea[12616]: 2025/09/16 10:27:50 cmd/web.go:207:serveInstalled() [W] Table project column board_type db type is INT(10) UNSIGNED, struct type is INT UNSIGNED
2025-09-16 10:32:50,436: DEBUG - + echo ===
2025-09-16 10:32:50,436: WARNING - Sep 16 10:27:50 gitea[12616]: 2025/09/16 10:27:50 cmd/web.go:207:serveInstalled() [W] Table project column card_type db type is INT(11), struct type is INT UNSIGNED
2025-09-16 10:32:50,437: DEBUG - + tail --lines=20 /var/log/gitea/gitea.log
2025-09-16 10:32:50,437: WARNING - Sep 16 10:27:50 gitea[12616]: 2025/09/16 10:27:50 cmd/web.go:207:serveInstalled() [W] Table project Column card_type db default is 0, struct default is
2025-09-16 10:32:50,440: DEBUG - + '[' start == reload ']'
2025-09-16 10:32:50,440: WARNING - Sep 16 10:27:50 gitea[12616]: 2025/09/16 10:27:50 cmd/web.go:207:serveInstalled() [W] Table project Column card_type db nullable is false, struct nullable is true
2025-09-16 10:32:50,440: DEBUG - + '[' start == start ']'
2025-09-16 10:32:50,441: WARNING - Sep 16 10:27:50 gitea[12616]: 2025/09/16 10:27:50 cmd/web.go:207:serveInstalled() [W] Table project column type db type is INT(10) UNSIGNED, struct type is INT UNSIGNED
2025-09-16 10:32:50,443: DEBUG - + _ynh_clean_check_starting
2025-09-16 10:32:50,444: WARNING - Sep 16 10:27:50 gitea[12616]: 2025/09/16 10:27:50 cmd/web.go:207:serveInstalled() [W] Table review_state Column commit_sha db nullable is true, struct nullable is false
2025-09-16 10:32:50,444: DEBUG - + '[' -n 12611 ']'
2025-09-16 10:32:50,446: WARNING - Sep 16 10:27:50 gitea[12616]: 2025/09/16 10:27:50 cmd/web.go:207:serveInstalled() [W] Table label Column archived_unix db default is , struct default is NULL
2025-09-16 10:32:50,446: DEBUG - + kill -SIGTERM 12611
2025-09-16 10:32:50,448: WARNING - Sep 16 10:27:50 gitea[12616]: 2025/09/16 10:27:50 cmd/web.go:207:serveInstalled() [W] Table hook_task has column repo_id but struct has not related field
2025-09-16 10:32:50,448: DEBUG - + '[' -n /tmp/tmp.PifDw0wUth ']'
2025-09-16 10:32:50,450: WARNING - Sep 16 10:27:50 gitea[12616]: 2025/09/16 10:27:50 routers/init.go:145:InitWebInstalled() [I] ORM engine initialization successful!
2025-09-16 10:32:50,450: DEBUG - + ynh_safe_rm /tmp/tmp.PifDw0wUth
2025-09-16 10:32:50,452: WARNING - Sep 16 10:27:50 gitea[12616]: 2025/09/16 10:27:50 .../indexer/issues/indexer.go:77:InitIssueIndexer.1() [I] PID 12616: Initializing Issue Indexer: bleve
2025-09-16 10:32:50,452: DEBUG - + local target=/tmp/tmp.PifDw0wUth
2025-09-16 10:32:50,454: WARNING - Sep 16 10:27:50 gitea[12616]: 2025/09/16 10:27:50 .../indexer/stats/indexer.go:41:populateRepoIndexer() [I] Populating the repo stats indexer with existing repositories
2025-09-16 10:32:50,456: WARNING - Sep 16 10:27:50 gitea[12616]: 2025/09/16 10:27:50 .../indexer/stats/indexer.go:87:populateRepoIndexer() [I] Done (re)populating the repo stats indexer with existing repositories
2025-09-16 10:32:50,456: DEBUG - + return 1
2025-09-16 10:32:50,458: WARNING - Sep 16 10:27:50 gitea[12616]: 2025/09/16 10:27:50 .../indexer/issues/indexer.go:154:InitIssueIndexer.2() [I] Issue Indexer Initialization took 1.155264ms
2025-09-16 10:32:50,458: DEBUG - + ynh_exit_properly
2025-09-16 10:32:50,459: WARNING - Sep 16 10:27:50 gitea[12616]: 2025/09/16 10:27:50 cmd/web.go:323:listen() [I] Listen: http://127.0.0.1:6001
2025-09-16 10:32:50,461: WARNING - Sep 16 10:27:50 gitea[12616]: 2025/09/16 10:27:50 cmd/web.go:327:listen() [I] AppURL(ROOT_URL): https://git.domain2.tld/
2025-09-16 10:32:50,461: DEBUG - + [[ restore =~ ^install$|^upgrade$|^restore$ ]]
2025-09-16 10:32:50,463: WARNING - Sep 16 10:27:50 gitea[12616]: 2025/09/16 10:27:50 cmd/web.go:330:listen() [I] LFS server enabled
2025-09-16 10:32:50,465: WARNING - Sep 16 10:27:50 gitea[12616]: 2025/09/16 10:27:50 modules/graceful/server.go:50:NewServer() [I] Starting new Web server: tcp:127.0.0.1:6001 on PID: 12616
2025-09-16 10:32:50,467: WARNING - ===
2025-09-16 10:32:50,469: WARNING - 2025/09/14 03:21:49 routers/web/repo/commit.go:451:RawDiff() [E] GetRawDiff: Run: signal: killed -
2025-09-16 10:32:50,471: WARNING - 2025/09/14 03:27:16 routers/web/repo/commit.go:451:RawDiff() [E] GetRawDiff: Run: signal: killed -
2025-09-16 10:32:50,473: WARNING - 2025/09/14 03:34:10 services/gitdiff/gitdiff.go:1215:getDiffBasic.2() [E] error during GetDiff(git diff dir: /home/yunohost.app/gitea/repositories/tromjaro/iso-profiles-settings.git): io: read/write on closed pipe, stderr:
2025-09-16 10:32:50,475: WARNING - 2025/09/14 04:47:25 routers/web/repo/commit.go:451:RawDiff() [E] GetRawDiff: Run: signal: killed -
2025-09-16 10:32:50,475: WARNING - 2025/09/14 05:02:44 routers/web/repo/commit.go:451:RawDiff() [E] GetRawDiff: Run: signal: killed -
2025-09-16 10:32:50,477: WARNING - 2025/09/14 05:05:07 routers/web/repo/commit.go:451:RawDiff() [E] GetRawDiff: Run: signal: killed -
2025-09-16 10:32:50,477: WARNING - 2025/09/14 05:12:54 routers/web/repo/commit.go:451:RawDiff() [E] GetRawDiff: Run: signal: broken pipe -
2025-09-16 10:32:50,479: WARNING - 2025/09/14 05:33:43 routers/common/serve.go:33:ServeBlob.1() [E] ServeBlob: Close: io: read/write on closed pipe
2025-09-16 10:32:50,480: WARNING - 2025/09/14 10:53:49 routers/web/repo/commit.go:451:RawDiff() [E] GetRawDiff: Run: signal: killed -
2025-09-16 10:32:50,482: WARNING - 2025/09/14 12:40:34 routers/web/repo/commit.go:451:RawDiff() [E] GetRawDiff: Run: signal: killed -
2025-09-16 10:32:50,482: WARNING - 2025/09/14 13:21:04 routers/common/serve.go:33:ServeBlob.1() [E] ServeBlob: Close: io: read/write on closed pipe
2025-09-16 10:32:50,484: WARNING - 2025/09/14 16:45:25 routers/web/repo/commit.go:451:RawDiff() [E] GetRawDiff: Run: signal: killed -
2025-09-16 10:32:50,484: WARNING - 2025/09/14 16:45:28 routers/web/repo/commit.go:451:RawDiff() [E] GetRawDiff: Run: signal: killed -
2025-09-16 10:32:50,486: WARNING - 2025/09/14 16:45:40 routers/web/repo/commit.go:451:RawDiff() [E] GetRawDiff: Run: signal: killed -
2025-09-16 10:32:50,487: WARNING - 2025/09/14 16:53:30 routers/web/repo/commit.go:451:RawDiff() [E] GetRawDiff: Run: signal: killed -
2025-09-16 10:32:50,488: WARNING - 2025/09/14 16:53:54 routers/web/repo/commit.go:451:RawDiff() [E] GetRawDiff: Run: signal: killed -
2025-09-16 10:32:50,489: WARNING - 2025/09/14 16:56:51 routers/web/repo/commit.go:451:RawDiff() [E] GetRawDiff: Run: signal: killed -
2025-09-16 10:32:50,491: WARNING - 2025/09/14 17:11:28 routers/web/repo/commit.go:451:RawDiff() [E] GetRawDiff: Run: signal: killed -
2025-09-16 10:32:50,492: WARNING - 2025/09/14 17:17:08 routers/web/repo/commit.go:451:RawDiff() [E] GetRawDiff: Run: signal: killed -
2025-09-16 10:32:50,494: WARNING - 2025/09/14 17:25:36 routers/web/repo/commit.go:451:RawDiff() [E] GetRawDiff: Run: signal: killed -
2025-09-16 10:32:51,043: ERROR - Could not restore gitea: An error occured inside the app restore script

tio-trom avatar Sep 16 '25 08:09 tio-trom

Gets stuck at this

Restoring gitea…
Provisioning sources...
Provisioning system_user...
Provisioning install_dir...
Provisioning data_dir...
Provisioning permissions...
Provisioning ports...
Provisioning apt...
Provisioning database...
Restoring the app files...
Restoring the MySQL database...
Restoring system configurations related to gitea...
Configuring fail2ban...
The service fail2ban has correctly executed the action reload-or-restart.
Reloading NGINX web server and gitea's service...
(this may take some time)

And then it says it could not restore so it removes it. Is this a matter of not being able to start the service in time?

tio-trom avatar Sep 18 '25 21:09 tio-trom

created this PR to make the issue like this more easy to debug: https://github.com/YunoHost/yunohost/pull/2184

Josue-T avatar Sep 20 '25 10:09 Josue-T