gitea: Failed to initialize issue indexer: invalid argument -- will not install

  • Gitea version (or commit ref): gitea/gitea:1.9.4-linux-amd64 (also an issue on gitea:latest)
  • Git version: 2.17.1
  • Operating system: Kubernetes
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

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.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 5
  • Comments: 20 (9 by maintainers)

Most upvoted comments

@aaronjwood Thanks for the clarify.

I will summary something here for the three issue indexer types, bleve, db and elasticsearch. BTW: For code indexer types, there are only bleve and elasticsearch.

  • bleve is 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.
  • db is low efficient which use database’s indexer feature but you can share between Gitea instances. This is only for issue indexer.
  • elasticsearch will 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.

Yeah, you need to add cache=mmap mount 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 apply cache=mmap to my setup.

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

This also occurs when the work directory is on a 9p virtio mount.