gitea: Error 500 after pushing to new repos - docker

Further to issue #7499, at the request of @sapk, I am opening a new issue to track this problem on docker. Get error 500 in webui after pushing to or initialising a repo. @sapk suspects this is related to gitea not being able to read some folders for various reason. But shelling into the container and writing files in the repos dir works fine. Example of error:

[Macaron] 2019-08-26 18:04:01: Completed GET /myorg/myrepo 500 Internal Server Error in 58.821377ms

I’ve tried SSH & HTTPS, OpenID & local login and private & non-private. Restarting container\pod doesn’t help.

  • Gitea version (or commit ref): v1.9.2
  • Git version: 2.17.1
  • Operating system: Whatever the docker image is.
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Can be fixed on systemd-based systems by adding line to systemd config file: ReadWritePaths=/path/to/git/repos But this does not exist in docker container.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

In memcached container, find the port it’s listening on: netstat -peanut |grep memc

Then in gitea container:

vi /data/gitea/conf/app.ini

and, in cache section, check the port in the HOST= value matches. Not sure, but think I finally had to reboot the container: (reboot).

Fixed. There was a mismatch between the tcp port memcached was listening on and app.ini setting:

[cache]
HOST     = 127.0.0.1:<PORT>

Thanks @typeless for establishing that it wasn’t a problem with the Dockerfile.