0

Freshly compiled dovecot 2.3.9.3 on Centos 7 for some reason not able to start

● dovecot.service - LSB: Dovecot init script
   Loaded: loaded (/etc/rc.d/init.d/dovecot; bad; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2020-03-19 15:15:37 UTC; 54s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 20398 ExecStart=/etc/rc.d/init.d/dovecot start (code=exited, status=203/EXEC)

Mar 19 15:15:37 systemd[1]: Starting LSB: Dovecot init script...
Mar 19 15:15:37 systemd[1]: dovecot.service: control process exited, code=exited status=203
Mar 19 15:15:37 systemd[1]: Failed to start LSB: Dovecot init script.
Mar 19 15:15:37 systemd[1]: Unit dovecot.service entered failed state.
Mar 19 15:15:37 systemd[1]: dovecot.service failed.

I have compiled the same code on Centos 6 and had no problem to run it.

Also checking if enabled on system start it throws that

dovecot.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig dovecot on

Any thoughts on that matter? Do I need to change something to get it work on systemd?

JackTheKnife
  • 371
  • 1
  • 6
  • 22
  • 1
    `systemd` exit code 203 indicates "Most likely this is caused by a missing or non-accessible executable file." Make sure your executable files are reachable by the service. Also, `journalctl -xe` and the dovecot log files might give you a better idea as to what specifically the error is. – slightly_toasted Mar 19 '20 at 18:22
  • @slightly_toasted OK, it was compiled from scratch and all config files are in the /usr/etc/dovecot folder. In this case I have no idea what system cannot access. Dovecod log says it started (but apparently is not) - no other errors. I will take a look at `journalctl -xe` – JackTheKnife Mar 19 '20 at 18:24
  • 1
    Because it was compiled from scratch, the systemd unit might be looking for the executable in the wrong directory, or with bad permissions. Make sure the location and permissions of the executable match up with what's listed in the `dovecot.service` file. – slightly_toasted Mar 19 '20 at 18:40
  • @slightly_toasted I have checked `/etc/systemd/system/` folder and `dovecot.service` is not there. Are there any examples how it should to looks like? – JackTheKnife Mar 19 '20 at 18:50
  • According to what you posted it might be located in `/etc/rc.d/init.d/dovecot.service` – slightly_toasted Mar 19 '20 at 18:54
  • @slightly_toasted there is init.d script which I have used for Centos6 `sysVinit`. Not sure if this is the same startup structure as for `systemd` – JackTheKnife Mar 19 '20 at 18:57
  • Easiest way to find the service file is to run `find / -name dovecot.service` – slightly_toasted Mar 19 '20 at 19:02
  • @slightly_toasted OK, thank to your tips I was able to solve my problem with the startup under `systemd`. Case closed! ;) – JackTheKnife Mar 19 '20 at 20:56
  • 1
    Make sure to add your answer to this question with what turned out to be the problem and the solution so you can help others with this issue – slightly_toasted Mar 19 '20 at 21:04

1 Answers1

0

It came up that I had missing dovecot.service startup script from /etc/systemd/system/.

I have used dovecot.service.in file from Dovecot source as an example to create for my environment.

JackTheKnife
  • 371
  • 1
  • 6
  • 22