Skip to content

Issue with recent Migration[156] #13255

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

Closed
4 tasks done
wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf opened this issue Oct 22, 2020 · 2 comments · Fixed by #13254
Closed
4 tasks done

Issue with recent Migration[156] #13255

wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf opened this issue Oct 22, 2020 · 2 comments · Fixed by #13254

Comments

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf
Copy link
Contributor

Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 cmd/web.go:110:runWeb() [I] Starting Gitea on PID: 2637956
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...s/setting/setting.go:832:NewContext() [I] Default UI Location is Europe/Vienna
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...dules/setting/git.go:91:newGit() [I] Git Version: 2.29.0.311.g38ddec7408, Wire Protocol Version 2 Enabled
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 cmd/web.go:151:runWeb() [I] Global init
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...s/setting/setting.go:832:NewContext() [I] Default UI Location is Europe/Vienna
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...dules/setting/git.go:91:newGit() [I] Git Version: 2.29.0.311.g38ddec7408, Wire Protocol Version 2 Enabled
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 routers/init.go:164:GlobalInit() [T] AppPath: /usr/bin/gitea
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 routers/init.go:165:GlobalInit() [T] AppWorkPath: /var/lib/gitea
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 routers/init.go:166:GlobalInit() [T] Custom path: /var/lib/gitea/custom
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 routers/init.go:167:GlobalInit() [T] Log path: /var/log/gitea/
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...dules/setting/log.go:297:newLogService() [I] Gitea v1.14.0+dev-53-gdafc634a4 built with GNU Make 4.3, go1.15.3 : bindata, sqlite, sqlite_unlock_notify
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...dules/setting/log.go:343:newLogService() [I] Gitea Log Mode: Console(Console:info)
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...dules/setting/log.go:249:generateNamedLogger() [I] Macaron Log: Console(console:info)
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...dules/setting/log.go:249:generateNamedLogger() [I] Router Log: Console(console:info)
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...dules/setting/log.go:249:generateNamedLogger() [I] Xorm Log: Console(console:info)
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...les/setting/cache.go:70:newCacheService() [I] Cache Service Enabled
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...les/setting/cache.go:81:newCacheService() [I] Last Commit Cache Service Enabled
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...s/setting/session.go:63:newSessionService() [I] Session Service Enabled
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...es/setting/mailer.go:109:newMailService() [I] Mail Service Enabled
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...es/setting/mailer.go:131:newNotifyMailService() [I] Notify Mail Service Enabled
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...s/storage/storage.go:151:initAttachments() [I] Initialising Attachment storage with type:
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...les/storage/local.go:44:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/attachments
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...s/storage/storage.go:145:initAvatars() [I] Initialising Avatar storage with type:
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...les/storage/local.go:44:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/avatars
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...s/storage/storage.go:163:initRepoAvatars() [I] Initialising Repository Avatar storage with type:
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...les/storage/local.go:44:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/repo-avatars
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...s/storage/storage.go:157:initLFS() [I] Initialising LFS storage with type:
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...les/storage/local.go:44:NewLocalStorage() [I] Creating new Local Storage at /var/lib/gitea/data/lfs
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 routers/init.go:72:initDBEngine() [I] Beginning ORM engine initialization.
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 routers/init.go:79:initDBEngine() [I] ORM engine initialization attempt #1/15...
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...rm/session_schema.go:25:Ping() [I] PING DATABASE sqlite3
Oct 22 08:29:36 nebula gitea[2637956]: 2020/10/22 08:29:36 ...ations/migrations.go:338:Migrate() [I] Migration[156]: fix publisher ID for tag releases
Oct 22 08:29:48 nebula gitea[2637956]: 2020/10/22 08:29:48 routers/init.go:85:initDBEngine() [E] ORM engine initialization attempt #1/15 failed. Error: migrate: do migrate: Repository 370 is not exist
Oct 22 08:29:48 nebula gitea[2637956]:         /root/gitea-src/routers/init.go:85 (0x20395f3)
Oct 22 08:29:48 nebula gitea[2637956]:         /root/gitea-src/routers/init.go:177 (0x203a5b1)
Oct 22 08:29:48 nebula gitea[2637956]:         /root/gitea-src/cmd/web.go:153 (0x228669e)
Oct 22 08:29:48 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/app.go:526 (0x16c85bc)
Oct 22 08:29:48 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/command.go:174 (0x16c938d)
Oct 22 08:29:48 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/app.go:279 (0x16c64a7)
Oct 22 08:29:48 nebula gitea[2637956]:         /root/gitea-src/main.go:110 (0x22c6ee9)
Oct 22 08:29:48 nebula gitea[2637956]:         /usr/lib/go/src/runtime/proc.go:204 (0x442aa8)
Oct 22 08:29:48 nebula gitea[2637956]:                 main: fn()
Oct 22 08:29:48 nebula gitea[2637956]:         /usr/lib/go/src/runtime/asm_amd64.s:1374 (0x478c20)
Oct 22 08:29:48 nebula gitea[2637956]:                 goexit: BYTE        $0x90        // NOP
Oct 22 08:29:48 nebula gitea[2637956]:
Oct 22 08:29:48 nebula gitea[2637956]: 2020/10/22 08:29:48 routers/init.go:86:initDBEngine() [I] Backing off for 1 seconds
Oct 22 08:29:49 nebula gitea[2637956]: 2020/10/22 08:29:49 routers/init.go:79:initDBEngine() [I] ORM engine initialization attempt #2/15...
Oct 22 08:29:49 nebula gitea[2637956]: 2020/10/22 08:29:49 ...rm/session_schema.go:25:Ping() [I] PING DATABASE sqlite3
Oct 22 08:29:49 nebula gitea[2637956]: 2020/10/22 08:29:49 ...ations/migrations.go:338:Migrate() [I] Migration[156]: fix publisher ID for tag releases
Oct 22 08:30:00 nebula gitea[2637956]: 2020/10/22 08:30:00 routers/init.go:85:initDBEngine() [E] ORM engine initialization attempt #2/15 failed. Error: migrate: do migrate: Repository 370 is not exist
Oct 22 08:30:00 nebula gitea[2637956]:         /root/gitea-src/routers/init.go:85 (0x20395f3)
Oct 22 08:30:00 nebula gitea[2637956]:         /root/gitea-src/routers/init.go:177 (0x203a5b1)
Oct 22 08:30:00 nebula gitea[2637956]:         /root/gitea-src/cmd/web.go:153 (0x228669e)
Oct 22 08:30:00 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/app.go:526 (0x16c85bc)
Oct 22 08:30:00 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/command.go:174 (0x16c938d)
Oct 22 08:30:00 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/app.go:279 (0x16c64a7)
Oct 22 08:30:00 nebula gitea[2637956]:         /root/gitea-src/main.go:110 (0x22c6ee9)
Oct 22 08:30:00 nebula gitea[2637956]:         /usr/lib/go/src/runtime/proc.go:204 (0x442aa8)
Oct 22 08:30:00 nebula gitea[2637956]:                 main: fn()
Oct 22 08:30:00 nebula gitea[2637956]:         /usr/lib/go/src/runtime/asm_amd64.s:1374 (0x478c20)
Oct 22 08:30:00 nebula gitea[2637956]:                 goexit: BYTE        $0x90        // NOP
Oct 22 08:30:00 nebula gitea[2637956]:
Oct 22 08:30:00 nebula gitea[2637956]: 2020/10/22 08:30:00 routers/init.go:86:initDBEngine() [I] Backing off for 1 seconds
Oct 22 08:30:01 nebula gitea[2637956]: 2020/10/22 08:30:01 routers/init.go:79:initDBEngine() [I] ORM engine initialization attempt #3/15...
Oct 22 08:30:01 nebula gitea[2637956]: 2020/10/22 08:30:01 ...rm/session_schema.go:25:Ping() [I] PING DATABASE sqlite3
Oct 22 08:30:01 nebula gitea[2637956]: 2020/10/22 08:30:01 ...ations/migrations.go:338:Migrate() [I] Migration[156]: fix publisher ID for tag releases
Oct 22 08:30:19 nebula gitea[2637956]: 2020/10/22 08:30:19 routers/init.go:85:initDBEngine() [E] ORM engine initialization attempt #3/15 failed. Error: migrate: do migrate: Repository 370 is not exist
Oct 22 08:30:19 nebula gitea[2637956]:         /root/gitea-src/routers/init.go:85 (0x20395f3)
Oct 22 08:30:19 nebula gitea[2637956]:         /root/gitea-src/routers/init.go:177 (0x203a5b1)
Oct 22 08:30:19 nebula gitea[2637956]:         /root/gitea-src/cmd/web.go:153 (0x228669e)
Oct 22 08:30:19 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/app.go:526 (0x16c85bc)
Oct 22 08:30:19 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/command.go:174 (0x16c938d)
Oct 22 08:30:19 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/app.go:279 (0x16c64a7)
Oct 22 08:30:19 nebula gitea[2637956]:         /root/gitea-src/main.go:110 (0x22c6ee9)
Oct 22 08:30:19 nebula gitea[2637956]:         /usr/lib/go/src/runtime/proc.go:204 (0x442aa8)
Oct 22 08:30:19 nebula gitea[2637956]:                 main: fn()
Oct 22 08:30:19 nebula gitea[2637956]:         /usr/lib/go/src/runtime/asm_amd64.s:1374 (0x478c20)
Oct 22 08:30:19 nebula gitea[2637956]:                 goexit: BYTE        $0x90        // NOP
Oct 22 08:30:19 nebula gitea[2637956]:
Oct 22 08:30:19 nebula gitea[2637956]: 2020/10/22 08:30:19 routers/init.go:86:initDBEngine() [I] Backing off for 1 seconds
Oct 22 08:30:20 nebula gitea[2637956]: 2020/10/22 08:30:20 routers/init.go:79:initDBEngine() [I] ORM engine initialization attempt #4/15...
Oct 22 08:30:20 nebula gitea[2637956]: 2020/10/22 08:30:20 ...rm/session_schema.go:25:Ping() [I] PING DATABASE sqlite3
Oct 22 08:30:20 nebula gitea[2637956]: 2020/10/22 08:30:20 ...ations/migrations.go:338:Migrate() [I] Migration[156]: fix publisher ID for tag releases
Oct 22 08:30:32 nebula gitea[2637956]: 2020/10/22 08:30:32 routers/init.go:85:initDBEngine() [E] ORM engine initialization attempt #4/15 failed. Error: migrate: do migrate: Repository 370 is not exist
Oct 22 08:30:32 nebula gitea[2637956]:         /root/gitea-src/routers/init.go:85 (0x20395f3)
Oct 22 08:30:32 nebula gitea[2637956]:         /root/gitea-src/routers/init.go:177 (0x203a5b1)
Oct 22 08:30:32 nebula gitea[2637956]:         /root/gitea-src/cmd/web.go:153 (0x228669e)
Oct 22 08:30:32 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/app.go:526 (0x16c85bc)
Oct 22 08:30:32 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/command.go:174 (0x16c938d)
Oct 22 08:30:32 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/app.go:279 (0x16c64a7)
Oct 22 08:30:32 nebula gitea[2637956]:         /root/gitea-src/main.go:110 (0x22c6ee9)
Oct 22 08:30:32 nebula gitea[2637956]:         /usr/lib/go/src/runtime/proc.go:204 (0x442aa8)
Oct 22 08:30:32 nebula gitea[2637956]:                 main: fn()
Oct 22 08:30:32 nebula gitea[2637956]:         /usr/lib/go/src/runtime/asm_amd64.s:1374 (0x478c20)
Oct 22 08:30:32 nebula gitea[2637956]:                 goexit: BYTE        $0x90        // NOP
Oct 22 08:30:32 nebula gitea[2637956]:
Oct 22 08:30:32 nebula gitea[2637956]: 2020/10/22 08:30:32 routers/init.go:86:initDBEngine() [I] Backing off for 1 seconds
Oct 22 08:30:33 nebula gitea[2637956]: 2020/10/22 08:30:33 routers/init.go:79:initDBEngine() [I] ORM engine initialization attempt #5/15...
Oct 22 08:30:33 nebula gitea[2637956]: 2020/10/22 08:30:33 ...rm/session_schema.go:25:Ping() [I] PING DATABASE sqlite3
Oct 22 08:30:33 nebula gitea[2637956]: 2020/10/22 08:30:33 ...ations/migrations.go:338:Migrate() [I] Migration[156]: fix publisher ID for tag releases
Oct 22 08:30:46 nebula gitea[2637956]: 2020/10/22 08:30:46 routers/init.go:85:initDBEngine() [E] ORM engine initialization attempt #5/15 failed. Error: migrate: do migrate: Repository 370 is not exist
Oct 22 08:30:46 nebula gitea[2637956]:         /root/gitea-src/routers/init.go:85 (0x20395f3)
Oct 22 08:30:46 nebula gitea[2637956]:         /root/gitea-src/routers/init.go:177 (0x203a5b1)
Oct 22 08:30:46 nebula gitea[2637956]:         /root/gitea-src/cmd/web.go:153 (0x228669e)
Oct 22 08:30:46 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/app.go:526 (0x16c85bc)
Oct 22 08:30:46 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/command.go:174 (0x16c938d)
Oct 22 08:30:46 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/app.go:279 (0x16c64a7)
Oct 22 08:30:46 nebula gitea[2637956]:         /root/gitea-src/main.go:110 (0x22c6ee9)
Oct 22 08:30:46 nebula gitea[2637956]:         /usr/lib/go/src/runtime/proc.go:204 (0x442aa8)
Oct 22 08:30:46 nebula gitea[2637956]:                 main: fn()
Oct 22 08:30:46 nebula gitea[2637956]:         /usr/lib/go/src/runtime/asm_amd64.s:1374 (0x478c20)
Oct 22 08:30:46 nebula gitea[2637956]:                 goexit: BYTE        $0x90        // NOP
Oct 22 08:30:46 nebula gitea[2637956]:
Oct 22 08:30:46 nebula gitea[2637956]: 2020/10/22 08:30:46 routers/init.go:86:initDBEngine() [I] Backing off for 1 seconds
Oct 22 08:30:47 nebula gitea[2637956]: 2020/10/22 08:30:47 ...rm/session_schema.go:25:Ping() [I] PING DATABASE sqlite3
Oct 22 08:30:47 nebula gitea[2637956]: 2020/10/22 08:30:47 routers/init.go:79:initDBEngine() [I] ORM engine initialization attempt #6/15...
Oct 22 08:30:47 nebula gitea[2637956]: 2020/10/22 08:30:47 ...ations/migrations.go:338:Migrate() [I] Migration[156]: fix publisher ID for tag releases
Oct 22 08:31:01 nebula gitea[2637956]: 2020/10/22 08:31:01 routers/init.go:85:initDBEngine() [E] ORM engine initialization attempt #6/15 failed. Error: migrate: do migrate: Repository 370 is not exist
Oct 22 08:31:01 nebula gitea[2637956]:         /root/gitea-src/routers/init.go:85 (0x20395f3)
Oct 22 08:31:01 nebula gitea[2637956]:         /root/gitea-src/routers/init.go:177 (0x203a5b1)
Oct 22 08:31:01 nebula gitea[2637956]:         /root/gitea-src/cmd/web.go:153 (0x228669e)
Oct 22 08:31:01 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/app.go:526 (0x16c85bc)
Oct 22 08:31:01 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/command.go:174 (0x16c938d)
Oct 22 08:31:01 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/app.go:279 (0x16c64a7)
Oct 22 08:31:01 nebula gitea[2637956]:         /root/gitea-src/main.go:110 (0x22c6ee9)
Oct 22 08:31:01 nebula gitea[2637956]:         /usr/lib/go/src/runtime/proc.go:204 (0x442aa8)
Oct 22 08:31:01 nebula gitea[2637956]:                 main: fn()
Oct 22 08:31:01 nebula gitea[2637956]:         /usr/lib/go/src/runtime/asm_amd64.s:1374 (0x478c20)
Oct 22 08:31:01 nebula gitea[2637956]:                 goexit: BYTE        $0x90        // NOP
Oct 22 08:31:01 nebula gitea[2637956]:
Oct 22 08:31:01 nebula gitea[2637956]: 2020/10/22 08:31:01 routers/init.go:86:initDBEngine() [I] Backing off for 1 seconds
Oct 22 08:31:02 nebula gitea[2637956]: 2020/10/22 08:31:02 ...rm/session_schema.go:25:Ping() [I] PING DATABASE sqlite3
Oct 22 08:31:02 nebula gitea[2637956]: 2020/10/22 08:31:02 routers/init.go:79:initDBEngine() [I] ORM engine initialization attempt #7/15...
Oct 22 08:31:02 nebula gitea[2637956]: 2020/10/22 08:31:02 ...ations/migrations.go:338:Migrate() [I] Migration[156]: fix publisher ID for tag releases
Oct 22 08:31:21 nebula gitea[2637956]: 2020/10/22 08:31:21 routers/init.go:85:initDBEngine() [E] ORM engine initialization attempt #7/15 failed. Error: migrate: do migrate: Repository 370 is not exist
Oct 22 08:31:21 nebula gitea[2637956]:         /root/gitea-src/routers/init.go:85 (0x20395f3)
Oct 22 08:31:21 nebula gitea[2637956]:         /root/gitea-src/routers/init.go:177 (0x203a5b1)
Oct 22 08:31:21 nebula gitea[2637956]:         /root/gitea-src/cmd/web.go:153 (0x228669e)
Oct 22 08:31:21 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/app.go:526 (0x16c85bc)
Oct 22 08:31:21 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/command.go:174 (0x16c938d)
Oct 22 08:31:21 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/app.go:279 (0x16c64a7)
Oct 22 08:31:21 nebula gitea[2637956]:         /root/gitea-src/main.go:110 (0x22c6ee9)
Oct 22 08:31:21 nebula gitea[2637956]:         /usr/lib/go/src/runtime/proc.go:204 (0x442aa8)
Oct 22 08:31:21 nebula gitea[2637956]:                 main: fn()
Oct 22 08:31:21 nebula gitea[2637956]:         /usr/lib/go/src/runtime/asm_amd64.s:1374 (0x478c20)
Oct 22 08:31:21 nebula gitea[2637956]:                 goexit: BYTE        $0x90        // NOP
Oct 22 08:31:21 nebula gitea[2637956]:
Oct 22 08:31:21 nebula gitea[2637956]: 2020/10/22 08:31:21 routers/init.go:86:initDBEngine() [I] Backing off for 1 seconds
Oct 22 08:31:22 nebula gitea[2637956]: 2020/10/22 08:31:22 routers/init.go:79:initDBEngine() [I] ORM engine initialization attempt #8/15...
Oct 22 08:31:22 nebula gitea[2637956]: 2020/10/22 08:31:22 ...ations/migrations.go:338:Migrate() [I] Migration[156]: fix publisher ID for tag releases
Oct 22 08:31:22 nebula gitea[2637956]: 2020/10/22 08:31:22 ...rm/session_schema.go:25:Ping() [I] PING DATABASE sqlite3
Oct 22 08:31:37 nebula gitea[2637956]: 2020/10/22 08:31:36 routers/init.go:85:initDBEngine() [E] ORM engine initialization attempt #8/15 failed. Error: migrate: do migrate: Repository 370 is not exist
Oct 22 08:31:37 nebula gitea[2637956]:         /root/gitea-src/routers/init.go:85 (0x20395f3)
Oct 22 08:31:37 nebula gitea[2637956]:         /root/gitea-src/routers/init.go:177 (0x203a5b1)
Oct 22 08:31:37 nebula gitea[2637956]:         /root/gitea-src/cmd/web.go:153 (0x228669e)
Oct 22 08:31:37 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/app.go:526 (0x16c85bc)
Oct 22 08:31:37 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/command.go:174 (0x16c938d)
Oct 22 08:31:37 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/app.go:279 (0x16c64a7)
Oct 22 08:31:37 nebula gitea[2637956]:         /root/gitea-src/main.go:110 (0x22c6ee9)
Oct 22 08:31:37 nebula gitea[2637956]:         /usr/lib/go/src/runtime/proc.go:204 (0x442aa8)
Oct 22 08:31:37 nebula gitea[2637956]:                 main: fn()
Oct 22 08:31:37 nebula gitea[2637956]:         /usr/lib/go/src/runtime/asm_amd64.s:1374 (0x478c20)
Oct 22 08:31:37 nebula gitea[2637956]:                 goexit: BYTE        $0x90        // NOP
Oct 22 08:31:37 nebula gitea[2637956]:
Oct 22 08:31:37 nebula gitea[2637956]: 2020/10/22 08:31:36 routers/init.go:86:initDBEngine() [I] Backing off for 1 seconds
Oct 22 08:31:38 nebula gitea[2637956]: 2020/10/22 08:31:38 ...rm/session_schema.go:25:Ping() [I] PING DATABASE sqlite3
Oct 22 08:31:38 nebula gitea[2637956]: 2020/10/22 08:31:38 routers/init.go:79:initDBEngine() [I] ORM engine initialization attempt #9/15...
Oct 22 08:31:38 nebula gitea[2637956]: 2020/10/22 08:31:38 ...ations/migrations.go:338:Migrate() [I] Migration[156]: fix publisher ID for tag releases
Oct 22 08:31:50 nebula gitea[2637956]: 2020/10/22 08:31:50 routers/init.go:85:initDBEngine() [E] ORM engine initialization attempt #9/15 failed. Error: migrate: do migrate: Repository 370 is not exist
Oct 22 08:31:50 nebula gitea[2637956]:         /root/gitea-src/routers/init.go:85 (0x20395f3)
Oct 22 08:31:50 nebula gitea[2637956]:         /root/gitea-src/routers/init.go:177 (0x203a5b1)
Oct 22 08:31:50 nebula gitea[2637956]:         /root/gitea-src/cmd/web.go:153 (0x228669e)
Oct 22 08:31:50 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/app.go:526 (0x16c85bc)
Oct 22 08:31:50 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/command.go:174 (0x16c938d)
Oct 22 08:31:50 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/app.go:279 (0x16c64a7)
Oct 22 08:31:50 nebula gitea[2637956]:         /root/gitea-src/main.go:110 (0x22c6ee9)
Oct 22 08:31:50 nebula gitea[2637956]:         /usr/lib/go/src/runtime/proc.go:204 (0x442aa8)
Oct 22 08:31:50 nebula gitea[2637956]:                 main: fn()
Oct 22 08:31:50 nebula gitea[2637956]:         /usr/lib/go/src/runtime/asm_amd64.s:1374 (0x478c20)
Oct 22 08:31:50 nebula gitea[2637956]:                 goexit: BYTE        $0x90        // NOP
Oct 22 08:31:50 nebula gitea[2637956]:
Oct 22 08:31:50 nebula gitea[2637956]: 2020/10/22 08:31:50 routers/init.go:86:initDBEngine() [I] Backing off for 1 seconds
Oct 22 08:31:51 nebula gitea[2637956]: 2020/10/22 08:31:51 routers/init.go:79:initDBEngine() [I] ORM engine initialization attempt #10/15...
Oct 22 08:31:51 nebula gitea[2637956]: 2020/10/22 08:31:51 ...rm/session_schema.go:25:Ping() [I] PING DATABASE sqlite3
Oct 22 08:31:51 nebula gitea[2637956]: 2020/10/22 08:31:51 ...ations/migrations.go:338:Migrate() [I] Migration[156]: fix publisher ID for tag releases
Oct 22 08:32:05 nebula gitea[2637956]: 2020/10/22 08:32:05 routers/init.go:85:initDBEngine() [E] ORM engine initialization attempt #10/15 failed. Error: migrate: do migrate: Repository 370 is not exist
Oct 22 08:32:05 nebula gitea[2637956]:         /root/gitea-src/routers/init.go:85 (0x20395f3)
Oct 22 08:32:05 nebula gitea[2637956]:         /root/gitea-src/routers/init.go:177 (0x203a5b1)
Oct 22 08:32:05 nebula gitea[2637956]:         /root/gitea-src/cmd/web.go:153 (0x228669e)
Oct 22 08:32:05 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/app.go:526 (0x16c85bc)
Oct 22 08:32:05 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/command.go:174 (0x16c938d)
Oct 22 08:32:05 nebula gitea[2637956]:         /root/gitea-src/vendor/github.com/urfave/cli/app.go:279 (0x16c64a7)
Oct 22 08:32:05 nebula gitea[2637956]:         /root/gitea-src/main.go:110 (0x22c6ee9)
Oct 22 08:32:05 nebula gitea[2637956]:         /usr/lib/go/src/runtime/proc.go:204 (0x442aa8)
Oct 22 08:32:05 nebula gitea[2637956]:                 main: fn()
Oct 22 08:32:05 nebula gitea[2637956]:         /usr/lib/go/src/runtime/asm_amd64.s:1374 (0x478c20)
Oct 22 08:32:05 nebula gitea[2637956]:                 goexit: BYTE        $0x90        // NOP
Oct 22 08:32:05 nebula gitea[2637956]:
Oct 22 08:32:05 nebula gitea[2637956]: 2020/10/22 08:32:05 routers/init.go:86:initDBEngine() [I] Backing off for 1 seconds
Oct 22 08:32:06 nebula gitea[2637956]: 2020/10/22 08:32:06 routers/init.go:79:initDBEngine() [I] ORM engine initialization attempt #11/15...
Oct 22 08:32:06 nebula gitea[2637956]: 2020/10/22 08:32:06 ...rm/session_schema.go:25:Ping() [I] PING DATABASE sqlite3
Oct 22 08:32:06 nebula gitea[2637956]: 2020/10/22 08:32:06 ...ations/migrations.go:338:Migrate() [I] Migration[156]: fix publisher ID for tag releases
Oct 22 08:32:20 nebula systemd[1]: Stopping Gitea (Git with a cup of tea)...

