Skip to content
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

Gitea 1.9.3 fails to start #8412

Closed
2 of 7 tasks
MuresanVladMihail opened this issue Oct 7, 2019 · 13 comments
Closed
2 of 7 tasks

Gitea 1.9.3 fails to start #8412

MuresanVladMihail opened this issue Oct 7, 2019 · 13 comments

Comments

@MuresanVladMihail
Copy link

  • 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.

@6543
Copy link
Member

6543 commented Oct 7, 2019

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

@MuresanVladMihail
Copy link
Author

The power was cut

@6543
Copy link
Member

6543 commented Oct 7, 2019

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

@MuresanVladMihail
Copy link
Author

MuresanVladMihail commented 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.

@guillep2k
Copy link
Member

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).

@MuresanVladMihail
Copy link
Author

MuresanVladMihail commented Oct 7, 2019

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

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

@6543
Copy link
Member

6543 commented Oct 7, 2019

The path is written in the app.ini config file

@MuresanVladMihail
Copy link
Author

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

@zeripath
Copy link
Contributor

@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.

@6543
Copy link
Member

6543 commented 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?

@guillep2k
Copy link
Member

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

@markuman
Copy link

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
Copy link

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?

@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

No branches or pull requests

5 participants