[request-tracker-maintainers] Bug#794467: Bug#794467: rt4-fcgi: missing systemd integration: service started too early
Dominic Hargreaves
dom at earth.li
Sun Sep 20 17:00:03 UTC 2015
Control: retitle -1 rt4-fcgi: init script doesn't wait for database server
Control: tags -1 + moreinfo
On Mon, Aug 03, 2015 at 12:44:40PM +0200, Marco Pessotto wrote:
> Package: rt4-fcgi
> Version: 4.2.8-3
> Severity: important
>
> Dear Maintainer,
>
> installing request-tracker4 with rt4-fcgi in a systemd environment (as default
> install) appears to lead to a problem at boot time.
>
> It looks like that the service is started when the database is not ready:
>
> ● rt4-fcgi.service - LSB: request-tracker4 FastCGI daemon
> Loaded: loaded (/etc/init.d/rt4-fcgi)
> Active: active (exited) since Mon 2015-08-03 08:50:05 CEST; 3h 33min ago
> Process: 434 ExecStart=/etc/init.d/rt4-fcgi start (code=exited, status=0/SUCCESS)
>
> rt4-fcgi[434]: spawn-fcgi: child spawned successfully: PID: 470
> rt4-fcgi[434]: spawn-fcgi: child spawned successfully: PID: 471
> RT[470]: [470] DBI connect('dbname=rtdb;host=localhost','rtuser',...) failed: Can't connect to loca...ine 105.
> RT[471]: [471] DBI connect('dbname=rtdb;host=localhost','rtuser',...) failed: Can't connect to loca...ine 105.
> RT[471]: [471] Since your configuration exists (/etc/request-tracker4/RT_SiteConfig.pm) but is not ...nything.
> RT[470]: [470] Since your configuration exists (/etc/request-tracker4/RT_SiteConfig.pm) but is not ...nything.
>
> Without human intervention, a rebooted machine responds with 502 to any request
> to the RT urls.
>
> Restarting the service after boot fixes the situation, but it's obviously not optimal.
Hmm, I don't believe that this is a systemd-specific issue, although
it's obviously exposed by the way systemd works.
I believe that adding the following lines to /etc/init.d/rt4-fcgi
just below "Default-Stop" should fix the issue assuming that RT is
configured to use a database server on the same host, of course):
# Should-Start: mysql postgresql
# Should-Stop: mysql postgresql
Please could you let me know if this is the case?
Cheers,
Dominic.
More information about the pkg-request-tracker-maintainers
mailing list