mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-13 02:57:44 -05:00
Failed to initialize issue indexer: invalid argument -- will not install #4137
Closed
opened 2025-11-02 05:39:54 -06:00 by GiteaMirror
·
20 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.16.3
v1.16.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
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
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#4137
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 @brandonkal on GitHub (Oct 17, 2019).
[x]):https://gist.github.com/brandonkal/299fa99968e5939633c825045a33cffe
Description
This error occurs when the PV is on a specific mounted drive that is a folder shared with the Kubernetes host (Ubuntu 18.04 KVM with microk8s). The logged error is not descriptive enough to conclude it is a permissions issue. From the host, it is clear the files are created in the mounted location without issue.
@guillep2k commented on GitHub (Oct 22, 2019):
Could you please post your
[indexer]configuration?@guillep2k commented on GitHub (Nov 13, 2019):
@brandonkal One user at Discord had the same problem. It turned out that Gitea was running in a virtual box shared folder; running Gitea on a non-shared folder solved his issue. Please check if anything similar might be happening to you.
@brandonkal commented on GitHub (Nov 13, 2019):
It's just vanilla microk8s on Ubuntu 18.04 with Racher's local path provisioner.
As stated, the bug here is that the error is not descriptive of whatever disk IO issue Gitea is having.
It was an NFS or SMB mounted volume backing the PV. I know vagrant/virtual box uses network shares for shared volumes. So it could be a similar Gitea bug.
@lunny commented on GitHub (Nov 13, 2019):
Please notice, indxer folder cannot be shared by multiple gitea instance.
@zeripath commented on GitHub (Nov 13, 2019):
So @brandonkal the invalid argument is the error that comes out of bleve - it doesn't appear to tell us anything more than that.
I agree it is opaque to the extreme but unless anyone can find a way of getting bleve to tell us what the problem is, that's what we're stuck with.
@stale[bot] commented on GitHub (Jan 12, 2020):
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
@brandonkal commented on GitHub (Jan 12, 2020):
See you next month bot. #notstale
@MattDahEpic commented on GitHub (Feb 24, 2020):
This also occurs when the work directory is on a 9p virtio mount.
@Kramins commented on GitHub (Dec 16, 2020):
I am also having this problem on microk8s and my data volume is on a 9p virtio mount as @MattDahEpic mentioned.
Are there any known workarounds that would allow me to keep my data volume mounted over 9p?
Edit:
After a little research, turns out I can change the indexer type to Database
ISSUE_INDEXER_TYPE = db
@lunny commented on GitHub (Dec 17, 2020):
For most Gitea instances,
dbis enough.@aaronjwood commented on GitHub (Jan 2, 2021):
I second this issue when using a 9p mount via kvm/qemu. Changing the indexer type to
dbfixes it. I don't have much context on Bleve indexer, does anyone know why it would break under a specific mount type? I've had Gitea working with NFS before, I figured things would have broken there first...@aaronjwood commented on GitHub (Jan 2, 2021):
I'm guessing this has something to do with mmap being used and it not working across the boundary of a hypervisor...?
@aaronjwood commented on GitHub (Jan 2, 2021):
Yeah, you need to add
cache=mmapmount option for this to work if you're using 9p mounts. The mmap call is what is failing here. I had to change the cache setting to get Plex to work too which is also using a 9p mount (their sqlite instance is what is calling mmap) so I decided to just applycache=mmapto my setup.@lunny commented on GitHub (Jan 2, 2021):
@aaronjwood Thanks for the clarify.
I will summary something here for the three issue indexer types,
bleve,dbandelasticsearch. BTW: For code indexer types, there are onlybleveandelasticsearch.bleveis the default currently and it's only suitable for single Gitea instance and don't share the indexer data with other programs. A local filesystem is recommended.dbis low efficient which use database's indexer feature but you can share between Gitea instances. This is only for issue indexer.elasticsearchwill use an elasticsearch instance or cluster to do index and search. You can share between Gitea instances. But there are also something should be improved here. All Gitea instances may check if the indexer has been created when first start.@safag05 commented on GitHub (Jun 14, 2021):
I am trying to change my repo indexer to elasticsearch however Gitea tries to restart over and over again. On the logs I see this:
Error: health check timeout: no Elasticsearch node availableDo I need to set up Elastic Search node separately from Gitea in order to use it? Isn't just enablingREPO_INDEXER_TYPE = elasticsearchnot sufficient?@lunny commented on GitHub (Jun 14, 2021):
see https://docs.gitea.io/en-us/config-cheat-sheet/#indexer-indexer
@safag05 commented on GitHub (Jun 14, 2021):
Thanks for sharing that @lunny I have been looking into that already but I am noob on this indexer. I have the following in my app.ini and it is failing
REPO_INDEXER_ENABLED = trueREPO_INDEXER_TYPE = elasticsearchREPO_INDEXER_PATH = indexers/repos.elasticsearchI see that there is a config for
REPO_INDEXER_CONN_STRis that something that I need to configure as well? It has an example ofhttp://elastic:changeme@localhost:9200but not sure where to get such URL from.@lunny commented on GitHub (Jun 15, 2021):
When
REPO_INDEXER_TYPE = elasticsearch, you should useREPO_INDEXER_CONN_STR@safag05 commented on GitHub (Jun 15, 2021):
Sorry just to clarify as I am noob with this. In order to use
REPO_INDEXER_CONN_STRI would need elastic search up and running right? And will need to use it's URL to connect it to Gitea viaREPO_INDEXER_CONN_STR?@lunny commented on GitHub (Oct 21, 2021):
See https://docs.gitea.io/en-us/config-cheat-sheet/#indexer-indexer. I will close this issue currently because it's upstream related and there are some workrounds.