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

Error 500 #6475

Closed
2 of 7 tasks
balamut-andrey opened this issue Mar 31, 2019 · 13 comments
Closed
2 of 7 tasks

Error 500 #6475

balamut-andrey opened this issue Mar 31, 2019 · 13 comments

Comments

@balamut-andrey
Copy link

balamut-andrey commented 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.

@balamut-andrey
Copy link
Author

balamut-andrey commented 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

@zeripath
Copy link
Contributor

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.

@balamut-andrey
Copy link
Author

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.

@zeripath
Copy link
Contributor

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

@balamut-andrey
Copy link
Author

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.

@zeripath
Copy link
Contributor

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

@balamut-andrey
Copy link
Author

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

@lunny
Copy link
Member

lunny commented Mar 31, 2019

It seems sometimes connecting your mysql databases failed?

@balamut-andrey
Copy link
Author

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
Copy link
Author

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? go-sql-driver/mysql#674
What should I do?

@lunny
Copy link
Member

lunny commented 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.

@stale
Copy link

stale bot commented 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 stale bot added the issue/stale label Jun 1, 2019
@zeripath
Copy link
Contributor

zeripath commented Jun 1, 2019

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

@zeripath zeripath closed this as completed Jun 1, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants