Page MenuHomePhabricator

wmf-auto-restart: fails for exim4
Closed, ResolvedPublic

Description

sudo /usr/local/sbin/wmf-auto-restart -s exim4 fails as its unable to find the MainPID

Feb 27 13:56:30 durum1001 wmf-auto-restart: DEBUG: 2023-02-27 13:56:30,197 : systemctl is-active check returned 0
Feb 27 13:56:30 durum1001 wmf-auto-restart: DEBUG: 2023-02-27 13:56:30,204 : PID query for MainPID returned MainPID=0
Feb 27 13:56:30 durum1001 wmf-auto-restart: INFO: 2023-02-27 13:56:30,208 : Could not query the PID of exim4: 1

Running the pid query directly we get the following

sudo /bin/systemctl show -p MainPID exim4                                                                                             
MainPID=0

I have not looked to much but i did notice the generated systemd unit has GuessMainPID=no. it also has Restart=no and RemainAfterExit=yes which may mean its not ran as a proper daemon.

Event Timeline

jbond triaged this task as Medium priority.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

The wmf-auto-restart failure is ultimately fallout from earlier failures of Exim itself: Adding @ssingh to see whether this server was subject to some post-update test or so?

2023-01-26 03:11:05 socket bind() to port 25 for address 127.0.0.1 failed: Cannot assign requested address: waiting 30s before trying again (9 more tries)
2023-01-26 03:11:35 socket bind() to port 25 for address 127.0.0.1 failed: Cannot assign requested address: waiting 30s before trying again (8 more tries)
2023-01-26 03:12:05 socket bind() to port 25 for address 127.0.0.1 failed: Cannot assign requested address: waiting 30s before trying again (7 more tries)
2023-01-26 03:12:35 socket bind() to port 25 for address 127.0.0.1 failed: Cannot assign requested address: waiting 30s before trying again (6 more tries)
2023-01-26 03:13:05 socket bind() to port 25 for address 127.0.0.1 failed: Cannot assign requested address: waiting 30s before trying again (5 more tries)
2023-01-26 03:13:35 socket bind() to port 25 for address 127.0.0.1 failed: Cannot assign requested address: waiting 30s before trying again (4 more tries)
2023-01-26 03:14:05 socket bind() to port 25 for address 127.0.0.1 failed: Cannot assign requested address: waiting 30s before trying again (3 more tries)

The wmf-auto-restart failure is ultimately fallout from earlier failures of Exim itself

should we create a new task to add a proper systemd unit file for exim. as this did not show in icinga or systemd status due to RemainAfterExit=yes and obviously no restart was attempted because of Restart=no?

should we create a new task to add a proper systemd unit file for exim. as this did not show in icinga or systemd status due to RemainAfterExit=yes and obviously no restart was attempted because of Restart=no?

We have https://phabricator.wikimedia.org/T240843 as an umbrella task for this. But I wouldn't spend time on it, given that we're planning to move away from Exim and the init script of Exim is rather complex (there's little progress in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=844178). It's also a rather rare issue, Exim outside of the MXes has been on auto restart for many years now and this is the first time we've seen this.

should we create a new task to add a proper systemd unit file for exim. as this did not show in icinga or systemd status due to RemainAfterExit=yes and obviously no restart was attempted because of Restart=no?

We have https://phabricator.wikimedia.org/T240843 as an umbrella task for this. But I wouldn't spend time on it, given that we're planning to move away from Exim and the init script of Exim is rather complex (there's little progress in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=844178). It's also a rather rare issue, Exim outside of the MXes has been on auto restart for many years now and this is the first time we've seen this.

ack sgtm thanks

MoritzMuehlenhoff claimed this task.

Current Exim packages ship a systemd unit, which resolved this.