Latest gitea container causes PostgreSQL database error, no longer launches #1609

Closed
opened 2025-11-02 04:06:28 -06:00 by GiteaMirror · 9 comments
Owner

Originally created by @ghost on GitHub (Mar 8, 2018).

  • Gitea version (or commit ref): don't know, gitea doesn't output this in the log when launching in docker (or only does so after the error occurs)
  • Git version: docker image gitea/gitea:latest
  • Operating system: docker / ubuntu 17.10 host
  • 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:

Description

After I updated the docker container to the latest version (keeping all config data), it no longer launches. It seems to be stuck in a restart loop without ever successfully running, showing this in the log:

...
gitea_1  | 2018/03/08 18:38:00 [T] Custom path: /data/gitea
gitea_1  | 2018/03/08 18:38:00 [T] Log path: /data/gitea/log
gitea_1  | 2018/03/08 18:38:01 [T] AppPath: /app/gitea/gitea
gitea_1  | 2018/03/08 18:38:01 [T] AppWorkPath: /app/gitea
gitea_1  | 2018/03/08 18:38:01 [T] Custom path: /data/gitea
gitea_1  | 2018/03/08 18:38:01 [T] Log path: /data/gitea/log
gitea_1  | 2018/03/08 18:38:02 [T] AppPath: /app/gitea/gitea
gitea_1  | 2018/03/08 18:38:02 [T] AppWorkPath: /app/gitea
gitea_1  | 2018/03/08 18:38:02 [T] Custom path: /data/gitea
gitea_1  | 2018/03/08 18:38:02 [T] Log path: /data/gitea/log
gitea_1  | 2018/03/08 18:38:03 [T] AppPath: /app/gitea/gitea
gitea_1  | 2018/03/08 18:38:03 [T] AppWorkPath: /app/gitea
gitea_1  | 2018/03/08 18:38:03 [T] Custom path: /data/gitea
gitea_1  | 2018/03/08 18:38:03 [T] Log path: /data/gitea/log
...

The database log shows this:

db_1     | LOG:  database system was shut down at 2018-03-08 06:22:36 UTC
db_1     | LOG:  MultiXact member wraparound protections are now enabled
db_1     | LOG:  database system is ready to accept connections
db_1     | LOG:  autovacuum launcher started
db_1     | ERROR:  syntax error at or near "num_teams" at character 34
db_1     | STATEMENT:  ALTER TABLE "org_user" [is_owner num_teams]
db_1     | ERROR:  syntax error at or near "num_teams" at character 34
db_1     | STATEMENT:  ALTER TABLE "org_user" [is_owner num_teams]
db_1     | ERROR:  syntax error at or near "num_teams" at character 34
db_1     | STATEMENT:  ALTER TABLE "org_user" [is_owner num_teams]
db_1     | ERROR:  syntax error at or near "num_teams" at character 34
...

Screenshots

Originally created by @ghost on GitHub (Mar 8, 2018). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) 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): don't know, gitea doesn't output this in the log when launching in docker (or only does so after the error occurs) - Git version: docker image `gitea/gitea:latest` - Operating system: docker / ubuntu 17.10 host - Database (use `[x]`): - [X] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [X] No - [ ] Not relevant - Log gist: ## Description After I updated the docker container to the latest version (keeping all config data), it no longer launches. It seems to be stuck in a restart loop without ever successfully running, showing this in the log: ``` ... gitea_1 | 2018/03/08 18:38:00 [T] Custom path: /data/gitea gitea_1 | 2018/03/08 18:38:00 [T] Log path: /data/gitea/log gitea_1 | 2018/03/08 18:38:01 [T] AppPath: /app/gitea/gitea gitea_1 | 2018/03/08 18:38:01 [T] AppWorkPath: /app/gitea gitea_1 | 2018/03/08 18:38:01 [T] Custom path: /data/gitea gitea_1 | 2018/03/08 18:38:01 [T] Log path: /data/gitea/log gitea_1 | 2018/03/08 18:38:02 [T] AppPath: /app/gitea/gitea gitea_1 | 2018/03/08 18:38:02 [T] AppWorkPath: /app/gitea gitea_1 | 2018/03/08 18:38:02 [T] Custom path: /data/gitea gitea_1 | 2018/03/08 18:38:02 [T] Log path: /data/gitea/log gitea_1 | 2018/03/08 18:38:03 [T] AppPath: /app/gitea/gitea gitea_1 | 2018/03/08 18:38:03 [T] AppWorkPath: /app/gitea gitea_1 | 2018/03/08 18:38:03 [T] Custom path: /data/gitea gitea_1 | 2018/03/08 18:38:03 [T] Log path: /data/gitea/log ... ``` The database log shows this: ``` db_1 | LOG: database system was shut down at 2018-03-08 06:22:36 UTC db_1 | LOG: MultiXact member wraparound protections are now enabled db_1 | LOG: database system is ready to accept connections db_1 | LOG: autovacuum launcher started db_1 | ERROR: syntax error at or near "num_teams" at character 34 db_1 | STATEMENT: ALTER TABLE "org_user" [is_owner num_teams] db_1 | ERROR: syntax error at or near "num_teams" at character 34 db_1 | STATEMENT: ALTER TABLE "org_user" [is_owner num_teams] db_1 | ERROR: syntax error at or near "num_teams" at character 34 db_1 | STATEMENT: ALTER TABLE "org_user" [is_owner num_teams] db_1 | ERROR: syntax error at or near "num_teams" at character 34 ... ``` ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the issue/criticaltype/bug labels 2025-11-02 04:06:28 -06:00
Author
Owner

