Score:1

Exim wont start using systemctl but it will via exim debug

cn flag

I have a problem where Exim4 will not start/restart/reload... nothing works via /etc/init.d/exim4 nor systemctl start exim4... Both produce no output on the console - the start procedure just hangs indefinitely. However when I start in debug via exim -bd -d, exim loads and no obvious errors on the output.

Systemctl & init.d scrip produce no logging as to why the start script fails. I am also a bit confused why it just hangs... Whats even more weird is that after about 20 minutes of failed attempts at starting service, the system 'somehow' just brings back Exim and status starts to report service as (active running)

Status output show

root@mail:/usr# systemctl status exim4
● exim4.service - LSB: exim Mail Transport Agent
     Loaded: loaded (/etc/init.d/exim4; generated)
     Active: inactive (dead) since Wed 2023-03-15 15:49:00 CET; 18min ago
       Docs: man:systemd-sysv-generator(8)

Mar 15 15:48:35 mail systemd[1]: Starting LSB: exim Mail Transport Agent...
Mar 15 15:48:36 mail exim4[8814]: Starting MTA: exim4.
Mar 15 15:48:36 mail systemd[1]: Started LSB: exim Mail Transport Agent.
Mar 15 15:49:00 mail systemd[1]: Stopping LSB: exim Mail Transport Agent...
Mar 15 15:49:00 mail exim4[9454]: Stopping MTA: exim4_listener.
Mar 15 15:49:00 mail systemd[1]: exim4.service: Succeeded.
Mar 15 15:49:00 mail systemd[1]: Stopped LSB: exim Mail Transport Agent.

Any insight on how to debug this would be greatly appreciated as I do not want to wait for a prolonged time when restarting the service.

[pid 30258] recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\4\1\0013\3\0\0\22\0\0\0\266\0\0\0\1\1o\0.\0\0\0", iov_len=24}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_CMSG_CLOEXEC) = 24
[pid 30258] recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="/org/freedesktop/systemd1/unit/m"..., iov_len=995}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_CMSG_CLOEXEC) = 995
[pid 30258] recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\4\1\1\254\3\0\0\23\0\0\0\266\0\0\0\1\1o\0.\0\0\0", iov_len=24}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_CMSG_CLOEXEC) = 24
[pid 30258] recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="/org/freedesktop/systemd1/unit/m"..., iov_len=1116}], msg_iovlen=1, msg_controllen=0, msg_flags=MSG_CMSG_CLOEXEC}, MSG_DONTWAIT|MSG_CMSG_CLOEXEC) = 1116
[pid 30258] recvmsg(3, {msg_namelen=0}, MSG_DONTWAIT|MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
[pid 30258] ppoll([{fd=3, events=POLLIN}], 1, NULL, NULL, 8
Alexander Tolkachev avatar
sa flag
Please check journald, try to use `journalctl -xau exim4`, there could be more logs.
Maciej Cygan avatar
cn flag
@AlexanderTolkachev absolutely nothing useful in journal
Alexander Tolkachev avatar
sa flag
I see that SystemD use Init script, so check `/var/log/` for exim logs. May be there could be more details.
Maciej Cygan avatar
cn flag
@AlexanderTolkachev the trouble is that when running `/etc/init.d/exim4 start` - nothing happens. It does not terminate with an error, it just hangs so there are no logs produced.
Alexander Tolkachev avatar
sa flag
Oh, in this case try to use `strace` to see whats going on. Execute `strace -f /etc/init.d/exim4 start` and you'll see where script hangs.
Maciej Cygan avatar
cn flag
@AlexanderTolkachev I've updated the answer - to be fair I've got no clue what this output means. Its the last 6 lines of the `strace `
Score:0
cn flag

Ok so I actually figured out what was going on but I am absolutely not sure how is this even related...

So what it was, my mysql-community-server was totally corrupted (Exim4 does not use MySQL for any of its purposes...), but anyhow. After completely reinstalling MySQL, Exim4 started to behave normally - that is, start, stop, and reload worked without any prolonged delays.

Score:0
jm flag

Try rebuilding any database that Exim uses.

There's several ways Exim can use, e.g. MySQL: routing/configuration, virtual domains/users, whitelisting/blacklisting, and logging/statistics.

https://www.exim.org/exim-html-current/doc/html/spec_html/ch-file_and_database_lookups.html

I know on the servers I've seen, eximstats used MySQL. Users would often fill their drives or overload their servers in different ways, and eximstats and MySQL often broke down hinting at their problems.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.