Will not start using systemd #1942

Closed
opened 2025-11-02 04:18:30 -06:00 by GiteaMirror · 9 comments
Owner

Originally created by @Dozecloud-llc on GitHub (Jun 16, 2018).

  • Gitea version (or commit ref):1.4.1

  • Git version:2.17.1

  • Operating system: Ubuntu 18.04
    MySQL

  • Can you reproduce the bug at https://try.gitea.io:
    Not relevant

Description

Will not run with using systemd. It will start up for 1 second then crash. Will work
fresh install but when i go to restart it it crashes.

Originally created by @Dozecloud-llc on GitHub (Jun 16, 2018). - Gitea version (or commit ref):1.4.1 - Git version:2.17.1 - Operating system: Ubuntu 18.04 MySQL - Can you reproduce the bug at https://try.gitea.io: Not relevant ## Description Will not run with using systemd. It will start up for 1 second then crash. Will work fresh install but when i go to restart it it crashes.
GiteaMirror added the type/question label 2025-11-02 04:18:30 -06:00
Author
Owner

@lunny commented on GitHub (Jun 16, 2018):

@jsargent7089 please give more detail.

@lunny commented on GitHub (Jun 16, 2018): @jsargent7089 please give more detail.
Author
Owner

@savyajha commented on GitHub (Jun 16, 2018):

@jsargent7089 Can you put the output of journalctl -b 0 -u gitea over here? Might be easier to debug it that way.

@savyajha commented on GitHub (Jun 16, 2018): @jsargent7089 Can you put the output of `journalctl -b 0 -u gitea` over here? Might be easier to debug it that way.
Author
Owner

@Dozecloud-llc commented on GitHub (Jun 17, 2018):

