[Invalid] Gitea hangs when starting #3409

Closed
opened 2025-11-02 05:12:04 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @balthild on GitHub (Jun 2, 2019).

  • Gitea version (or commit ref): Gitea version 1.9.0+dev-314-g8eba27c79 built with GNU Make 4.2.1, go1.12.5 : bindata, sqlite, sqlite_unlock_notify
  • Git version: Shipped with the docker image
  • Operating system: Shipped with the docker image
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist: See below

Description

$ docker run --rm --name gitea -p 5000:3000 -v /home/gitea:/data gitea/gitea:latest
Server listening on :: port 22.
Server listening on 0.0.0.0 port 22.
2019/06/02 09:38:28 ...dules/setting/git.go:83:newGit() [I] Git Version: 2.20.1, Wire Protocol Version 2 Enabled
2019/06/02 09:38:28 routers/init.go:69:GlobalInit() [T] AppPath: /usr/local/bin/gitea
2019/06/02 09:38:28 routers/init.go:70:GlobalInit() [T] AppWorkPath: /usr/local/bin
2019/06/02 09:38:28 routers/init.go:71:GlobalInit() [T] Custom path: /data/gitea
2019/06/02 09:38:28 routers/init.go:72:GlobalInit() [T] Log path: /data/gitea/log

Then gitea hangs. Port 3000 is not listened in the container (docker exec gitea netstat -nltp). Waited hours but nothing happened. No error logs are produced.

A fresh installation (mounting an empty dir to /data) runs properly. My database is migrated from gogs, and it keeps working in gitea until yesterday. So I guess the problem might on the database. I tried the following:

$ docker run --rm --name gitea --user git -p 5000:3000 -v /home/gitea:/data gitea/gitea:latest gitea migrate
2019/06/02 09:45:50 ...dules/setting/git.go:83:newGit() [I] Git Version: 2.20.1, Wire Protocol Version 2 Enabled
2019/06/02 09:45:50 cmd/migrate.go:29:runMigrate() [T] AppPath: /usr/local/bin/gitea
2019/06/02 09:45:50 cmd/migrate.go:30:runMigrate() [T] AppWorkPath: /usr/local/bin
2019/06/02 09:45:50 cmd/migrate.go:31:runMigrate() [T] Custom path: /data/gitea
2019/06/02 09:45:50 cmd/migrate.go:32:runMigrate() [T] Log path: /data/gitea/log
2019/06/02 09:45:50 ...-xorm/xorm/engine.go:325:Ping() [I] PING DATABASE mysql
2019/06/02 09:45:52 .../xorm/session_raw.go:143:queryBytes() [I] [SQL] SELECT `TABLE_NAME` from `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_SCHEMA`=? and `TABLE_NAME`=? []interface {}{"gitea", "version"}
2019/06/02 09:45:55 ...xorm/core/dialect.go:157:HasRecords() [I] [SQL] SELECT `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_SCHEMA` = ? AND `TABLE_NAME` = ? AND `COLUMN_NAME` = ? [gitea version id]
2019/06/02 09:45:57 ...xorm/core/dialect.go:157:HasRecords() [I] [SQL] SELECT `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_SCHEMA` = ? AND `TABLE_NAME` = ? AND `COLUMN_NAME` = ? [gitea version version]
2019/06/02 09:46:03 .../xorm/session_get.go:95:nocacheGet() [I] [SQL] SELECT `id`, `version` FROM `version` WHERE `id`=? LIMIT 1 []interface {}{1}
2019/06/02 09:46:06 ...ations/migrations.go:269:Migrate() [I] Migration[83]: add uploader id for table attachment
2019/06/02 09:46:06 ...orm/dialect_mysql.go:434:GetTables() [I] [SQL] SELECT `TABLE_NAME`, `ENGINE`, `TABLE_ROWS`, `AUTO_INCREMENT`, `TABLE_COMMENT` from `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_SCHEMA`=? AND (`ENGINE`='MyISAM' OR `ENGINE` = 'InnoDB' OR `ENGINE` = 'TokuDB') [gitea]

Then it hangs too.

How I can dive deeper to check where the problem is produced? I've set log level to debug but there's still no logs containing useful information.

