do migrate: database schema is locked: main #2779

Closed
opened 2025-11-02 04:48:14 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @xstrex on GitHub (Jan 19, 2019).

  • Gitea version (or commit ref): Gitea version 6822a89 built with: bindata, sqlite, sqlite_unlock_notify
  • Git version: git version 2.18.1
  • Operating system: Docker
  • 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

Running latest version via docker gitea/gitea:latest, just updated today, now gitea won't start.

The following is from inside the container:

bash-4.4# su - git
49461decd8c4:~$ cd /app/gitea/
49461decd8c4:/app/gitea$ ./gitea migrate
2019/01/19 22:32:55 [I] XORM Log Mode: File(Info)
2019/01/19 22:32:55 [T] AppPath: /app/gitea/gitea
2019/01/19 22:32:55 [T] AppWorkPath: /app/gitea
2019/01/19 22:32:56 [T] Custom path: /data/gitea
2019/01/19 22:32:56 [T] Log path: /data/gitea/log
2019/01/19 22:32:56 [I] Migration: rename repo is_bare to repo is_empty
2019/01/19 22:32:56 [...gitea/cmd/migrate.go:47 runMigrate()] [E] Failed to initialize ORM engine: migrate: do migrate: database schema is locked: main

Possibly related to: #5759
Similar error, but not identical.

Originally created by @xstrex on GitHub (Jan 19, 2019). - Gitea version (or commit ref): Gitea version 6822a89 built with: bindata, sqlite, sqlite_unlock_notify - Git version: git version 2.18.1 - Operating system: Docker - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [X] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [X] Not relevant - Log gist: ## Description Running latest version via docker `gitea/gitea:latest`, just updated today, now gitea won't start. The following is from inside the container: ``` bash-4.4# su - git 49461decd8c4:~$ cd /app/gitea/ 49461decd8c4:/app/gitea$ ./gitea migrate 2019/01/19 22:32:55 [I] XORM Log Mode: File(Info) 2019/01/19 22:32:55 [T] AppPath: /app/gitea/gitea 2019/01/19 22:32:55 [T] AppWorkPath: /app/gitea 2019/01/19 22:32:56 [T] Custom path: /data/gitea 2019/01/19 22:32:56 [T] Log path: /data/gitea/log 2019/01/19 22:32:56 [I] Migration: rename repo is_bare to repo is_empty 2019/01/19 22:32:56 [...gitea/cmd/migrate.go:47 runMigrate()] [E] Failed to initialize ORM engine: migrate: do migrate: database schema is locked: main ``` Possibly related to: #5759 Similar error, but not identical. <!-- **If this issue involves the Web Interface, please include a screenshot** -->
Author
Owner

@zeripath commented on GitHub (Jan 19, 2019):

Fixed in #5776

@zeripath commented on GitHub (Jan 19, 2019): Fixed in #5776
Author
Owner

@zeripath commented on GitHub (Jan 19, 2019):

This is the second coming of #5759 unfortunately

@zeripath commented on GitHub (Jan 19, 2019): This is the second coming of #5759 unfortunately
Author
Owner

@xstrex commented on GitHub (Jan 19, 2019):

Just did a pull, now the gitea.log is showing:

2019/01/19 22:46:09 [...itea/routers/init.go:81 GlobalInit()] [E] ORM engine initialization failed: migrate: do migrate: database schema is locked: main
2019/01/19 22:46:09 [I] Log Mode: File(Info)
2019/01/19 22:46:09 [I] XORM Log Mode: File(Info)
2019/01/19 22:46:09 [I] Cache Service Enabled
2019/01/19 22:46:09 [I] Session Service Enabled
2019/01/19 22:46:09 [I] Beginning ORM engine initialization.
2019/01/19 22:46:09 [I] ORM engine initialization attempt #1/10...
2019/01/19 22:46:09 [I] Migration: rename repo is_bare to repo is_empty
2019/01/19 22:46:09 [I] Backing off for 3 seconds
2019/01/19 22:46:12 [I] ORM engine initialization attempt #2/10...
2019/01/19 22:46:12 [I] Migration: rename repo is_bare to repo is_empty
2019/01/19 22:46:12 [I] Backing off for 3 seconds
2019/01/19 22:46:15 [I] ORM engine initialization attempt #3/10...
2019/01/19 22:46:15 [I] Migration: rename repo is_bare to repo is_empty
2019/01/19 22:46:15 [I] Backing off for 3 seconds
2019/01/19 22:46:18 [I] ORM engine initialization attempt #4/10...
2019/01/19 22:46:18 [I] Migration: rename repo is_bare to repo is_empty
2019/01/19 22:46:18 [I] Backing off for 3 seconds
2019/01/19 22:46:21 [I] ORM engine initialization attempt #5/10...
2019/01/19 22:46:21 [I] Migration: rename repo is_bare to repo is_empty
2019/01/19 22:46:21 [I] Backing off for 3 seconds
2019/01/19 22:46:24 [I] ORM engine initialization attempt #6/10...
2019/01/19 22:46:24 [I] Migration: rename repo is_bare to repo is_empty
2019/01/19 22:46:24 [I] Backing off for 3 seconds
2019/01/19 22:46:27 [I] ORM engine initialization attempt #7/10...
2019/01/19 22:46:27 [I] Migration: rename repo is_bare to repo is_empty
2019/01/19 22:46:27 [I] Backing off for 3 seconds

...and repeating

@xstrex commented on GitHub (Jan 19, 2019): Just did a pull, now the gitea.log is showing: ``` 2019/01/19 22:46:09 [...itea/routers/init.go:81 GlobalInit()] [E] ORM engine initialization failed: migrate: do migrate: database schema is locked: main 2019/01/19 22:46:09 [I] Log Mode: File(Info) 2019/01/19 22:46:09 [I] XORM Log Mode: File(Info) 2019/01/19 22:46:09 [I] Cache Service Enabled 2019/01/19 22:46:09 [I] Session Service Enabled 2019/01/19 22:46:09 [I] Beginning ORM engine initialization. 2019/01/19 22:46:09 [I] ORM engine initialization attempt #1/10... 2019/01/19 22:46:09 [I] Migration: rename repo is_bare to repo is_empty 2019/01/19 22:46:09 [I] Backing off for 3 seconds 2019/01/19 22:46:12 [I] ORM engine initialization attempt #2/10... 2019/01/19 22:46:12 [I] Migration: rename repo is_bare to repo is_empty 2019/01/19 22:46:12 [I] Backing off for 3 seconds 2019/01/19 22:46:15 [I] ORM engine initialization attempt #3/10... 2019/01/19 22:46:15 [I] Migration: rename repo is_bare to repo is_empty 2019/01/19 22:46:15 [I] Backing off for 3 seconds 2019/01/19 22:46:18 [I] ORM engine initialization attempt #4/10... 2019/01/19 22:46:18 [I] Migration: rename repo is_bare to repo is_empty 2019/01/19 22:46:18 [I] Backing off for 3 seconds 2019/01/19 22:46:21 [I] ORM engine initialization attempt #5/10... 2019/01/19 22:46:21 [I] Migration: rename repo is_bare to repo is_empty 2019/01/19 22:46:21 [I] Backing off for 3 seconds 2019/01/19 22:46:24 [I] ORM engine initialization attempt #6/10... 2019/01/19 22:46:24 [I] Migration: rename repo is_bare to repo is_empty 2019/01/19 22:46:24 [I] Backing off for 3 seconds 2019/01/19 22:46:27 [I] ORM engine initialization attempt #7/10... 2019/01/19 22:46:27 [I] Migration: rename repo is_bare to repo is_empty 2019/01/19 22:46:27 [I] Backing off for 3 seconds ``` ...and repeating
Author
Owner

@zeripath commented on GitHub (Jan 19, 2019):

Yup #5776 will fix

@zeripath commented on GitHub (Jan 19, 2019): Yup #5776 will fix
Author
Owner

@xstrex commented on GitHub (Jan 19, 2019):

Damn man, thanks for the quick response!

@xstrex commented on GitHub (Jan 19, 2019): Damn man, thanks for the quick response!
Author
Owner

@techknowlogick commented on GitHub (Jan 20, 2019):

Closing as linked PR has been merged.

@techknowlogick commented on GitHub (Jan 20, 2019): Closing as linked PR has been merged.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2779