@lunny @savyajha
Jun 16 05:50:26 dozegit systemd[1]: Started Gitea (Git with a cup of tea).
Jun 16 05:50:30 dozegit gitea[969]: 2018/06/16 05:50:30 [T] AppPath: /usr/local/
Jun 16 05:50:30 dozegit gitea[969]: 2018/06/16 05:50:30 [T] AppWorkPath: /var/li
Jun 16 05:50:30 dozegit gitea[969]: 2018/06/16 05:50:30 [T] Custom path: /var/li
Jun 16 05:50:30 dozegit gitea[969]: 2018/06/16 05:50:30 [T] Log path: /var/lib/g
Jun 16 05:50:31 dozegit systemd[1]: gitea.service: Main process exited, code=exi
Jun 16 05:50:31 dozegit systemd[1]: gitea.service: Failed with result 'exit-code
Jun 16 05:50:34 dozegit systemd[1]: gitea.service: Service hold-off time over, s
Jun 16 05:50:34 dozegit systemd[1]: gitea.service: Scheduled restart job, restar
Jun 16 05:50:34 dozegit systemd[1]: Stopped Gitea (Git with a cup of tea).
Jun 16 05:50:34 dozegit systemd[1]: Started Gitea (Git with a cup of tea).
Jun 16 05:50:34 dozegit gitea[1505]: 2018/06/16 05:50:34 [T] AppPath: /usr/local
Jun 16 05:50:34 dozegit gitea[1505]: 2018/06/16 05:50:34 [T] AppWorkPath: /var/l
Jun 16 05:50:34 dozegit gitea[1505]: 2018/06/16 05:50:34 [T] Custom path: /var/l
Jun 16 05:50:34 dozegit gitea[1505]: 2018/06/16 05:50:34 [T] Log path: /var/lib/
Jun 16 05:50:34 dozegit systemd[1]: gitea.service: Main process exited, code=exi
Jun 16 05:50:34 dozegit systemd[1]: gitea.service: Failed with result 'exit-code
Jun 16 05:50:36 dozegit systemd[1]: gitea.service: Service hold-off time over, s
Jun 16 05:50:36 dozegit systemd[1]: gitea.service: Scheduled restart job, restar
Jun 16 05:50:36 dozegit systemd[1]: Stopped Gitea (Git with a cup of tea).
Jun 16 05:50:36 dozegit systemd[1]: Started Gitea (Git with a cup of tea).
Jun 16 05:50:36 dozegit gitea[1559]: 2018/06/16 05:50:36 [T] AppPath: /usr/local
lines 1-23...skipping...
-- Logs begin at Fri 2018-06-15 00:56:37 UTC, end at Sun 2018-06-17 03:00:13 UTC. --
Jun 16 05:50:26 dozegit systemd[1]: Started Gitea (Git with a cup of tea).
Jun 16 05:50:30 dozegit gitea[969]: 2018/06/16 05:50:30 [T] AppPath: /usr/local/bin/gitea
Jun 16 05:50:30 dozegit gitea[969]: 2018/06/16 05:50:30 [T] AppWorkPath: /var/lib/gitea
Jun 16 05:50:30 dozegit gitea[969]: 2018/06/16 05:50:30 [T] Custom path: /var/lib/gitea/custom
Jun 16 05:50:30 dozegit gitea[969]: 2018/06/16 05:50:30 [T] Log path: /var/lib/gitea/log
Jun 16 05:50:31 dozegit systemd[1]: gitea.service: Main process exited, code=exited, status=1/FAILURE
Jun 16 05:50:31 dozegit systemd[1]: gitea.service: Failed with result 'exit-code'.
Jun 16 05:50:34 dozegit systemd[1]: gitea.service: Service hold-off time over, scheduling restart.
Jun 16 05:50:34 dozegit systemd[1]: gitea.service: Scheduled restart job, restart counter is at 1.
Jun 16 05:50:34 dozegit systemd[1]: Stopped Gitea (Git with a cup of tea).
Jun 16 05:50:34 dozegit systemd[1]: Started Gitea (Git with a cup of tea).
Jun 16 05:50:34 dozegit gitea[1505]: 2018/06/16 05:50:34 [T] AppPath: /usr/local/bin/gitea
Jun 16 05:50:34 dozegit gitea[1505]: 2018/06/16 05:50:34 [T] AppWorkPath: /var/lib/gitea
Jun 16 05:50:34 dozegit gitea[1505]: 2018/06/16 05:50:34 [T] Custom path: /var/lib/gitea/custom
Jun 16 05:50:34 dozegit gitea[1505]: 2018/06/16 05:50:34 [T] Log path: /var/lib/gitea/log
Jun 16 05:50:34 dozegit systemd[1]: gitea.service: Main process exited, code=exited, status=1/FAILURE
Jun 16 05:50:34 dozegit systemd[1]: gitea.service: Failed with result 'exit-code'.
Jun 16 05:50:36 dozegit systemd[1]: gitea.service: Service hold-off time over, scheduling restart.
Jun 16 05:50:36 dozegit systemd[1]: gitea.service: Scheduled restart job, restart counter is at 2.
Jun 16 05:50:36 dozegit systemd[1]: Stopped Gitea (Git with a cup of tea).
Jun 16 05:50:36 dozegit systemd[1]: Started Gitea (Git with a cup of tea).
Jun 16 05:50:36 dozegit gitea[1559]: 2018/06/16 05:50:36 [T] AppPath: /usr/local/bin/gitea
Jun 16 05:50:36 dozegit gitea[1559]: 2018/06/16 05:50:36 [T] AppWorkPath: /var/lib/gitea
Jun 16 05:50:36 dozegit gitea[1559]: 2018/06/16 05:50:36 [T] Custom path: /var/lib/gitea/custom
Jun 16 05:50:36 dozegit gitea[1559]: 2018/06/16 05:50:36 [T] Log path: /var/lib/gitea/log
Jun 16 05:50:37 dozegit systemd[1]: gitea.service: Main process exited, code=exited, status=1/FAILURE
Jun 16 05:50:37 dozegit systemd[1]: gitea.service: Failed with result 'exit-code'.
Jun 16 05:50:39 dozegit systemd[1]: gitea.service: Service hold-off time over, scheduling restart.
Jun 16 05:50:39 dozegit systemd[1]: gitea.service: Scheduled restart job, restart counter is at 3.
Jun 16 05:50:39 dozegit systemd[1]: Stopped Gitea (Git with a cup of tea).
Jun 16 05:50:39 dozegit systemd[1]: Started Gitea (Git with a cup of tea).
Jun 16 05:50:39 dozegit gitea[1655]: 2018/06/16 05:50:39 [T] AppPath: /usr/local/bin/gitea
Jun 16 05:50:39 dozegit gitea[1655]: 2018/06/16 05:50:39 [T] AppWorkPath: /var/lib/gitea
Jun 16 05:50:39 dozegit gitea[1655]: 2018/06/16 05:50:39 [T] Custom path: /var/lib/gitea/custom
Jun 16 05:50:39 dozegit gitea[1655]: 2018/06/16 05:50:39 [T] Log path: /var/lib/gitea/log
Jun 16 05:50:41 dozegit systemd[1]: gitea.service: Main process exited, code=exited, status=1/FAILURE
Jun 16 05:50:41 dozegit systemd[1]: gitea.service: Failed with result 'exit-code'.
Jun 16 05:50:43 dozegit systemd[1]: gitea.service: Service hold-off time over, scheduling restart.
Jun 16 05:50:43 dozegit systemd[1]: gitea.service: Scheduled restart job, restart counter is at 4.
Jun 16 05:50:43 dozegit systemd[1]: Stopped Gitea (Git with a cup of tea).
Jun 16 05:50:43 dozegit systemd[1]: Started Gitea (Git with a cup of tea).
Jun 16 05:50:43 dozegit gitea[1746]: 2018/06/16 05:50:43 [T] AppPath: /usr/local/bin/gitea
Jun 16 05:50:43 dozegit gitea[1746]: 2018/06/16 05:50:43 [T] AppWorkPath: /var/lib/gitea
Jun 16 05:50:43 dozegit gitea[1746]: 2018/06/16 05:50:43 [T] Custom path: /var/lib/gitea/custom
Jun 16 05:50:43 dozegit gitea[1746]: 2018/06/16 05:50:43 [T] Log path: /var/lib/gitea/log
Jun 16 05:50:44 dozegit systemd[1]: gitea.service: Main process exited, code=exited, status=1/FAILURE
Jun 16 05:50:44 dozegit systemd[1]: gitea.service: Failed with result 'exit-code'.
Jun 16 05:50:46 dozegit systemd[1]: gitea.service: Service hold-off time over, scheduling restart.
Jun 16 05:50:46 dozegit systemd[1]: gitea.service: Scheduled restart job, restart counter is at 5.
Jun 16 05:50:46 dozegit systemd[1]: Stopped Gitea (Git with a cup of tea).
Jun 16 05:50:46 dozegit systemd[1]: Started Gitea (Git with a cup of tea).
Jun 16 05:50:46 dozegit gitea[1814]: 2018/06/16 05:50:46 [T] AppPath: /usr/local/bin/gitea
Jun 16 05:50:46 dozegit gitea[1814]: 2018/06/16 05:50:46 [T] AppWorkPath: /var/lib/gitea
Jun 16 05:50:46 dozegit gitea[1814]: 2018/06/16 05:50:46 [T] Custom path: /var/lib/gitea/custom
Jun 16 05:50:46 dozegit gitea[1814]: 2018/06/16 05:50:46 [T] Log path: /var/lib/gitea/log
Jun 16 05:50:46 dozegit systemd[1]: gitea.service: Main process exited, code=exited, status=1/FAILURE
Jun 16 05:50:46 dozegit systemd[1]: gitea.service: Failed with result 'exit-code'.
Jun 16 05:50:48 dozegit systemd[1]: gitea.service: Service hold-off time over, scheduling restart.
Jun 16 05:50:48 dozegit systemd[1]: gitea.service: Scheduled restart job, restart counter is at 6.
Jun 16 05:50:48 dozegit systemd[1]: Stopped Gitea (Git with a cup of tea).
Jun 16 05:50:48 dozegit systemd[1]: Started Gitea (Git with a cup of tea).

