Problem: DNS zone could not be added


DNS zone could not be added

21.12.21 11:05:06.716  ADMIN       ( ERROR   ) : Creating ',cn=dns,dc=schein,dc=ig' failed: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/", line 1283, in _create
    self.lo.add(self.dn, al, serverctrls=serverctrls, response=response)
  File "/usr/lib/python2.7/dist-packages/univention/admin/", line 865, in add
    raise univention.admin.uexceptions.ldapError(_err2str(msg), original_exception=msg)
ldapError: No such object


  • Primary, Backup and Replica.
  • dns/backend is ldap.
  • samba4 is not installed on the domain.


There is an object still existing below the deleted zone, but removing also failes:

ldapdelete -x -D "cn=admin,$(ucr get ldap/base)" -y /etc/ldap.secret 'relativeDomainName=19,,cn=dns,dc=schein,dc=ig'
ldap_delete: No such object (32)


Add the Zone again:
Via ldapadd it also does not work so we have to use slapadd to bypass the ldap consistycheck. BUT be aware this change is also not recognizes by the replication mechanism. In this case we already had failed.ldifs on the other servers. So this also has to be done on the other servers, backup and replica.

So first get the ldif from an existing zone, or use the zone from the ldap backup:
univention-ldapsearch -b,cn=dns,dc=schein,dc=ig -s base > file.ldif

objectClass: dNSZone
objectClass: top
objectClass: univentionObject
univentionObjectType: dns/reverse_zone
dNSTTL: 10800
relativeDomainName: @
nSRecord: master.schein.ig.
sOARecord: master.schein.ig. root.schein.ig. 17 28800 7200 604800 10800

slapadd -l file.ldif