Problem: Univention network - Failed to start Register current IP addresses in LDAP directory

Problem

If you have assigned the IP of a server via DHCP instead of assigning it statically, you could receive the following error message when calling systemctl status univention-network-common.service.

● univention-network-common.service - Register current IP addresses in
LDAP directory
    Loaded: loaded
(/lib/systemd/system/univention-network-common.service; enabled; vendor
preset: enabled)
    Active: failed (Result: exit-code) since Mon 2025-04-28 10:33:51
CEST; 23min ago
   Process: 6740 ExecStart=/usr/sbin/univention-register-network-address
(code=exited, status=1/FAILURE)
  Main PID: 6740 (code=exited, status=1/FAILURE)

Apr 28 10:33:50 ucs-managed systemd[1]: Starting Register current IP
addresses in LDAP directory...
Apr 28 10:33:51 ucs-managed systemd[1]: univention-network-common.service:
Main process exited, code=exited, status=1/FAILURE
Apr 28 10:33:51 ucs-managed systemd[1]: univention-network-common.service:
Failed with result 'exit-code'.
Apr 28 10:33:51 ucs-managed systemd[1]: Failed to start Register current
IP addresses in LDAP directory.

Root cause: Bug 53252

Solution

To fix this issue, you could give the systems static ip addresses so this conflict will no longer be created or you could create dhcp leasetime policies for the several systems.

Static IP via UCRV

To set static ip address you could use the following UCRV’s:

ucr search --brief interfaces

interfaces/.*/address: <empty>
interfaces/.*/broadcast: <empty>
interfaces/.*/hosts: <empty>
interfaces/.*/ipv6/.*/address: <empty>
interfaces/.*/ipv6/.*/prefix: <empty>
interfaces/.*/ipv6/acceptRA: <empty>
interfaces/.*/mac: <empty>
interfaces/.*/mtu: <empty>
interfaces/.*/netmask: <empty>
interfaces/.*/network: <empty>
interfaces/.*/options/.*: <empty>
interfaces/.*/order: <empty>
interfaces/.*/route/.*: <empty>
interfaces/.*/start: <empty>
interfaces/.*/type: <empty>
interfaces/eth0/address: 10.200.30.24
interfaces/eth0/broadcast: 10.200.30.255
interfaces/eth0/ipv6/acceptRA: false
interfaces/eth0/netmask: 255.255.255.0
interfaces/eth0/network: 10.200.30.0
interfaces/eth0/start: true
interfaces/eth0/type: static
interfaces/primary: eth0

To set the variables via UCR, you could use this for example:

ucr set interfaces/eth0/type=static interfaces/eth0/address=10.200.30.24

For more information, check ucr --help

univention-config-registry: base configuration for UCS
copyright (c) 2001-2024 Univention GmbH, Germany

Syntax:
  univention-config-registry [options] <action> [options] [parameters]

Options:

  -h | --help | -?:
    print this usage message and exit program

  --version | -v:
    print version information and exit program

  --shell (valid actions: dump, search):
    convert key/value pair into shell compatible format, e.g.
    `version/version: 1.0` => `version_version="1.0"`

  --keys-only (valid actions: dump, search):
    print only the keys

Actions:
  set [--force|--schedule|--ldap-policy] [--ignore-check] <key>=<value> [... <key>=<value>]:
    set one or more keys to specified values; if a key is non-existent
    in the configuration registry it will be created
    --ignore-check: ignore check if given value is compatible with type of the key

  get <key>:
    retrieve the value of the specified key from the configuration
    database

  unset [--force|--schedule|--ldap-policy] <key> [... <key>]:
    remove one or more keys (and its associated values) from
    configuration database

  dump:
    display all key/value pairs which are stored in the
    configuration database

  search [--key|--value|--all] [--category <category>] [--brief|-verbose] \
          [--non-empty] [... <regex>]:
    displays all key/value pairs and their descriptions that match at
    least one of the given regular expressions
    --key: only search the keys (default)
    --value: only search the values
    --all: search keys, values and descriptions
    --category: limit search to variables of <category>
    --brief: don't print descriptions (default controlled via ucr/output/brief)
    --verbose: also print category for each variable
    --non-empty: only search in non-empty variables
    no <regex> given: display all variables

  info <key> [... <key>]:
    display verbose information for the specified variable(s)

  shell [key]:
    convert key/value pair into shell compatible format, e.g.
    `version/version: 1.0` => `version_version="1.0"`
    (deprecated: use --shell dump instead)

  commit [file1 ...]:
    rebuild configuration file from univention template; if
    no file is specified ALL configuration files are rebuilt

  filter [file]:
    evaluate a template file, expects Python inline code in UTF-8 or US-ASCII

Description:
  univention-config-registry is a tool to handle the basic configuration for
  Univention Corporate Server (UCS)

Policy for dhcp leasetime

If you want to create policies for the leasetime settings, check the following article.

1 Like