@lafriks commented on GitHub (Mar 8, 2018):

Damn, looks like I broke it :(

@lafriks commented on GitHub (Mar 8, 2018): Damn, looks like I broke it :(
Author
Owner

@ghost commented on GitHub (Mar 8, 2018):

Well unless it's my fault somehow? I wouldn't know that it is, but who knows. I haven't looked at that gitea in a while, but a month ago it still worked.

Can I provide you with anything to help figure out what is going on? I can't dump the entire database here (has some confidential projects) but I could figure out a way to give you access personally if that was of any help.

@ghost commented on GitHub (Mar 8, 2018): Well unless it's my fault somehow? I wouldn't know that it is, but who knows. I haven't looked at that gitea in a while, but a month ago it still worked. Can I provide you with anything to help figure out what is going on? I can't dump the entire database here (has some confidential projects) but I could figure out a way to give you access personally if that was of any help.
Author
Owner

@lafriks commented on GitHub (Mar 8, 2018):

@JonasT I have submitted PR to fix this. Somehow I had broken my written code after I did test it. Sorry for that

@lafriks commented on GitHub (Mar 8, 2018): @JonasT I have submitted PR to fix this. Somehow I had broken my written code after I did test it. Sorry for that
Author
Owner

@ghost commented on GitHub (Mar 15, 2018):

@lafriks so when will the docker container be updated? I just checked gitea/gitea:latest and launching it still results in the same error...

@ghost commented on GitHub (Mar 15, 2018): @lafriks so when will the docker container be updated? I just checked `gitea/gitea:latest` and launching it still results in the same error...
Author
Owner

@lafriks commented on GitHub (Mar 15, 2018):

@JonasT this fix should be already be in latest

@lafriks commented on GitHub (Mar 15, 2018): @JonasT this fix should be already be in latest
Author
Owner

@ghost commented on GitHub (Mar 15, 2018):

Ah sorry, I forgot to cleanly recreate the container. Works now 😄

@ghost commented on GitHub (Mar 15, 2018): Ah sorry, I forgot to cleanly recreate the container. Works now :smile:
Author
Owner

@jsan4christ commented on GitHub (Nov 11, 2018):

I have this error:
[...itea/routers/init.go:47 GlobalInit()] [E] LFS server support needs at least Git v2.1.2

Running on centos 7 with postgres. Has been working normally. Have tried upgrading to 1.6 but nothing has changed.

Please advise,

@jsan4christ commented on GitHub (Nov 11, 2018): I have this error: [...itea/routers/init.go:47 GlobalInit()] [E] LFS server support needs at least Git v2.1.2 Running on centos 7 with postgres. Has been working normally. Have tried upgrading to 1.6 but nothing has changed. Please advise,
Author
Owner

@lunny commented on GitHub (Nov 11, 2018):

You have to upgrade your git to version v2.1.2 if you enabled git-lfs

@lunny commented on GitHub (Nov 11, 2018): You have to upgrade your git to version v2.1.2 if you enabled git-lfs
Author
Owner

@jsan4christ commented on GitHub (Nov 11, 2018):

Thanks Lunny,

Centos 7 will not be happy with anything beyond 1.8.

But turns out my real problem was the firewall. It is back up now.

@jsan4christ commented on GitHub (Nov 11, 2018): Thanks Lunny, Centos 7 will not be happy with anything beyond 1.8. But turns out my real problem was the firewall. It is back up now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1609