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

Crash Gitea After Update #21099

Closed
tahaghafuri opened this issue Sep 7, 2022 · 12 comments
Closed

Crash Gitea After Update #21099

tahaghafuri opened this issue Sep 7, 2022 · 12 comments
Labels

Comments

@tahaghafuri
Copy link

tahaghafuri commented Sep 7, 2022

Description

I Updated Gitea v 1.17.1 To 1.17.2,After Update,Gitea Crashed And Don't Run.
I checked All Configs,Cannot Find Error.
(app.ini fixed,firewall,service,. . . )

Please Help Me.

Gitea Version

1.17.2

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

(https://gist.github.com/tahaghafuri/3c9602594f70e24ef834472be0868f1f)

Screenshots

No response

Git Version

latest

Operating System

ubuntu

How are you running Gitea?

systemd

Database

MySQL

@techknowlogick
Copy link
Member

Hi, Please see the link in the form you submitted for the logs we need. What was submitted doesn't tell us anything.

I will close this now, but please re-open if you are able to submit detailed logs.

@techknowlogick techknowlogick closed this as not planned Won't fix, can't repro, duplicate, stale Sep 7, 2022
@dvgoyeneche
Copy link

Same problem, in ubuntu 20.04.1 LTS

Loaded: loaded (/etc/systemd/system/gitea.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2022-09-07 08:31:57 +0430; 1s ago
Process: 5262 ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini (code=exited, status=1/FAILURE)
Main PID: 5262 (code=exited, status=1/FAILURE)

@techknowlogick
Copy link
Member

Again, we need detailed logs. All that we've been provided is systemd saying that the process failed but not why.

@wxiaoguang
Copy link
Contributor

Use journalctl to collect systemd logs.

@dvgoyeneche
Copy link

sep 07 08:44:51 GITserver gitea[2767]: 2022/09/07 08:44:51 cmd/web.go:95:func1() [F] PANIC: template: base/footer:15: function "MD5" not defined
sep 07 08:44:51 GITserver gitea[2767]: /usr/local/go/src/html/template/template.go:374 (0x15cdbd5)
sep 07 08:44:51 GITserver gitea[2767]: /go/pkg/mod/github.com/unrolled/[email protected]/render.go:322 (0x15cdae9)
sep 07 08:44:51 GITserver gitea[2767]: /go/pkg/mod/github.com/unrolled/[email protected]/render.go:202 (0x15ccc86)
sep 07 08:44:51 GITserver gitea[2767]: /go/pkg/mod/github.com/unrolled/[email protected]/render.go:146 (0x15cc7c4)
sep 07 08:44:51 GITserver gitea[2767]: /source/modules/templates/base.go:86 (0x167eeb5)
sep 07 08:44:51 GITserver gitea[2767]: /source/routers/web/base.go:127 (0x218c758)
sep 07 08:44:51 GITserver gitea[2767]: /source/routers/web/web.go:123 (0x218f41e)
sep 07 08:44:51 GITserver gitea[2767]: /source/routers/init.go:174 (0x21ac784)
sep 07 08:44:51 GITserver gitea[2767]: /source/cmd/web.go:177 (0x228fd4d)
sep 07 08:44:51 GITserver gitea[2767]: /go/pkg/mod/github.com/urfave/[email protected]/app.go:524 (0x1be3ce7)
sep 07 08:44:51 GITserver gitea[2767]: /go/pkg/mod/github.com/urfave/[email protected]/command.go:173 (0x1be4ad1)
sep 07 08:44:51 GITserver gitea[2767]: /go/pkg/mod/github.com/urfave/[email protected]/app.go:277 (0x1be1346)
sep 07 08:44:51 GITserver gitea[2767]: /source/main.go:116 (0x22cc598)
sep 07 08:44:51 GITserver gitea[2767]: /usr/local/go/src/runtime/proc.go:250 (0x43f2d1)
sep 07 08:44:51 GITserver gitea[2767]: /usr/local/go/src/runtime/asm_amd64.s:1571 (0x4700c0)

@techknowlogick
Copy link
Member

[F] PANIC: template: base/footer:15: function "MD5" not defined

Please review your custom templates

@tahaghafuri
Copy link
Author

Log:
[F] Gitea is not supposed to be run as root. Sorry. If you need to use privileged TCP ports please instead use setcap and the cap_net_bind_service permission

@tahaghafuri
Copy link
Author

and i'm restart service,log:
root@plesk:~# systemctl status gitea
● gitea.service - Gitea (Git with a cup of tea)
Loaded: loaded (/etc/systemd/system/gitea.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2022-09-07 13:14:05 +0430; 1s ago
Process: 105160 ExecStart=/usr/local/bin/gitea web --config /etc/gitea/app.ini (code=exited, status=1/FAILURE)
Main PID: 105160 (code=exited, status=1/FAILURE)

@wxiaoguang
Copy link
Contributor

Use journalctl to collect systemd logs.

@s-s
Copy link

s-s commented Sep 7, 2022

Experienced the same after updating to 1.17.2 with function "MD5" not defined error in logs. Problem was with my local outdated templates, fixed by replacing {{MD5 AppVer}} to {{AssetVersion}} there.

Would be great to see such not backward-compatible changes in minor releases, not in patch releases.

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Sep 7, 2022

@s-s sorry for the inconvenience, it's not done by purpose 😭

@zeripath
Copy link
Contributor

zeripath commented Sep 7, 2022

Yup we made an accidental breaking change when we removed this now unused function.

Update your templates now so you're not affected when 1.18 is released.

lunny pushed a commit that referenced this issue Sep 7, 2022
…#21101)

Many users (#21099) do not know how to collect logs if they are using
systemd. This PR makes the document more clear.
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants