I am trying to install gitea for the first time on Ubuntu server 22.04 LTS
The systemd unit (provided template one that the install documentation suggests using) seems to hang for me. I am just evaluating gitea at this stage, so wanted to just fire it up and let it use sqlite for its storage back-end etc. So I have left the defaults in there.
Here’s the bizarre thing, despite systemd saying the service failed to activate, there is a process running and I can reach the installation page in a web browser if I point it at ip:3000
Running it manually as the suggested ‘git’ user (the same way the systemd unit file attempts to start it)
git@ubuntuserver:~$ export GITEA_WORK_DIR=/var/lib/gitea git@ubuntuserver:~$ /usr/local/bin/gitea web --config /etc/gitea/app.ini 2023/11/16 14:17:56 cmd/web.go:242:runWeb() [I] Starting Gitea on PID: 6963 2023/11/16 14:17:56 cmd/web.go:111:showWebStartupMessage() [I] Gitea version: 1.21.0 built with GNU Make 4.3, go1.21.4 : bindata, sqlite, sqlite_unlock_notify 2023/11/16 14:17:56 cmd/web.go:112:showWebStartupMessage() [I] * RunMode: prod 2023/11/16 14:17:56 cmd/web.go:113:showWebStartupMessage() [I] * AppPath: /usr/local/bin/gitea 2023/11/16 14:17:56 cmd/web.go:114:showWebStartupMessage() [I] * WorkPath: /var/lib/gitea 2023/11/16 14:17:56 cmd/web.go:115:showWebStartupMessage() [I] * CustomPath: /var/lib/gitea/custom 2023/11/16 14:17:56 cmd/web.go:116:showWebStartupMessage() [I] * ConfigFile: /etc/gitea/app.ini 2023/11/16 14:17:56 cmd/web.go:117:showWebStartupMessage() [I] Prepare to run install page 2023/11/16 14:17:56 cmd/web.go:304:listen() [I] Listen: http://0.0.0.0:3000 2023/11/16 14:17:56 cmd/web.go:308:listen() [I] AppURL(ROOT_URL): http://localhost:3000/ 2023/11/16 14:17:56 ...s/graceful/server.go:70:NewServer() [I] Starting new Web server: tcp:0.0.0.0:3000 on PID: 6963
This logging is a bit misleading… “Starting new web server” but there’s never any followup line to say its started, so it gives the impression it might still be attempting to start it - but the fact that I can reach the install page in a web browser would suggest its running?
Is the application meant to run as a daemon? It seems running it this way (like the systemd unit file attempts to) tries to run it in the foreground. This might be what is tripping up systemd, its expecting the command to finish but it never does (so the systemd unit sits there as activating).
Is there something fundamentally wrong with how the example systemd unit tries to launch the application?