Problem: Preventing `univention-directory-notifier` Start Limit Failures During Frequent Restarts

Preventing univention-directory-notifier Start Limit Failures During Frequent Restarts

Problem

During certain operations the Univention Directory Notifier service will repeatly restart within a short period of time. If the number of restart attempts exceeds the configured systemd start limit, the service will no longer start and enters the start-limit-hit state.

Initially, the service restarts successfully:

2026-06-08T21:35:05.907745+02:00 ucs5primary systemd[1]: Stopping univention-directory-notifier.service - Univention Directory Notifier Daemon...
2026-06-08T21:35:05.909123+02:00 ucs5primary systemd[1]: univention-directory-notifier.service: Deactivated successfully.
2026-06-08T21:35:05.909338+02:00 ucs5primary systemd[1]: Stopped univention-directory-notifier.service - Univention Directory Notifier Daemon.
2026-06-08T21:35:05.909543+02:00 ucs5primary systemd[1]: univention-directory-notifier.service: Consumed 4.839s CPU time.
2026-06-08T21:35:05.954414+02:00 ucs5primary systemd[1]: univention-directory-listener.service: Deactivated successfully.
2026-06-08T21:35:05.954685+02:00 ucs5primary systemd[1]: univention-directory-listener.service: Consumed 24.482s CPU time.
2026-06-08T21:35:11.115666+02:00 ucs5primary systemd[1]: Starting univention-directory-notifier.service - Univention Directory Notifier Daemon...
2026-06-08T21:35:12.511506+02:00 ucs5primary systemd[1]: Started univention-directory-notifier.service - Univention Directory Notifier Daemon.

After multiple restart attempts, systemd refuses to start the service with the message Failed with result 'start-limit-hit':

2026-06-08T21:42:27.600620+02:00 ucs5primary systemd[1]: univention-directory-notifier.service: Start request repeated too quickly.
2026-06-08T21:42:27.601172+02:00 ucs5primary systemd[1]: univention-directory-notifier.service: Failed with result 'start-limit-hit'.
2026-06-08T21:42:27.601230+02:00 ucs5primary systemd[1]: Failed to start univention-directory-notifier.service - Univention Directory Notifier Daemon.
2026-06-08T21:42:31.168231+02:00 ucs5primary systemd[1]: univention-directory-listener.service: Scheduled restart job, restart counter is at 100.
2026-06-08T21:42:31.168375+02:00 ucs5primary systemd[1]: Stopped univention-directory-listener.service - Univention Directory Listener Daemon.

Root Cause

The default systemd configuration for the Univention Directory Notifier service defines the following start limits:

StartLimitBurst=50
StartLimitIntervalSec=1000

The current configuration can be inspected using:

systemctl edit univention-directory-notifier.service

Example output:

### Editing /etc/systemd/system/univention-directory-notifier.service.d/override.conf
### Anything between here and the comment below will become the new contents of the file

### Lines below this comment will be discarded

### /lib/systemd/system/univention-directory-notifier.service
# [Unit]
# Description=Univention Directory Notifier Daemon
# After=network.target slapd.service
# ConditionPathExists=/var/univention-join/joined
# StartLimitBurst=50
# StartLimitIntervalSec=1000
#
# [Service]
# EnvironmentFile=/etc/default/univention-directory-notifier
# ExecStartPre=/usr/share/univention-directory-notifier/import_translog.sh
# ExecStart=/usr/sbin/univention-directory-notifier -F $UDN_OPTS
# Restart=always
# RestartSec=10s
# StandardOutput=append:/var/log/univention/notifier.log
# StandardError=append:/var/log/univention/notifier.log
#
# [Install]
# WantedBy=multi-user.target

Once 50 restart attempts occur within the configured interval of 1000 seconds, systemd prevents any additional starts and the service fails with the following error:

Failed with result 'start-limit-hit'

Solution

Increase the value of StartLimitBurst or disable the limit entirely by setting it to 0.

There are two ways to configure this.

Option 1 – Configure the override file directly

Edit or create the following file:

/etc/systemd/system/univention-directory-notifier.service.d/override.conf

Add the following content:

[Unit]
StartLimitBurst=0

Save the file.

Option 2 – Use systemctl edit

Run:

systemctl edit univention-directory-notifier.service

Add the following configuration:

[Unit]
StartLimitBurst=0

The resulting file should look similar to this:

### Editing /etc/systemd/system/univention-directory-notifier.service.d/override.conf
### Anything between here and the comment below will become the new contents of the file

[Unit]
StartLimitBurst=0

### Lines below this comment will be discarded

Apply the Configuration

After modifying the configuration, reload the systemd manager configuration:

systemctl daemon-reload

Verify that the new setting has been applied:

systemctl show univention-directory-notifier | grep StartLimit

Recommendation

Setting:

StartLimitBurst=0

completely disables the restart limit and allows an unlimited number of service restarts.

If you prefer to keep protection against excessive restart attempts, configure a higher value instead, for example:

StartLimitBurst=100

A value of 100 provides sufficient headroom for scenarios involving approximately 74 consecutive restarts, while still maintaining protection against uncontrolled restart loops.