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.
did the raspberry shutdown normaly?
or did you cut the power?
The power was cut
Maybe the database is now corupt .. but sqlite should be quite resistant ...
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.
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 Thanks for the feedback! Where can I locate this folder indexers/
?
Edit 1: find / -name indexers
did the trick :)
The path is written in the app.ini config file
@guillep2k It worked, thanks a lot!
I'll leave the issue open until a mod can examine the issue as well.
@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 perhaps add something to FAQ and/or print link to this issue or the FAQ if this hapens into the log?
I've made #7753 to rebuild the indexes via cmd (wink, wink).
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
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?