Error 500 #3122

Closed
opened 2025-11-02 05:01:20 -06:00 by GiteaMirror · 13 comments
Owner

Originally created by @balamut-andrey on GitHub (Mar 31, 2019).

  • Gitea version (or commit ref): 1.5.0-dev (?)
  • Git version: git version 2.11.0
  • Operating system: Debian 9
  • Database (use [x]):
    • PostgreSQL
    • MySQL (mysql Ver 15.1 Distrib 10.1.26-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2)
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

gitea.log:
2019/03/31 04:00:19 [...routers/user/auth.go:90 checkAutoLogin()] [E] AutoSignIn: GetUserByName: invalid connection

Description

New installation, 1 user, 0 repositories.
Appears in a variety of places. When you refresh the page, the error disappears.
I installed from source code.gitea,io, the domain is linked via nginx, there are no errors in nginx (error.log).

Help, please and sorry for my english.

Originally created by @balamut-andrey on GitHub (Mar 31, 2019). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.5.0-dev (?) - Git version: git version 2.11.0 - Operating system: Debian 9 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL (mysql Ver 15.1 Distrib 10.1.26-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2) - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: gitea.log: `2019/03/31 04:00:19 [...routers/user/auth.go:90 checkAutoLogin()] [E] AutoSignIn: GetUserByName: invalid connection` ## Description New installation, 1 user, 0 repositories. Appears in a variety of places. When you refresh the page, the error disappears. I installed from source code.gitea,io, the domain is linked via nginx, there are no errors in nginx (error.log). Help, please and sorry for my english.
GiteaMirror added the issue/stale label 2025-11-02 05:01:20 -06:00
Author
Owner

@balamut-andrey commented on GitHub (Mar 31, 2019):

2019/03/31 04:18:01 [...itea/routers/home.go:149 RenderRepoSearch()] [E] SearchRepositoryByName: Count: invalid connection

2019/03/31 04:22:09 [...ules/context/repo.go:305 func1()] [E] GetUserByName: invalid connection

@balamut-andrey commented on GitHub (Mar 31, 2019): `2019/03/31 04:18:01 [...itea/routers/home.go:149 RenderRepoSearch()] [E] SearchRepositoryByName: Count: invalid connection` `2019/03/31 04:22:09 [...ules/context/repo.go:305 func1()] [E] GetUserByName: invalid connection`
Author
Owner

@zeripath commented on GitHub (Mar 31, 2019):

Gitea 1.5 is now very old. Please could you update to 1.7.5. Our development is very rapid and there have been a number of security issues discovered since 1.5.

@zeripath commented on GitHub (Mar 31, 2019): Gitea 1.5 is now very old. Please could you update to 1.7.5. Our development is very rapid and there have been a number of security issues discovered since 1.5.
Author
Owner

@balamut-andrey commented on GitHub (Mar 31, 2019):

Yesterday I executed the code go get -d -u code.gitea.io/gitea command. So, I have an old version? Or is my version not 1.5.0-dev?

At the bottom of the page is written 1.5.0-dev.
Or where better to download? From here?
Here, too, the file https://github.com/go-gitea/gitea/blob/master/main.go says (line 27):

// Version holds the current Gitea version
var Version = "1.5.0-dev"

I'm confused.

@balamut-andrey commented on GitHub (Mar 31, 2019): Yesterday I executed the code `go get -d -u code.gitea.io/gitea` command. So, I have an old version? Or is my version not 1.5.0-dev? At the bottom of the page is written 1.5.0-dev. Or where better to download? From here? Here, too, the file `https://github.com/go-gitea/gitea/blob/master/main.go` says (line 27): `// Version holds the current Gitea version` `var Version = "1.5.0-dev"` I'm confused.
Author
Owner

@zeripath commented on GitHub (Mar 31, 2019):

So am I!

Ok how did you build Gitea? What TAGS did you set? The invalid connection is saying that there is something wrong with the database connection.

If you're using sqlite you need to build:

TAGS="bindata sqlite sqlite_unlock_notify" make generate build
@zeripath commented on GitHub (Mar 31, 2019): So am I! Ok how did you build Gitea? What `TAGS` did you set? The invalid connection is saying that there is something wrong with the database connection. If you're using sqlite you need to build: ```bash TAGS="bindata sqlite sqlite_unlock_notify" make generate build ```
Author
Owner

@balamut-andrey commented on GitHub (Mar 31, 2019):

