Gitea 1.9.3 fails to start #4073

Closed
opened 2025-11-02 05:36:38 -06:00 by GiteaMirror · 13 comments
Owner

Originally created by @MuresanVladMihail on GitHub (Oct 7, 2019).

  • Gitea version (or commit ref): 1.9.3
  • Git version: 2.11.0
  • Operating system: Debian (Raspberry PI 3 B+)
  • Database:
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Yesterday I was able to access my gitea page without any kind of problems but today I was not due to this error:

2019/10/07 13:01:40 routers/init.go:98:GlobalInit() [F] Failed to initialize issue indexer: leveldb: manifest corrupted (field 'comparer'): missing [file=MANIFEST-000072]

My first instinct was to update to the latest version (from 1.9.2) but that didn't solve it.
I have to mention that my power was down for a couple of hours, maybe that corrupted the page? When accessing the page I get: 502 Bad Gateway error, everything else that I host works normally.

Originally created by @MuresanVladMihail on GitHub (Oct 7, 2019). - Gitea version (or commit ref): 1.9.3 - Git version: 2.11.0 - Operating system: Debian (Raspberry PI 3 B+) - Database: - [ ] 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 Yesterday I was able to access my gitea page without any kind of problems but today I was not due to this error: ``` 2019/10/07 13:01:40 routers/init.go:98:GlobalInit() [F] Failed to initialize issue indexer: leveldb: manifest corrupted (field 'comparer'): missing [file=MANIFEST-000072] ``` My first instinct was to update to the latest version (from 1.9.2) but that didn't solve it. I have to mention that my power was down for a couple of hours, maybe that corrupted the page? When accessing the page I get: 502 Bad Gateway error, everything else that I host works normally.
Author
Owner

@6543 commented on GitHub (Oct 7, 2019):

did the raspberry shutdown normaly?
or did you cut the power?

@6543 commented on GitHub (Oct 7, 2019): did the raspberry shutdown normaly? or did you cut the power?
Author
Owner

@MuresanVladMihail commented on GitHub (Oct 7, 2019):

The power was cut

@MuresanVladMihail commented on GitHub (Oct 7, 2019): The power was cut
Author
Owner

@6543 commented on GitHub (Oct 7, 2019):

Maybe the database is now corupt .. but sqlite should be quite resistant ...

@6543 commented on GitHub (Oct 7, 2019): Maybe the database is now corupt .. but sqlite should be quite resistant ...
Author
Owner

@MuresanVladMihail commented on GitHub (Oct 7, 2019):

If that's the case, then, perhaps, someone can help me recreate the necessary database for gitea and copy the old content into the newly created one.

@MuresanVladMihail commented on GitHub (Oct 7, 2019): If that's the case, then, perhaps, someone can help me recreate the necessary database for gitea and copy the old content into the newly created one.
Author
Owner

@guillep2k commented on GitHub (Oct 7, 2019):

I think it's not the database (which I suggest you change from sqlite anyway) but the bleve indexes. These are located in indexers/issues.bleve and indexers/issues.queue. AFAIK you can safely delete those and restart your instance (but just in case, just move them to another directory as a backup).

@guillep2k commented on GitHub (Oct 7, 2019): I think it's not the database (which I suggest you change from sqlite anyway) but the bleve indexes. These are located in `indexers/issues.bleve` and `indexers/issues.queue`. AFAIK you can safely delete those and restart your instance (but just in case, just move them to another directory as a backup).
Author
Owner

@MuresanVladMihail commented on GitHub (Oct 7, 2019):

@guillep2k Thanks for the feedback! Where can I locate this folder indexers/?

Edit 1: find / -name indexers did the trick :)

@MuresanVladMihail commented on GitHub (Oct 7, 2019): @guillep2k Thanks for the feedback! Where can I locate this folder `indexers/`? Edit 1: `find / -name indexers` did the trick :)
Author
Owner

@6543 commented on GitHub (Oct 7, 2019):

The path is written in the app.ini config file

@6543 commented on GitHub (Oct 7, 2019): The path is written in the app.ini config file
Author
Owner

@MuresanVladMihail commented on GitHub (Oct 7, 2019):

@guillep2k It worked, thanks a lot!
I'll leave the issue open until a mod can examine the issue as well.

@MuresanVladMihail commented on GitHub (Oct 7, 2019): @guillep2k It worked, thanks a lot! I'll leave the issue open until a mod can examine the issue as well.
Author
Owner

@zeripath commented on GitHub (Oct 10, 2019):

@guillep2k is correct. The bleve index was corrupted when you lost power. Bleve should have some tool to try to fix these indexes but the simplest and often quickest thing to do is to delete it.

I'm not sure what we could do better - I don't like that we Fatal for this but there's not much option other than deleting the index files in these cases, and that has a feeling of being something that we should not do automatically.

As that solves the issue I'm going to close this issue.

@zeripath commented on GitHub (Oct 10, 2019): @guillep2k is correct. The bleve index was corrupted when you lost power. Bleve should have some tool to try to fix these indexes but the simplest and often quickest thing to do is to delete it. I'm not sure what we could do better - I don't like that we Fatal for this but there's not much option other than deleting the index files in these cases, and that has a feeling of being something that we should not do automatically. As that solves the issue I'm going to close this issue.
Author
Owner

@6543 commented on GitHub (Oct 10, 2019):

@zeripath perhaps add something to FAQ and/or print link to this issue or the FAQ if this hapens into the log?

@6543 commented on GitHub (Oct 10, 2019): @zeripath perhaps add something to FAQ and/or print link to this issue or the FAQ if this hapens into the log?
Author
Owner

@guillep2k commented on GitHub (Oct 10, 2019):

I've made #7753 to rebuild the indexes via cmd (wink, wink).

@guillep2k commented on GitHub (Oct 10, 2019): I've made #7753 to rebuild the indexes via cmd (wink, wink).
Author
Owner

@markuman commented on GitHub (Oct 10, 2019):

I got exatly the same with 1.9.3 - but I'm running MariaDB.
I have no idea when it got broken. deleting the database and apply my rsnapshot 7 days ago doesn't solve the probleme. Any ideas about this?