Description

I moved past the commit with the subject migration (which has been approved in #6025 ) from a pretty recent commit.
Gitea failed to start properly as the migration failed with the above mentioned messages.
As the migration has not properly executed I could roll back.

@zeripath
Copy link
Contributor

The problem is here:

return fmt.Errorf("Repository %d is not exist", release.RepoID)

Your database contains orphaned releases.

Unfortunately doctor check-db-consistency doesn't check for these.

Therefore we need to do two things:

  • This migration should not fail with an error for a missing object - that is what warn is for
  • Check-db-consistency needs to be extended to check for this inconsistency.

In order to get you going again you could either delete the releases relating to the missing repository with id 370 or create a fake repository with id 370 in the table.

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf
Copy link
Contributor Author

The problem is here:

return fmt.Errorf("Repository %d is not exist", release.RepoID)

Your database contains orphaned releases.

Unfortunately doctor check-db-consistency doesn't check for these.

Therefore we need to do two things:

  • This migration should not fail with an error for a missing object - that is what warn is for
  • Check-db-consistency needs to be extended to check for this inconsistency.

In order to get you going again you could either delete the releases relating to the missing repository with id 370 or create a fake repository with id 370 in the table.

deleted orphaned objects from the db as discussed using

sqlite> delete from release where repo_id=370;

rebuilding Gitea, waiting for the result.

edit: removing the orphaned objects as suggested by @zeripath helped the migration to run, Gitea restarted without further issues

zeripath added a commit to zeripath/gitea that referenced this issue Oct 22, 2020
Signed-off-by: Andrew Thornton <[email protected]>
lunny added a commit to lunny/gitea that referenced this issue Oct 22, 2020
techknowlogick pushed a commit that referenced this issue Oct 22, 2020
* Keep database transactions not too big

* Fix #13255

Signed-off-by: Andrew Thornton <[email protected]>

* Only cache the last repo

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: Andrew Thornton <[email protected]>
@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.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants