When systemd is used to start zarafa-spooler the process starts but does not pickup and deliver any message from zarafa-server. If the spooler is started on the command line it works correctly. If systemd is replaced by sysvinit as the boot mechanism, the spooler also works correctly. This is true on openSUSE 12.1, 12.2 and 12.3 with zarafa 7.0.x and zarafa 7.1.x from the opensuse repository.
Prior to my recent upgrade to 12.3 this has not been an issue for me as I’ve been using sysvinit and I assumed it was a teething problem with systemd on the earlier releases but now I’m on 12.3 with systemd the problem is still here so it needs to be investigated. I’m assuming this is a problem to do with the very limited execution environment systemd passes on to process it starts and that there is something special that the zarafa-spooler needs that isn’t being provided by systemd. Note that all zarafa processes are still using /etc/init.d scripts rather than unit files.
Using strace on a working zarafa-spooler (started from a shell) I get this output when a single message is in the queue to be processed:
Process 19380 attached
select(1, [0], NULL, NULL, NULL) = 1 (in [0])
read(0, "\5[19379] Number of messages in t"..., 10240) = 44
time(NULL) = 1373286326
write(4, "Mon Jul 8 13:25:26 2013: [19379"..., 69) = 69
select(1, [0], NULL, NULL, NULL) = 1 (in [0])
read(0, "\6[20278] /usr/sbin/zarafa-spoole"..., 10240) = 322
select(1, [0], NULL, NULL, NULL) = 1 (in [0])
read(0, "\5[19379] Spooler process started"..., 10240) = 46
time(NULL) = 1373286326
write(4, "Mon Jul 8 13:25:26 2013: [19379"..., 71) = 71
select(1, [0], NULL, NULL, NULL) = 1 (in [0])
read(0, "\6[20278] PYTHONPATH = /usr/share"..., 10240) = 55
select(1, [0], NULL, NULL, NULL) = 1 (in [0])
read(0, "\5[20278] * Loading plugins start"..., 10240) = 35
time(NULL) = 1373286326
write(4, "Mon Jul 8 13:25:26 2013: [20278"..., 60) = 60
select(1, [0], NULL, NULL, NULL) = 1 (in [0])
read(0, "\5[20278] ** Checking plugins in "..., 10240) = 96
time(NULL) = 1373286326
write(4, "Mon Jul 8 13:25:26 2013: [20278"..., 89) = 89
time(NULL) = 1373286326
write(4, "Mon Jul 8 13:25:26 2013: [20278"..., 57) = 57
select(1, [0], NULL, NULL, NULL) = 1 (in [0])
read(0, "\1[20278] Sending e-mail for user"..., 10240) = 64
time(NULL) = 1373286326
write(4, "Mon Jul 8 13:25:26 2013: [20278"..., 89) = 89
select(1, [0], NULL, NULL, NULL) = 1 (in [0])
read(0, "\5[20278] * PreSending processing"..., 10240) = 79
time(NULL) = 1373286327
write(4, "Mon Jul 8 13:25:27 2013: [20278"..., 66) = 66
time(NULL) = 1373286327
write(4, "Mon Jul 8 13:25:27 2013: [20278"..., 63) = 63
select(1, [0], NULL, NULL, NULL) = 1 (in [0])
read(0, "\2[20278] Sending message with Me"..., 10240) = 104
time(NULL) = 1373286327
write(4, "Mon Jul 8 13:25:27 2013: [20278"..., 129) = 129
select(1, [0], NULL, NULL, NULL) = 1 (in [0])
read(0, "\6[20278] RCPT TO: ian@hodgepigs."..., 10240) = 39
select(1, [0], NULL, NULL, NULL) = 1 (in [0])
read(0, "\3[20278] SMTP: 2.0.0 Ok: queued "..., 10240) = 46
time(NULL) = 1373286327
write(4, "Mon Jul 8 13:25:27 2013: [20278"..., 71) = 71
select(1, [0], NULL, NULL, NULL) = 1 (in [0])
read(0, "\1[20278] E-mail for user ian was"..., 10240) = 57
On a spooler started from systemd, this is what I get:
Process 20339 attached
select(1, [0], NULL, NULL, NULL) = 1 (in [0])
read(0, "\5[20338] Number of messages in t"..., 10240) = 44
time(NULL) = 1373286461
write(4, "Mon Jul 8 13:27:41 2013: [20338"..., 69) = 69
select(1, [0], NULL, NULL, NULL) = 1 (in [0])
read(0, "\6[20347] /usr/sbin/zarafa-spoole"..., 10240) = 322
select(1, [0], NULL, NULL, NULL) = 1 (in [0])
read(0, "\5[20338] Spooler process started"..., 10240) = 46
I’m not sure how to go about debugging this any further - suggestions welcome!