Closed baobaab closed 4 years ago
Haven't had time to look at this, so not sure what the problem is, but pull requests welcome!
I have the same problem.
Now I am looking for a solution, since this error causes the server to end up saturating.
It seems to have been fixed with:
sudo systemctl stop dokku-event-listener
sudo apt install golang-go
sudo systemctl start dokku-event-listener
:( It seems that it has not been fixed. Over time it has returned to the same.
Apr 18 17:17:13 vps713357 systemd[1]: dokku-event-listener.service: Service hold-off time over, scheduling restart.
Apr 18 17:17:13 vps713357 systemd[1]: dokku-event-listener.service: Scheduled restart job, restart counter is at 176.
Apr 18 17:17:13 vps713357 systemd[1]: Stopped dokku-event-listener process.
Apr 18 17:17:13 vps713357 systemd[1]: Starting dokku-event-listener process...
Apr 18 17:18:44 vps713357 systemd[1]: dokku-event-listener.service: Start-pre operation timed out. Terminating.
Apr 18 17:18:44 vps713357 systemd[1]: dokku-event-listener.service: Failed with result 'timeout'.
Apr 18 17:18:44 vps713357 systemd[1]: Failed to start dokku-event-listener process.
Apr 18 17:18:54 vps713357 systemd[1]: dokku-event-listener.service: Service hold-off time over, scheduling restart.
Apr 18 17:18:54 vps713357 systemd[1]: dokku-event-listener.service: Scheduled restart job, restart counter is at 177.
Apr 18 17:18:54 vps713357 systemd[1]: Stopped dokku-event-listener process.
Apr 18 17:18:54 vps713357 systemd[1]: Starting dokku-event-listener process...
The problem is maybe due to this line in dokku-event-listener.service
:
ExecStartPre=/usr/bin/dokku-event-listener init
This command hangs forever, since it starts the binary and begins to listen to docker events. But according to systemd.service
man page, the ExecStart
is not started until the ExecStartPre
command exits successfully :
ExecStart= commands are only run after all ExecStartPre= commands that were not prefixed with a "-" exit successfully.
@josegonzalez what is the purpose of this task ?
Version 0.2.0 was released with an updated service file, can folks try it out?
Hi @josegonzalez,
It's now ok, it starts without any timeout now, thank you!
But I have a question regarding the way the service must be started (I don't know if this is my lack of knowledge on systemd or if this is a real problem).
To start it properly after package upgrade, I had to either :
sudo systemctl start dokku-event-listener.target
Running sudo systemctl start dokku-event-listener.service
didn't work, because the service was immediately stopped by systemd due to the property StopWhenUnneeded=yes
.
Is this the expected behavior ?
Yeah I think so. I don't want to start the target on every upgrade, as a user potentially stopped it on their own, and it would be weird for us to mangle that. Thoughts?
Yes, the target should not be started on upgrade.
But maybe the StopWhenUnneeded=yes
could be removed ? According to this SO answer, the PartOf
directive is sufficient to start/stop the service when the target is reached/left. Thus the service could be manually started/stopped using systemctl start dokku-event-listener.service
(as expected by a systemd-newbie like me), after the first package install. This is maybe out of this issue scope ?
I would accept a PR for that for sure.
Description of problem
Unable to start properly the "dokku-event-listener" systemd service (timeout).
How reproducible
Always
Steps to Reproduce
Check service is not active using
Start service
Check service is now active
Actual Results
Service "dokku-event-listener" is not active on step 3.
While trying to start service on step 2, a timeout occurs :
Here are the corresponding systemd logs in syslog :
Expected Results
Service "dokku-event-listener" should be running and active after step3.
Environment Information
dokku report
outputHow (deb/make/rpm) and where (AWS, VirtualBox, physical, etc.) was Dokku installed?:
Dokku was installed using bootstrap.sh script