2019-10-10T12:56:21.287058788Z gitea.1.qvjjufk2j117@hetzner    | 2019/10/10 12:56:21 routers/init.go:98:GlobalInit() [F] Failed to initialize issue indexer: leveldb: manifest corrupted (field 'comparer'): missing [file=MANIFEST-000095]
2019-10-10T12:56:21.409112422Z gitea.1.qvjjufk2j117@hetzner    | 2019/10/10 12:56:21 ...dules/setting/git.go:83:newGit() [I] Git Version: 2.22.0, Wire Protocol Version 2 Enabled
2019-10-10T12:56:21.419262889Z gitea.1.qvjjufk2j117@hetzner    | 2019/10/10 12:56:21 routers/init.go:72:GlobalInit() [T] AppPath: /app/gitea/gitea
2019-10-10T12:56:21.419876023Z gitea.1.qvjjufk2j117@hetzner    | 2019/10/10 12:56:21 routers/init.go:73:GlobalInit() [T] AppWorkPath: /app/gitea
2019-10-10T12:56:21.420316858Z gitea.1.qvjjufk2j117@hetzner    | 2019/10/10 12:56:21 routers/init.go:74:GlobalInit() [T] Custom path: /data/gitea
2019-10-10T12:56:21.421329967Z gitea.1.qvjjufk2j117@hetzner    | 2019/10/10 12:56:21 routers/init.go:75:GlobalInit() [T] Log path: /app/gitea/log
2019-10-10T12:56:21.422203780Z gitea.1.qvjjufk2j117@hetzner    | 2019/10/10 12:56:21 ...dules/setting/log.go:226:newLogService() [I] Gitea v1.9.4 built with GNU Make 4.2.1, go1.12.10 : bindata, sqlite, sqlite_unlock_notify
2019-10-10T12:56:21.423319504Z gitea.1.qvjjufk2j117@hetzner    | 2019/10/10 12:56:21 ...dules/setting/log.go:269:newLogService() [I] Gitea Log Mode: Console(Console:info)
2019-10-10T12:56:21.423922969Z gitea.1.qvjjufk2j117@hetzner    | 2019/10/10 12:56:21 ...dules/setting/log.go:178:generateNamedLogger() [I] Access Log: File(file:info)
2019-10-10T12:56:21.423952113Z gitea.1.qvjjufk2j117@hetzner    | 2019/10/10 12:56:21 ...les/setting/cache.go:42:newCacheService() [I] Cache Service Enabled
2019-10-10T12:56:21.423980969Z gitea.1.qvjjufk2j117@hetzner    | 2019/10/10 12:56:21 ...s/setting/session.go:45:newSessionService() [I] Session Service Enabled
2019-10-10T12:56:21.425598861Z gitea.1.qvjjufk2j117@hetzner    | 2019/10/10 12:56:21 routers/init.go:49:initDBEngine() [I] Beginning ORM engine initialization.
2019-10-10T12:56:21.425623693Z gitea.1.qvjjufk2j117@hetzner    | 2019/10/10 12:56:21 routers/init.go:51:initDBEngine() [I] ORM engine initialization attempt #1/10...
2019-10-10T12:56:21.426574675Z gitea.1.qvjjufk2j117@hetzner    | 2019/10/10 12:56:21 ...-xorm/xorm/engine.go:329:Ping() [I] PING DATABASE mysql
2019-10-10T12:56:21.920615698Z gitea.1.qvjjufk2j117@hetzner    | 2019/10/10 12:56:21 models/models.go:305:NewEngine() [W] Table user Column full_name db default is 'NULL', struct default is 
2019-10-10T12:56:21.921965168Z gitea.1.qvjjufk2j117@hetzner    | 2019/10/10 12:56:21 models/models.go:305:NewEngine() [W] Table user Column keep_email_private db default is NULL, struct default is 
2019-10-10T12:56:21.922617282Z gitea.1.qvjjufk2j117@hetzner    | 2019/10/10 12:56:21 models/models.go:305:NewEngine() [W] Table user Column must_change_password db default is 0, struct default is false
@markuman commented on GitHub (Oct 10, 2019): I got exatly the same with 1.9.3 - but I'm running MariaDB. I have no idea when it got broken. deleting the database and apply my rsnapshot 7 days ago doesn't solve the probleme. Any ideas about this? ``` 2019-10-10T12:56:21.287058788Z gitea.1.qvjjufk2j117@hetzner | 2019/10/10 12:56:21 routers/init.go:98:GlobalInit() [F] Failed to initialize issue indexer: leveldb: manifest corrupted (field 'comparer'): missing [file=MANIFEST-000095] 2019-10-10T12:56:21.409112422Z gitea.1.qvjjufk2j117@hetzner | 2019/10/10 12:56:21 ...dules/setting/git.go:83:newGit() [I] Git Version: 2.22.0, Wire Protocol Version 2 Enabled 2019-10-10T12:56:21.419262889Z gitea.1.qvjjufk2j117@hetzner | 2019/10/10 12:56:21 routers/init.go:72:GlobalInit() [T] AppPath: /app/gitea/gitea 2019-10-10T12:56:21.419876023Z gitea.1.qvjjufk2j117@hetzner | 2019/10/10 12:56:21 routers/init.go:73:GlobalInit() [T] AppWorkPath: /app/gitea 2019-10-10T12:56:21.420316858Z gitea.1.qvjjufk2j117@hetzner | 2019/10/10 12:56:21 routers/init.go:74:GlobalInit() [T] Custom path: /data/gitea 2019-10-10T12:56:21.421329967Z gitea.1.qvjjufk2j117@hetzner | 2019/10/10 12:56:21 routers/init.go:75:GlobalInit() [T] Log path: /app/gitea/log 2019-10-10T12:56:21.422203780Z gitea.1.qvjjufk2j117@hetzner | 2019/10/10 12:56:21 ...dules/setting/log.go:226:newLogService() [I] Gitea v1.9.4 built with GNU Make 4.2.1, go1.12.10 : bindata, sqlite, sqlite_unlock_notify 2019-10-10T12:56:21.423319504Z gitea.1.qvjjufk2j117@hetzner | 2019/10/10 12:56:21 ...dules/setting/log.go:269:newLogService() [I] Gitea Log Mode: Console(Console:info) 2019-10-10T12:56:21.423922969Z gitea.1.qvjjufk2j117@hetzner | 2019/10/10 12:56:21 ...dules/setting/log.go:178:generateNamedLogger() [I] Access Log: File(file:info) 2019-10-10T12:56:21.423952113Z gitea.1.qvjjufk2j117@hetzner | 2019/10/10 12:56:21 ...les/setting/cache.go:42:newCacheService() [I] Cache Service Enabled 2019-10-10T12:56:21.423980969Z gitea.1.qvjjufk2j117@hetzner | 2019/10/10 12:56:21 ...s/setting/session.go:45:newSessionService() [I] Session Service Enabled 2019-10-10T12:56:21.425598861Z gitea.1.qvjjufk2j117@hetzner | 2019/10/10 12:56:21 routers/init.go:49:initDBEngine() [I] Beginning ORM engine initialization. 2019-10-10T12:56:21.425623693Z gitea.1.qvjjufk2j117@hetzner | 2019/10/10 12:56:21 routers/init.go:51:initDBEngine() [I] ORM engine initialization attempt #1/10... 2019-10-10T12:56:21.426574675Z gitea.1.qvjjufk2j117@hetzner | 2019/10/10 12:56:21 ...-xorm/xorm/engine.go:329:Ping() [I] PING DATABASE mysql 2019-10-10T12:56:21.920615698Z gitea.1.qvjjufk2j117@hetzner | 2019/10/10 12:56:21 models/models.go:305:NewEngine() [W] Table user Column full_name db default is 'NULL', struct default is 2019-10-10T12:56:21.921965168Z gitea.1.qvjjufk2j117@hetzner | 2019/10/10 12:56:21 models/models.go:305:NewEngine() [W] Table user Column keep_email_private db default is NULL, struct default is 2019-10-10T12:56:21.922617282Z gitea.1.qvjjufk2j117@hetzner | 2019/10/10 12:56:21 models/models.go:305:NewEngine() [W] Table user Column must_change_password db default is 0, struct default is false ```
Author
Owner

@markuman commented on GitHub (Oct 10, 2019):

Ok, using also the gitea backup folder solves the problem.
but the dozens of warnings are still present. do I need to worry about them?

@markuman commented on GitHub (Oct 10, 2019): Ok, using also the gitea backup folder solves the problem. but the dozens of warnings are still present. do I need to worry about them?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4073