@Dozecloud-llc commented on GitHub (Jun 17, 2018): @lunny @savyajha Jun 16 05:50:26 dozegit systemd[1]: Started Gitea (Git with a cup of tea). Jun 16 05:50:30 dozegit gitea[969]: 2018/06/16 05:50:30 [T] AppPath: /usr/local/ Jun 16 05:50:30 dozegit gitea[969]: 2018/06/16 05:50:30 [T] AppWorkPath: /var/li Jun 16 05:50:30 dozegit gitea[969]: 2018/06/16 05:50:30 [T] Custom path: /var/li Jun 16 05:50:30 dozegit gitea[969]: 2018/06/16 05:50:30 [T] Log path: /var/lib/g Jun 16 05:50:31 dozegit systemd[1]: gitea.service: Main process exited, code=exi Jun 16 05:50:31 dozegit systemd[1]: gitea.service: Failed with result 'exit-code Jun 16 05:50:34 dozegit systemd[1]: gitea.service: Service hold-off time over, s Jun 16 05:50:34 dozegit systemd[1]: gitea.service: Scheduled restart job, restar Jun 16 05:50:34 dozegit systemd[1]: Stopped Gitea (Git with a cup of tea). Jun 16 05:50:34 dozegit systemd[1]: Started Gitea (Git with a cup of tea). Jun 16 05:50:34 dozegit gitea[1505]: 2018/06/16 05:50:34 [T] AppPath: /usr/local Jun 16 05:50:34 dozegit gitea[1505]: 2018/06/16 05:50:34 [T] AppWorkPath: /var/l Jun 16 05:50:34 dozegit gitea[1505]: 2018/06/16 05:50:34 [T] Custom path: /var/l Jun 16 05:50:34 dozegit gitea[1505]: 2018/06/16 05:50:34 [T] Log path: /var/lib/ Jun 16 05:50:34 dozegit systemd[1]: gitea.service: Main process exited, code=exi Jun 16 05:50:34 dozegit systemd[1]: gitea.service: Failed with result 'exit-code Jun 16 05:50:36 dozegit systemd[1]: gitea.service: Service hold-off time over, s Jun 16 05:50:36 dozegit systemd[1]: gitea.service: Scheduled restart job, restar Jun 16 05:50:36 dozegit systemd[1]: Stopped Gitea (Git with a cup of tea). Jun 16 05:50:36 dozegit systemd[1]: Started Gitea (Git with a cup of tea). Jun 16 05:50:36 dozegit gitea[1559]: 2018/06/16 05:50:36 [T] AppPath: /usr/local lines 1-23...skipping... -- Logs begin at Fri 2018-06-15 00:56:37 UTC, end at Sun 2018-06-17 03:00:13 UTC. -- Jun 16 05:50:26 dozegit systemd[1]: Started Gitea (Git with a cup of tea). Jun 16 05:50:30 dozegit gitea[969]: 2018/06/16 05:50:30 [T] AppPath: /usr/local/bin/gitea Jun 16 05:50:30 dozegit gitea[969]: 2018/06/16 05:50:30 [T] AppWorkPath: /var/lib/gitea Jun 16 05:50:30 dozegit gitea[969]: 2018/06/16 05:50:30 [T] Custom path: /var/lib/gitea/custom Jun 16 05:50:30 dozegit gitea[969]: 2018/06/16 05:50:30 [T] Log path: /var/lib/gitea/log Jun 16 05:50:31 dozegit systemd[1]: gitea.service: Main process exited, code=exited, status=1/FAILURE Jun 16 05:50:31 dozegit systemd[1]: gitea.service: Failed with result 'exit-code'. Jun 16 05:50:34 dozegit systemd[1]: gitea.service: Service hold-off time over, scheduling restart. Jun 16 05:50:34 dozegit systemd[1]: gitea.service: Scheduled restart job, restart counter is at 1. Jun 16 05:50:34 dozegit systemd[1]: Stopped Gitea (Git with a cup of tea). Jun 16 05:50:34 dozegit systemd[1]: Started Gitea (Git with a cup of tea). Jun 16 05:50:34 dozegit gitea[1505]: 2018/06/16 05:50:34 [T] AppPath: /usr/local/bin/gitea Jun 16 05:50:34 dozegit gitea[1505]: 2018/06/16 05:50:34 [T] AppWorkPath: /var/lib/gitea Jun 16 05:50:34 dozegit gitea[1505]: 2018/06/16 05:50:34 [T] Custom path: /var/lib/gitea/custom Jun 16 05:50:34 dozegit gitea[1505]: 2018/06/16 05:50:34 [T] Log path: /var/lib/gitea/log Jun 16 05:50:34 dozegit systemd[1]: gitea.service: Main process exited, code=exited, status=1/FAILURE Jun 16 05:50:34 dozegit systemd[1]: gitea.service: Failed with result 'exit-code'. Jun 16 05:50:36 dozegit systemd[1]: gitea.service: Service hold-off time over, scheduling restart. Jun 16 05:50:36 dozegit systemd[1]: gitea.service: Scheduled restart job, restart counter is at 2. Jun 16 05:50:36 dozegit systemd[1]: Stopped Gitea (Git with a cup of tea). Jun 16 05:50:36 dozegit systemd[1]: Started Gitea (Git with a cup of tea). Jun 16 05:50:36 dozegit gitea[1559]: 2018/06/16 05:50:36 [T] AppPath: /usr/local/bin/gitea Jun 16 05:50:36 dozegit gitea[1559]: 2018/06/16 05:50:36 [T] AppWorkPath: /var/lib/gitea Jun 16 05:50:36 dozegit gitea[1559]: 2018/06/16 05:50:36 [T] Custom path: /var/lib/gitea/custom Jun 16 05:50:36 dozegit gitea[1559]: 2018/06/16 05:50:36 [T] Log path: /var/lib/gitea/log Jun 16 05:50:37 dozegit systemd[1]: gitea.service: Main process exited, code=exited, status=1/FAILURE Jun 16 05:50:37 dozegit systemd[1]: gitea.service: Failed with result 'exit-code'. Jun 16 05:50:39 dozegit systemd[1]: gitea.service: Service hold-off time over, scheduling restart. Jun 16 05:50:39 dozegit systemd[1]: gitea.service: Scheduled restart job, restart counter is at 3. Jun 16 05:50:39 dozegit systemd[1]: Stopped Gitea (Git with a cup of tea). Jun 16 05:50:39 dozegit systemd[1]: Started Gitea (Git with a cup of tea). Jun 16 05:50:39 dozegit gitea[1655]: 2018/06/16 05:50:39 [T] AppPath: /usr/local/bin/gitea Jun 16 05:50:39 dozegit gitea[1655]: 2018/06/16 05:50:39 [T] AppWorkPath: /var/lib/gitea Jun 16 05:50:39 dozegit gitea[1655]: 2018/06/16 05:50:39 [T] Custom path: /var/lib/gitea/custom Jun 16 05:50:39 dozegit gitea[1655]: 2018/06/16 05:50:39 [T] Log path: /var/lib/gitea/log Jun 16 05:50:41 dozegit systemd[1]: gitea.service: Main process exited, code=exited, status=1/FAILURE Jun 16 05:50:41 dozegit systemd[1]: gitea.service: Failed with result 'exit-code'. Jun 16 05:50:43 dozegit systemd[1]: gitea.service: Service hold-off time over, scheduling restart. Jun 16 05:50:43 dozegit systemd[1]: gitea.service: Scheduled restart job, restart counter is at 4. Jun 16 05:50:43 dozegit systemd[1]: Stopped Gitea (Git with a cup of tea). Jun 16 05:50:43 dozegit systemd[1]: Started Gitea (Git with a cup of tea). Jun 16 05:50:43 dozegit gitea[1746]: 2018/06/16 05:50:43 [T] AppPath: /usr/local/bin/gitea Jun 16 05:50:43 dozegit gitea[1746]: 2018/06/16 05:50:43 [T] AppWorkPath: /var/lib/gitea Jun 16 05:50:43 dozegit gitea[1746]: 2018/06/16 05:50:43 [T] Custom path: /var/lib/gitea/custom Jun 16 05:50:43 dozegit gitea[1746]: 2018/06/16 05:50:43 [T] Log path: /var/lib/gitea/log Jun 16 05:50:44 dozegit systemd[1]: gitea.service: Main process exited, code=exited, status=1/FAILURE Jun 16 05:50:44 dozegit systemd[1]: gitea.service: Failed with result 'exit-code'. Jun 16 05:50:46 dozegit systemd[1]: gitea.service: Service hold-off time over, scheduling restart. Jun 16 05:50:46 dozegit systemd[1]: gitea.service: Scheduled restart job, restart counter is at 5. Jun 16 05:50:46 dozegit systemd[1]: Stopped Gitea (Git with a cup of tea). Jun 16 05:50:46 dozegit systemd[1]: Started Gitea (Git with a cup of tea). Jun 16 05:50:46 dozegit gitea[1814]: 2018/06/16 05:50:46 [T] AppPath: /usr/local/bin/gitea Jun 16 05:50:46 dozegit gitea[1814]: 2018/06/16 05:50:46 [T] AppWorkPath: /var/lib/gitea Jun 16 05:50:46 dozegit gitea[1814]: 2018/06/16 05:50:46 [T] Custom path: /var/lib/gitea/custom Jun 16 05:50:46 dozegit gitea[1814]: 2018/06/16 05:50:46 [T] Log path: /var/lib/gitea/log Jun 16 05:50:46 dozegit systemd[1]: gitea.service: Main process exited, code=exited, status=1/FAILURE Jun 16 05:50:46 dozegit systemd[1]: gitea.service: Failed with result 'exit-code'. Jun 16 05:50:48 dozegit systemd[1]: gitea.service: Service hold-off time over, scheduling restart. Jun 16 05:50:48 dozegit systemd[1]: gitea.service: Scheduled restart job, restart counter is at 6. Jun 16 05:50:48 dozegit systemd[1]: Stopped Gitea (Git with a cup of tea). Jun 16 05:50:48 dozegit systemd[1]: Started Gitea (Git with a cup of tea).
Author
Owner

