-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[Docker] Gitea not running when data directory is mounted externally from VM #15450
Comments
Is any file written to the mounted volumes? Does uid 1000 have permission to read/write in the mounted volumes? |
@johanvdw , yup, those bases are covered. I've just had some time to test it on one other VM host, with exactly the same configuration, and somehow it works. Will investigate further and report back. Have you ever seen this error before? Any common problems and solutions I should look at first? Google didn't yield anything useful for me. |
I still have no idea why. I am using the same two ubuntu 20.0.4 VM to run my docker containers. One of them works, and the other doesn't. They are configured identically. Nevertheless, I kept searching and found similar issues for posterity: |
Reporting back to say that it actually doesn't work on the other VM either, for the same reason. It worked because I mistakenly used SQLite on the second host. With MariaDB or MySQL, the same error shows. This, then, is highly likely due to the go-sql-driver error I mentioned above. |
Look at the logs, in particular the log line marked
The problem is that Bleve cannot lock the file. You will need to either switch to a filesystem that bleve can support or change the indexer type: [indexer]
ISSUE_INDEXER_TYPE=db ; or use elasticsearch if you have one |
@zeripath Thanks! I really wasn't sure what to make of that. The storage is on ZFS. Elasticsearch has always had the same problem for me with ZFS too. Anyway, I will ask on bleve's repo about this. Up to mods if they decide this to be closed or remain open here. Cheers! |
After reading the issue in the upstream repo, I think it seems not a bug, neither Gitea side nor Bleve/ZFS side. |
[x]
):Description
I tried spinning up a docker container based on the official documentation, but I kept getting the error in logs (see Logs), in the Mariadb mysql container.
For further context, my docker host is a VM, with some volumes mounted to the host.
If you need more details of my hypervisor and volume drivers, let me know, but I think the issue here may be in gitea's code as I am able to run many applications on this set up.
Let /srv/ be the directory in the VM itself, and let /srvmnt/ be the directory where the external volume is mounted into the VM.
Here are my findings from testing:
"data" refers to the docker mounted directory for the gitea web app based on the docker-compose.yml file below
"mysql" refers to the docker mounted directory for the mysql container
Where it says "ok", everything works fine, as intended.
Where it says "error", what happened was when I spun up the container, navigated to the web host and port, gitea greeted me with the installation. When the installation is completed (using default settings), it crashes and I can't visit the same url anymore. 404. Upon inspecting the docker logs, you'll see what is shown in Logs below. Looks normal for the Gitea container, but the mariadb instance is throwing the error
[Warning] Aborted connection 11 to db: 'gitea' user: 'gitea' host: '172.30.0.3' (Got an error reading communication packets),
However, as shown in my table above, it is not an error when mounting the mariadb instance on the external drive. Error occurs when mounting the gitea data directory externally.
docker-compose.yml:
Logs:
Mysql (Mariadb) Logs
Gitea Logs
The text was updated successfully, but these errors were encountered: