mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-15 20:09:18 -05:00
Crashes after Gitea is configured - "Unable to initialize Bleve Issue Indexer" #5272
Closed
opened 2025-11-02 06:19:51 -06:00 by GiteaMirror
·
18 comments
No Branch/Tag Specified
main
release/v1.25
release/v1.24
release/v1.23
release/v1.22
release/v1.21
release/v1.20
release/v1.19
release/v1.18
release/v1.17
release/v1.16
release/v1.15
release/v1.14
release/v1.13
release/v1.12
release/v1.11
release/v1.10
release/v1.9
release/v1.8
v1.25.3
v1.25.2
v1.25.1
v1.25.0
v1.24.7
v1.25.0-rc0
v1.26.0-dev
v1.24.6
v1.24.5
v1.24.4
v1.24.3
v1.24.2
v1.24.1
v1.24.0
v1.23.8
v1.24.0-rc0
v1.25.0-dev
v1.23.7
v1.23.6
v1.23.5
v1.23.4
v1.23.3
v1.23.2
v1.23.1
v1.23.0
v1.23.0-rc0
v1.24.0-dev
v1.22.6
v1.22.5
v1.22.4
v1.22.3
v1.22.2
v1.22.1
v1.22.0
v1.23.0-dev
v1.22.0-rc1
v1.21.11
v1.22.0-rc0
v1.21.10
v1.21.9
v1.21.8
v1.21.7
v1.21.6
v1.21.5
v1.21.4
v1.21.3
v1.21.2
v1.20.6
v1.21.1
v1.21.0
v1.21.0-rc2
v1.21.0-rc1
v1.20.5
v1.22.0-dev
v1.21.0-rc0
v1.20.4
v1.20.3
v1.20.2
v1.20.1
v1.20.0
v1.19.4
v1.21.0-dev
v1.20.0-rc2
v1.20.0-rc1
v1.20.0-rc0
v1.19.3
v1.19.2
v1.19.1
v1.19.0
v1.19.0-rc1
v1.20.0-dev
v1.19.0-rc0
v1.18.5
v1.18.4
v1.18.3
v1.18.2
v1.18.1
v1.18.0
v1.17.4
v1.18.0-rc1
v1.19.0-dev
v1.18.0-rc0
v1.17.3
v1.17.2
v1.17.1
v1.17.0
v1.17.0-rc2
v1.16.9
v1.17.0-rc1
v1.18.0-dev
v1.16.8
v1.16.7
v1.16.6
v1.16.5
v1.16.4
v1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rc2
v1.3.3
v1.4.0-rc1
v1.3.2
v1.3.1
v1.3.0
v1.3.0-rc2
v1.3.0-rc1
v1.2.3
v1.2.2
v1.2.1
v1.2.0
v1.2.0-rc3
v1.2.0-rc2
v1.1.4
v1.2.0-rc1
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.2
v1.0.1
v1.0.0
v0.9.99
Labels
Clear labels
$20
$250
$50
$500
backport/done
💎 Bounty
docs-update-needed
good first issue
hacktoberfest
issue/bounty
issue/confirmed
issue/critical
issue/duplicate
issue/needs-feedback
issue/not-a-bug
issue/regression
issue/stale
issue/workaround
lgtm/need 2
modifies/api
modifies/translation
outdated/backport/v1.18
outdated/theme/markdown
outdated/theme/timetracker
performance/bigrepo
performance/cpu
performance/memory
performance/speed
pr/breaking
proposal/accepted
proposal/rejected
pr/wip
pull-request
reviewed/wontfix
💰 Rewarded
skip-changelog
status/blocked
topic/accessibility
topic/api
topic/authentication
topic/build
topic/code-linting
topic/commit-signing
topic/content-rendering
topic/deployment
topic/distribution
topic/federation
topic/gitea-actions
topic/issues
topic/lfs
topic/mobile
topic/moderation
topic/packages
topic/pr
topic/projects
topic/repo
topic/repo-migration
topic/security
topic/theme
topic/ui
topic/ui-interaction
topic/ux
topic/webhooks
topic/wiki
type/bug
type/deprecation
type/docs
type/enhancement
type/feature
type/miscellaneous
type/proposal
type/question
type/refactoring
type/summary
type/testing
type/upstream
Mirrored from GitHub Pull Request
No Label
issue/not-a-bug
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/gitea#5272
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Nathan13888 on GitHub (Apr 20, 2020).
[x]):Description
Using the instructions found on the website I've make a Mysql server in Docker and setup using the database preparation instructions. I could guarantee that the Docker Mysql server works because I could connect and control the server using Mysql Workbench. I could also attest that the creditial and permissions for the
I've tried many times with different settings. Also dumped the entire Database and persistant files of Gitea between test runs. I would repeat the same problematic result everytime.
I suspect it might have to do with the fact I am using Portainer (not sure what's the difference). Not sure...
Before, I've tried using Docker Compose I ran into another problem that is why I didn't use that.
To replicate my problem:
Make a Mysql DB, pretty much default. connect to same network
Gitea using settings below, go to gitea's webpage, go to login
Enter DB info and save
Saves the info, reloads and crashes. Crashes everytime afterwards as well.
Screenshots
Gitea Docker
Docker Settings

Docker logs, shows Gitea terminating for no reason... repeatedly.

Mysql Docker
@zeripath commented on GitHub (Apr 20, 2020):
is there anything in /dat/gitea/log? Can Gitea even write to /data/gitea/log?
@Nathan13888 commented on GitHub (Apr 20, 2020):
Sorry, clicked the wrong button haha.
Anyways, should have included the log.
So, yes that path could be read. The log file is too big to post entirely but the last few lines mentioned what went wrong...
2020/04/18 22:06:39 routers/init.go:99:GlobalInit() [I] ORM engine initialization successful!
2020/04/18 22:06:39 ...orm/dialect_mysql.go:431:GetTables() [I] [SQL] SELECT
TABLE_NAME,ENGINE,TABLE_ROWS,AUTO_INCREMENT,TABLE_COMMENTfromINFORMATION_SCHEMA.TABLESWHERETABLE_SCHEMA=? AND (ENGINE='MyISAM' ORENGINE= 'InnoDB' ORENGINE= 'TokuDB') [giteadb]2020/04/18 22:06:39 ...orm/dialect_mysql.go:320:GetColumns() [I] [SQL] SELECT
COLUMN_NAME,IS_NULLABLE,COLUMN_DEFAULT,COLUMN_TYPE,COLUMN_KEY,EXTRA,COLUMN_COMMENTFROMINFORMATION_SCHEMA.COLUMNSWHERETABLE_SCHEMA= ? ANDTABLE_NAME= ? [giteadb oauth2_session]2020/04/18 22:06:39 ...orm/dialect_mysql.go:460:GetIndexes() [I] [SQL] SELECT
INDEX_NAME,NON_UNIQUE,COLUMN_NAMEFROMINFORMATION_SCHEMA.STATISTICSWHERETABLE_SCHEMA= ? ANDTABLE_NAME= ? [giteadb oauth2_session]2020/04/18 22:06:39 .../xorm/session_raw.go:78:queryRows() [I] [SQL] SELECT
id,type,name,is_actived,is_sync_enabled,cfg,created_unix,updated_unixFROMlogin_sourceWHERE (is_actived = ? and type = ?) []interface {}{true, 6} - took: 409.114µs2020/04/18 22:06:39 .../xorm/session_raw.go:78:queryRows() [I] [SQL] SELECT repo.id FROM
repositoryrepo WHERE repo.num_watches!=(SELECT COUNT() FROMwatchWHERE repo_id=repo.id AND mode<>2) - took: 325.528µs2020/04/18 22:06:39 .../xorm/session_raw.go:78:queryRows() [I] [SQL] SELECT repo.id FROM
repositoryrepo WHERE repo.num_stars!=(SELECT COUNT() FROMstarWHERE repo_id=repo.id) - took: 189.775µs2020/04/18 22:06:39 .../xorm/session_raw.go:78:queryRows() [I] [SQL] SELECT label.id FROM
labelWHERE label.num_issues!=(SELECT COUNT() FROMissue_labelWHERE label_id=label.id) - took: 276.516µs2020/04/18 22:06:39 .../xorm/session_raw.go:78:queryRows() [I] [SQL] SELECT
user.id FROMuserWHEREuser.num_repos!=(SELECT COUNT() FROMrepositoryWHERE owner_id=user.id) - took: 213.038µs2020/04/18 22:06:39 .../xorm/session_raw.go:196:exec() [I] [SQL] DELETE FROM
deleted_branchWHERE (deleted_unix < ?) []interface {}{1587175599} - took: 1.53767ms2020/04/18 22:06:39 .../xorm/session_raw.go:78:queryRows() [I] [SQL] SELECT
issue.id FROMissueWHEREissue.num_comments!=(SELECT COUNT() FROMcommentWHERE issue_id=issue.id AND type=0) - took: 447.585µs2020/04/18 22:06:39 .../xorm/session_raw.go:78:queryRows() [I] [SQL] SELECT
id,owner_id,lower_name,name,description,website,original_service_type,original_url,default_branch,num_watches,num_stars,num_forks,num_issues,num_closed_issues,num_pulls,num_closed_pulls,num_milestones,num_closed_milestones,is_private,is_empty,is_archived,is_mirror,status,is_fork,fork_id,is_template,template_id,size,is_fsck_enabled,close_issues_via_commit_in_any_branch,topics,avatar,created_unix,updated_unixFROMrepositoryWHERE (id > 0) - took: 1.24857ms2020/04/18 22:06:39 .../xorm/session_raw.go:78:queryRows() [I] [SQL] SELECT
external_id,user_id,login_source_id,raw_data,provider,email,name,first_name,last_name,nick_name,description,avatar_url,location,access_token,access_token_secret,refresh_token,expires_atFROMexternal_login_userWHERE provider=? ORDER BY login_source_id ASC, external_id ASC LIMIT 100 []interface {}{"github"} - took: 1.264932ms2020/04/18 22:06:39 .../xorm/session_raw.go:78:queryRows() [I] [SQL] SELECT repo.id FROM
repositoryrepo WHERE repo.num_closed_issues!=(SELECT COUNT() FROMissueWHERE repo_id=repo.id AND is_closed=? AND is_pull=?) []interface {}{true, false} - took: 683.466µs2020/04/18 22:06:39 .../xorm/session_raw.go:78:queryRows() [I] [SQL] SELECT repo.id FROM
repositoryrepo WHERE repo.num_closed_pulls!=(SELECT COUNT() FROMissueWHERE repo_id=repo.id AND is_closed=? AND is_pull=?) []interface {}{true, true} - took: 508.8µs2020/04/18 22:06:39 .../xorm/session_raw.go:78:queryRows() [I] [SQL] SELECT repo.id FROM
repositoryrepo WHERE repo.num_forks!=(SELECT COUNT() FROMrepositoryWHERE fork_id=repo.id) - took: 290.683µs2020/04/18 22:06:39 ...er/issues/indexer.go:142:func2() [I] PID 15: Initializing Issue Indexer: bleve
2020/04/18 22:06:39 .../xorm/session_raw.go:78:queryRows() [I] [SQL] SELECT
pull_request.idFROMpull_requestWHERE (status=?) []interface {}{1} - took: 521.433µs2020/04/18 22:06:39 .../xorm/session_raw.go:78:queryRows() [I] [SQL] SELECT
id,repo_id,hook_id,uuid,type,url,signature,payload_content,http_method,content_type,event_type,is_ssl,is_delivered,delivered,is_succeed,request_content,response_contentFROMhook_taskWHERE (is_delivered=?) []interface {}{false} - took: 499.954µs2020/04/18 22:06:40 ...er/issues/indexer.go:150:func2() [F] Unable to initialize Bleve Issue Indexer: no such device
@zeripath commented on GitHub (Apr 20, 2020):
Well that's the hint. You need to set your indexer configuration correctly, in particular the
ISSUE_INDEXER_PATHsetting in[indexer]. See https://docs.gitea.io/en-us/config-cheat-sheet/#indexer-indexer@Nathan13888 commented on GitHub (Apr 21, 2020):
Hi @zeripath, I did some trial and error before resorting to here again.
I've tried a few other settings using the link you sent too. Still doesn't work... because of other problems (which I won't mentioned since it's prob the config)
So far, the Docker does NOT have any settings that were changed, so everything in
[indexer]should be default.As for the
ISSUE_INDEXER_PATHsetting, I couldn't find any other documentation or info on docs.gitea.io for what to set this to. The official documentation doesn't seem to talk about setting this particular setting.So what exactly should I set for this anyways?
@zeripath commented on GitHub (Apr 21, 2020):
Could you paste your app.ini (suitably sanitized please.)
You would need to add a
[indexer]section to your app.ini and within that[indexer]section setISSUE_INDEXER_PATHto something appropriate.However, it would be useful to work out what the default path is - as clearly this is not correct for the docker.
@zeripath commented on GitHub (Apr 21, 2020):
Also what version of Gitea are you using?
@Nathan13888 commented on GitHub (Apr 21, 2020):
Hi @zeripath. I have used both version 1.0 and whatever is at "latest" before. Both have the same problem, errors and symptoms.
I've zipped app.ini as it is right now. Haven't changed anything included the pass which isn't salted... whatever.
I basically haven't changed anything different from whatever was in the Docker Documentation. Nothing really that would cause problems. Other than the fact that I am using regular Docker (in portainer) rather than Docker Compose. Shouldn't make a difference really.
As for the
ISSUE_INDEXER_PATHsetting, it is the default setting.Mine:

Docs:

app.zip
@Nathan13888 commented on GitHub (Apr 21, 2020):
Just checked the persistent data from the Docker.
/data which mounted to a host file
I found the issues.bleve which is a folder.
Just writing this just incase this is important
Btw, gitea runs as the user "tmod" fyi.
Permissions:

@guillep2k commented on GitHub (Apr 22, 2020):
@Nathan13888 you've said:
Gitea 1.0 is a very old version, "and whatever is at latest" is not very descriptive. Please let us know your current version of Gitea, which you can obtain by running:
from inside your docker instance.
@Nathan13888 commented on GitHub (Apr 22, 2020):
@guillep2k Thanks for tuning in.
What I mean is that I tried both version 1.0 and the version using the tag "latest". I only tried 1.0 because "latest" wasn't working for me (never did, always crashed after setup).
Anyways, this is what I found:
Gitea version 1.12.0+dev-201-g50475fff0 built with GNU Make 4.2.1, go1.14.2 : bindata, sqlite, sqlite_unlock_notify@6543 commented on GitHub (Apr 22, 2020):
use at least 1.11.x version ... migration from v1.0 has ben droped in v1.12!
and for the error: just try to delete the indexer files
@Nathan13888 commented on GitHub (Apr 22, 2020):
Hey all, I've deleted everything again to start from scratch. I've recreated a new Docker container using the same 1.12 version of Gitea.
The settings are the same as the ones in my first post.
Upon creation, I open the install page and enter the database password and submit the info.
Right afterwards, when I reload my browser, the website is gone (after a crash). When starting the container again, it crashes. in the log file, the same issue is here.
Using @6543 's suggestion, I deleted the files in the
/data/gitea/indexers/folder. I start the Docker again, crashes as usual but the deleted files weren't recreated afterwards either. The log says the same error.Here's the line that keeps coming back:
@zeripath commented on GitHub (Apr 22, 2020):
Ok it looks like for some reason bleve doesn't like that filesystem. I guess there's something odd about it - @lunny might know more. What's your host system?
In any case the workaround is to use the db issue indexer.
In app.ini:
@Nathan13888 commented on GitHub (Apr 22, 2020):
I see. Interesting observation. The server I'm running this on is my home server that also contains my NAS (which is really built out of consumer parts).
The volume the Gitea Docker runs off is this encrypted drive pool.
The pool consists of some WD Red drives pooled together using MergerFS. The base FS of the drives is XFS with Luks. I'll try changing this setting and report my results.
@Nathan13888 commented on GitHub (Apr 22, 2020):
Okay, what a success! This one-liner fixed everything! It doesn't crash now. Awesome.
Btw, adding onto my last message, the server (running Docker) runs on Debian Buster.
Thanks @zeripath and all the others for all your help all along.
@Nathan13888 commented on GitHub (Apr 22, 2020):
Changed the title so it is easier for others to find it.
@jshank commented on GitHub (May 28, 2020):
This should really go in the Installation with Docker page as I had the exact same problem. It seems like the default setup of gitea doesn't work well with the fairly common use of MergerFS.
Linuxserver.io The Perfect Media Server - 2019 Edition
Serverbuilds.net Setting up media server using Ubuntu and SnapRaid
Symptoms
Using the exact Installation with Docker steps, the docker instance crashes without details at the end of setup yeilding
Received signal 15; terminating.Steps to diagnose and resolve
/gitea-data/gitea/conf/app.inias follow[F] Unable to initialize Bleve Issue Indexer at path: /data/gitea/indexers/issues.bleve Error: no such device/gitea-data/gitea/conf/app.inias follow@ghost commented on GitHub (Oct 30, 2020):
Thank you very much @jshank ! I don't know why I thought because I had Docker running on Windows Server 2019 I couldn't use Gitea. But with your modification it's working!