@daviian commented on GitHub (Jun 17, 2018):

And we also need the gitea.log from from /var/lib/gitea/log/

@daviian commented on GitHub (Jun 17, 2018): And we also need the gitea.log from from /var/lib/gitea/log/
Author
Owner

@Dozecloud-llc commented on GitHub (Jun 17, 2018):

@daviian @lunny @savyajha

gitea.log

xorm (1).log

xorm.log

@Dozecloud-llc commented on GitHub (Jun 17, 2018): @daviian @lunny @savyajha [gitea.log](https://github.com/go-gitea/gitea/files/2109402/gitea.log) [xorm (1).log](https://github.com/go-gitea/gitea/files/2109403/xorm.1.log) [xorm.log](https://dozedrive.dozecloud.com/s/JA84oSJpAo7MNZK)
Author
Owner

@daviian commented on GitHub (Jun 18, 2018):

@jsargent7089 I can't download the gitea.log. There's an error regarding ssl.

@daviian commented on GitHub (Jun 18, 2018): @jsargent7089 I can't download the gitea.log. There's an error regarding ssl.
Author
Owner

@savyajha commented on GitHub (Jun 18, 2018):

@jsargent7089 Your gitea instance seems to want to bind to port 80. Has it been set up that way? I think gitea generally tries to bind to port 3000. Try putting HTTP_PORT = 3000 in your app.ini and checking again if it works.

@savyajha commented on GitHub (Jun 18, 2018): @jsargent7089 Your gitea instance seems to want to bind to port 80. Has it been set up that way? I think gitea generally tries to bind to port 3000. Try putting `HTTP_PORT = 3000` in your `app.ini` and checking again if it works.
Author
Owner

@daviian commented on GitHub (Jun 18, 2018):

@jsargent7089 Have you added

CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE

to your gitea.service description?
These lines are necessary to bind to privileged ports without root user

@daviian commented on GitHub (Jun 18, 2018): @jsargent7089 Have you added ``` CapabilityBoundingSet=CAP_NET_BIND_SERVICE AmbientCapabilities=CAP_NET_BIND_SERVICE ``` to your gitea.service description? These lines are necessary to bind to privileged ports without root user
Author
Owner

@Dozecloud-llc commented on GitHub (Jun 18, 2018):

I fixed it. It was try to bind to port 80 in the app.ini. I changed the port to 3000 and it works. Thank you for all your help.

@Dozecloud-llc commented on GitHub (Jun 18, 2018): I fixed it. It was try to bind to port 80 in the app.ini. I changed the port to 3000 and it works. Thank you for all your help.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1942