Originally created by @balthild on GitHub (Jun 2, 2019). - Gitea version (or commit ref): `Gitea version 1.9.0+dev-314-g8eba27c79 built with GNU Make 4.2.1, go1.12.5 : bindata, sqlite, sqlite_unlock_notify` - Git version: Shipped with the docker image - Operating system: Shipped with the docker image - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: See below ## Description ``` $ docker run --rm --name gitea -p 5000:3000 -v /home/gitea:/data gitea/gitea:latest Server listening on :: port 22. Server listening on 0.0.0.0 port 22. 2019/06/02 09:38:28 ...dules/setting/git.go:83:newGit() [I] Git Version: 2.20.1, Wire Protocol Version 2 Enabled 2019/06/02 09:38:28 routers/init.go:69:GlobalInit() [T] AppPath: /usr/local/bin/gitea 2019/06/02 09:38:28 routers/init.go:70:GlobalInit() [T] AppWorkPath: /usr/local/bin 2019/06/02 09:38:28 routers/init.go:71:GlobalInit() [T] Custom path: /data/gitea 2019/06/02 09:38:28 routers/init.go:72:GlobalInit() [T] Log path: /data/gitea/log ``` Then gitea hangs. Port 3000 is not listened in the container (`docker exec gitea netstat -nltp`). Waited hours but nothing happened. No error logs are produced. A fresh installation (mounting an empty dir to `/data`) runs properly. My database is migrated from gogs, and it keeps working in gitea until yesterday. So I guess the problem might on the database. I tried the following: ``` $ docker run --rm --name gitea --user git -p 5000:3000 -v /home/gitea:/data gitea/gitea:latest gitea migrate 2019/06/02 09:45:50 ...dules/setting/git.go:83:newGit() [I] Git Version: 2.20.1, Wire Protocol Version 2 Enabled 2019/06/02 09:45:50 cmd/migrate.go:29:runMigrate() [T] AppPath: /usr/local/bin/gitea 2019/06/02 09:45:50 cmd/migrate.go:30:runMigrate() [T] AppWorkPath: /usr/local/bin 2019/06/02 09:45:50 cmd/migrate.go:31:runMigrate() [T] Custom path: /data/gitea 2019/06/02 09:45:50 cmd/migrate.go:32:runMigrate() [T] Log path: /data/gitea/log 2019/06/02 09:45:50 ...-xorm/xorm/engine.go:325:Ping() [I] PING DATABASE mysql 2019/06/02 09:45:52 .../xorm/session_raw.go:143:queryBytes() [I] [SQL] SELECT `TABLE_NAME` from `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_SCHEMA`=? and `TABLE_NAME`=? []interface {}{"gitea", "version"} 2019/06/02 09:45:55 ...xorm/core/dialect.go:157:HasRecords() [I] [SQL] SELECT `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_SCHEMA` = ? AND `TABLE_NAME` = ? AND `COLUMN_NAME` = ? [gitea version id] 2019/06/02 09:45:57 ...xorm/core/dialect.go:157:HasRecords() [I] [SQL] SELECT `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_SCHEMA` = ? AND `TABLE_NAME` = ? AND `COLUMN_NAME` = ? [gitea version version] 2019/06/02 09:46:03 .../xorm/session_get.go:95:nocacheGet() [I] [SQL] SELECT `id`, `version` FROM `version` WHERE `id`=? LIMIT 1 []interface {}{1} 2019/06/02 09:46:06 ...ations/migrations.go:269:Migrate() [I] Migration[83]: add uploader id for table attachment 2019/06/02 09:46:06 ...orm/dialect_mysql.go:434:GetTables() [I] [SQL] SELECT `TABLE_NAME`, `ENGINE`, `TABLE_ROWS`, `AUTO_INCREMENT`, `TABLE_COMMENT` from `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_SCHEMA`=? AND (`ENGINE`='MyISAM' OR `ENGINE` = 'InnoDB' OR `ENGINE` = 'TokuDB') [gitea] ``` Then it hangs too. How I can dive deeper to check where the problem is produced? I've set log level to `debug` but there's still no logs containing useful information.
Author
Owner

@balthild commented on GitHub (Jun 2, 2019):

I've figured out that the problem is caused by insufficent network configurations, which add a huge latency to the connections from gitea to database. The issue has nothing concerning gitea. Sorry for disturbing.

@balthild commented on GitHub (Jun 2, 2019): I've figured out that the problem is caused by insufficent network configurations, which add a huge latency to the connections from gitea to database. The issue has nothing concerning gitea. Sorry for disturbing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3409