I didn’t use any tags when installing, I just executed command go build. Maybe I need to specify some tags?

I do not use sqlite, I use MySQL .
phpMyAdmin works fine, does not lose connections.

@balamut-andrey commented on GitHub (Mar 31, 2019): I didn’t use any tags when installing, I just executed command `go build`. Maybe I need to specify some tags? I do not use sqlite, I use MySQL . phpMyAdmin works fine, does not lose connections.
Author
Owner

@zeripath commented on GitHub (Mar 31, 2019):

Ok please read: https://docs.gitea.io/en-us/install-from-source/

@zeripath commented on GitHub (Mar 31, 2019): Ok please read: https://docs.gitea.io/en-us/install-from-source/
Author
Owner

@balamut-andrey commented on GitHub (Mar 31, 2019):

Yes, I watched it.
I do not need these tags.

@balamut-andrey commented on GitHub (Mar 31, 2019): Yes, I watched it. I do not need these tags.
Author
Owner

@lunny commented on GitHub (Mar 31, 2019):

It seems sometimes connecting your mysql databases failed?

@lunny commented on GitHub (Mar 31, 2019): It seems sometimes connecting your mysql databases failed?
Author
Owner

@balamut-andrey commented on GitHub (Mar 31, 2019):

In var/log/mysql/error.log there are no errors during the appearance of Error-500. The database is located on the same server as Gitea.

@balamut-andrey commented on GitHub (Mar 31, 2019): In var/log/mysql/error.log there are no errors during the appearance of Error-500. The database is located on the same server as Gitea.
Author
Owner

@balamut-andrey commented on GitHub (Apr 2, 2019):

In the file var/log/syslog, I found some more such errors:
gitea[366]: [Macaron] 2019-04-01 04:31:24: Started POST /user/login for 31.23.135.100
gitea[366]: [mysql] 2019/04/01 04:31:24 packets.go:36: unexpected EOF
gitea[366]: [Macaron] 2019-04-01 04:31:24: Completed POST /user/login 500 Internal Server Error in 5.099803ms
gitea[366]: [Macaron] 2019-04-01 04:31:24: Started GET /img/500.png for 31.23.135.100
gitea[366]: [Macaron] [Static] Serving /img/500.png
gitea[366]: [Macaron] 2019-04-01 04:31:24: Completed GET /img/500.png 304 Not Modified in 1.222161ms

.../log/gitea.log
2019/04/01 04:31:24 [...routers/user/auth.go:140 SignInPost()] [E] UserSignIn: invalid connection

Maybe this concerns my problem? https://github.com/go-sql-driver/mysql/issues/674
What should I do?

@balamut-andrey commented on GitHub (Apr 2, 2019): In the file var/log/syslog, I found some more such errors: `gitea[366]: [Macaron] 2019-04-01 04:31:24: Started POST /user/login for 31.23.135.100` `gitea[366]: [mysql] 2019/04/01 04:31:24 packets.go:36: unexpected EOF` `gitea[366]: [Macaron] 2019-04-01 04:31:24: Completed POST /user/login 500 Internal Server Error in 5.099803ms` `gitea[366]: [Macaron] 2019-04-01 04:31:24: Started GET /img/500.png for 31.23.135.100` `gitea[366]: [Macaron] [Static] Serving /img/500.png` `gitea[366]: [Macaron] 2019-04-01 04:31:24: Completed GET /img/500.png 304 Not Modified in 1.222161ms` .../log/gitea.log `2019/04/01 04:31:24 [...routers/user/auth.go:140 SignInPost()] [E] UserSignIn: invalid connection` Maybe this concerns my problem? https://github.com/go-sql-driver/mysql/issues/674 What should I do?
Author
Owner

@lunny commented on GitHub (Apr 2, 2019):

I think gitea should add SetConnMaxLifetime() setting on xorm and if you run a recent version of gitea. go-sql-driver/mysql#674 should have been resolved.

@lunny commented on GitHub (Apr 2, 2019): I think gitea should add `SetConnMaxLifetime()` setting on xorm and if you run a recent version of gitea. `go-sql-driver/mysql#674` should have been resolved.
Author
Owner

@stale[bot] commented on GitHub (Jun 1, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Jun 1, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@zeripath commented on GitHub (Jun 1, 2019):

I think this should have been resolved by #7051 by @lunny. Therefore I'm going to close this.

@zeripath commented on GitHub (Jun 1, 2019): I think this should have been resolved by #7051 by @lunny. Therefore I'm going to close this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3122