Problem: a demoschool is created first, and after removing it, dhcp does not work anymore

Problem:

When you install a new single school, the demo school is created, if you do not specifically forbid this, with setting an ucr variable.
When remove the demoschool dhcp is not starting and working anymore.

Error message

Feb 05 11:03:17 ucs1 systemd[1]: univention-dhcp.service: Unit entered failed state.
Feb 05 11:03:17 ucs1 systemd[1]: univention-dhcp.service: Failed with result 'exit-code'.
Feb 05 11:03:21 ucs1 dhcpd[13348]: Error: Cannot find LDAP entry matching (&(objectClass=dhcpServer)(cn=ucs1))
Feb 05 11:03:21 ucs1 dhcpd[13348]: Configuration file errors encountered -- exiting

Solution:

The best solution is, to reinstall the server without the demoschool, to have a clean start.

It is possible to fix this, with some expenditure:
You have to to delete and recreate the dhcp server object in the correct OU and fix UCR dhcpd/ldap/base

  • wrong
udm dhcp/server list

DN: cn=ucs1,cn=schein.ig,cn=dhcp,dc=schein,dc=ig
  server: ucs1 
ucr get dhcpd/ldap/base
cn=dhcp,ou=DEMOSCHOOL,dc=schein,dc=ig
  • Should look like:
udm dhcp/server list

DN: cn=ucs1,cn=school,cn=dhcp,ou=school,dc=schein,dc=igt
  server: ucs1
ucr get dhcpd/ldap/base
cn=dhcp,ou=school,dc=schein,dc=ig

Already defined subnets need to be added too, and all dhcp relevant policy need to be checked.

1 Like
Mastodon