Univention Bugzilla – Bug 53480
univention.admin.uexceptions.wrongObjectType: ... is not recognized as dns/host_record
Last modified: 2023-11-14 11:21:03 CET
Version: 5.0-0 errata14 Error: Interner Server-Fehler in "udm/query (dns/dns)". Request: udm/query (dns/dns) File "%PY3%/notifier/threads.py", line 80, in _run result = self._function() File "%PY3%/notifier/__init__.py", line 105, in __call__ return self._function(*tmp, **self._kwargs) File "%PY3%/univention/management/console/modules/udm/__init__.py", line 595, in _thread superordinate = mod.get(superordinate) File "%PY3%/univention/management/console/modules/udm/udm_ldap.py", line 730, in get UDM_Error(exc).reraise() File "%PY3%/univention/management/console/modules/udm/udm_ldap.py", line 365, in reraise six.reraise(self.__class__, self, self.exc_info[2]) File "%PY3%/six.py", line 692, in reraise raise value.with_traceback(tb) File "%PY3%/univention/management/console/modules/udm/udm_ldap.py", line 718, in get obj = self.module.object(None, ldap_connection, None, ldap_dn, superordinate, attributes=attributes) File "%PY3%/univention/admin/handlers/dns/host_record.py", line 156, in __init__ univention.admin.handlers.simpleLdap.__init__(self, co, lo, position, dn, superordinate, attributes=attributes) File "%PY3%/univention/admin/handlers/__init__.py", line 225, in __init__ raise univention.admin.uexceptions.wrongObjectType('%s is not recognized as %s.' % (self.dn, self.module)) univention.management.console.modules.udm.udm_ldap.UDM_Error: Der Objekttyp dieses Objekts unterscheided sich von dem angegebenen Objekttyp. relativeDomainName=@,zoneName=*******,cn=dns,dc=******,dc=lan is not recognized as dns/host_record. Role: domaincontroller_master
Reported again: Version: 5.0-0 errata127
Version: 5.0-2 errata476 Remark: add host name but can't delete it Error: Internal server error during "udm/remove (dns/dns)". Request: udm/remove (dns/dns) Traceback (most recent call last): File "%PY3%/notifier/threads.py", line 80, in _run result = self._function() File "%PY3%/notifier/__init__.py", line 105, in __call__ return self._function(*tmp, **self._kwargs) File "%PY3%/univention/management/console/modules/udm/__init__.py", line 475, in _thread module.remove(ldap_dn, options.get('cleanup', False), options.get('recursive', False)) File "%PY3%/univention/management/console/modules/udm/udm_ldap.py", line 599, in remove obj = self.module.object(None, ldap_connection, ldap_position, dn=ldap_dn, superordinate=superordinate) File "%PY3%/univention/admin/handlers/dns/host_record.py", line 159, in __init__ univention.admin.handlers.simpleLdap.__init__(self, co, lo, position, dn, superordinate, attributes=attributes) File "%PY3%/univention/admin/handlers/__init__.py", line 227, in __init__ raise univention.admin.uexceptions.wrongObjectType('%s is not recognized as %s.' % (self.dn, self.module)) univention.admin.uexceptions.wrongObjectType: relativeDomainName=@,zoneName=*******.**.**,cn=dns,dc=******,dc=**,dc=** is not recognized as dns/host_record. Role: domaincontroller_master
Version: 5.0-2 errata476 Remark: accidentally add the same domain name and can't delete Error: Internal server error during "udm/query (dns/dns)". Request: udm/query (dns/dns) Traceback (most recent call last): File "%PY3%/notifier/threads.py", line 80, in _run result = self._function() File "%PY3%/notifier/__init__.py", line 105, in __call__ return self._function(*tmp, **self._kwargs) File "%PY3%/univention/management/console/modules/udm/__init__.py", line 597, in _thread _superordinate, mod = self.get_obj_module(request.flavor, superordinate) File "%PY3%/univention/management/console/modules/udm/__init__.py", line 230, in get_obj_module return get_obj_module(flavor, ldap_dn, self.get_ldap_connection()[0]) File "%PY3%/univention/management/console/modules/udm/udm_ldap.py", line 1222, in get_obj_module return module.get(ldap_dn, attributes=attr), module File "%PY3%/univention/management/console/modules/udm/udm_ldap.py", line 731, in get UDM_Error(exc).reraise() File "%PY3%/univention/management/console/modules/udm/udm_ldap.py", line 366, in reraise six.reraise(self.__class__, self, self.exc_info[2]) File "%PY3%/six.py", line 692, in reraise raise value.with_traceback(tb) File "%PY3%/univention/management/console/modules/udm/udm_ldap.py", line 719, in get obj = self.module.object(None, ldap_connection, None, ldap_dn, superordinate, attributes=attributes) File "%PY3%/univention/admin/handlers/dns/host_record.py", line 159, in __init__ univention.admin.handlers.simpleLdap.__init__(self, co, lo, position, dn, superordinate, attributes=attributes) File "%PY3%/univention/admin/handlers/__init__.py", line 227, in __init__ raise univention.admin.uexceptions.wrongObjectType('%s is not recognized as %s.' % (self.dn, self.module)) univention.management.console.modules.udm.udm_ldap.UDM_Error: The object type of this object differs from the specified object type. relativeDomainName=@,zoneName=******,cn=dns,dc=******,dc=**,dc=** is not recognized as dns/host_record. Role: domaincontroller_master
latest: 5.0-3 errata638 Remark: adding @ host record for domain causes the zone for the domain to get created a second time with error messages in the UI.
2023041121000121 5.0-3 errata622
Internal server error during "udm/remove (dns/dns)". Request: udm/remove (dns/dns) Traceback (most recent call last): File "%PY3%/univention/management/console/modules/decorators.py", line 254, in _run result = self._function(*args, **kwargs) # type: Union[BaseException, _T] File "%PY3%/univention/management/console/modules/udm/__init__.py", line 466, in remove module.remove(ldap_dn, options.get('cleanup', False), options.get('recursive', False)) File "%PY3%/univention/management/console/modules/udm/udm_ldap.py", line 594, in remove obj = self.module.object(None, ldap_connection, ldap_position, dn=ldap_dn, superordinate=superordinate) File "%PY3%/univention/admin/handlers/dns/txt_record.py", line 114, in __init__ univention.admin.handlers.simpleLdap.__init__(self, co, lo, position, dn, superordinate, attributes=attributes) File "%PY3%/univention/admin/handlers/__init__.py", line 230, in __init__ raise univention.admin.uexceptions.wrongObjectType('%s is not recognized as %s.' % (self.dn, self.module)) univention.admin.uexceptions.wrongObjectType: The object type of this object differs from the specified object type: relativeDomainName=***,zoneName=***,cn=***,dc=***,dc=***,dc=*** is not recognized as dns/txt_record.
(In reply to Mika Westphal from comment #7) 2023080821000041 2023080821000031
In UCS 5.0-5 errata875 the problem still presist. Is there any workaround?
(In reply to Jan Kraljic from comment #9) > In UCS 5.0-5 errata875 the problem still presist. > > Is there any workaround? ldapdelete -x -D "cn=admin,$(ucr get ldap/base)" -y /etc/ldap.secret \ "relativeDomainName=@,zoneName=domain.org,cn=dns,dc=domain,dc=org"
(In reply to Jan Kraljic from comment #10) > (In reply to Jan Kraljic from comment #9) > > In UCS 5.0-5 errata875 the problem still presist. > > > > Is there any workaround? > > ldapdelete -x -D "cn=admin,$(ucr get ldap/base)" -y /etc/ldap.secret \ > "relativeDomainName=@,zoneName=domain.org,cn=dns,dc=domain,dc=org" can you give us an LDIF of the object, so we can analyze what's wrong with it.
```console # zone=$(udm dns/forward_zone list | sed -ne 's/DN: //p;T;q') # udm dns/host_record create --superordinate "$zone" --set name=@ # univention-ldapsearch -xLLLs base -b relativeDomainName=@,zoneName=phahn50.qa,cn=dns,dc=phahn50,dc=qa dn: relativeDomainName=@,zoneName=phahn50.qa,cn=dns,dc=phahn50,dc=qa zoneName: phahn50.qa relativeDomainName: @ dNSTTL: 10800 objectClass: univentionObject objectClass: dNSZone objectClass: top univentionObjectType: dns/host_record # umc-command --pretty-print --password univention --username Administrator udm/query --flavor dns/dns --option superordinate="relativeDomainName=@,$zone" --option objectProperty=None Response: COMMAND --- ARGUMENTS: udm/query MIMETYPE : application/json STATUS : 591 OPTIONS : { 'objectProperty': 'None', 'superordinate': 'relativeDomainName=@,zoneName=phahn50.qa,cn=dns,dc=phahn50,dc=qa'} MESSAGE : Interner Server-Fehler in "udm/query (dns/dns)". RESULT : { 'location': 'https://dc20.phahn50.qa/univention/command/udm', 'message': 'Interner Server-Fehler in "udm/query (dns/dns)".', 'status': 591, 'traceback': 'Interner Server-Fehler in "udm/query (dns/dns)".\n' 'Request: udm/query (dns/dns)\n' '\n' 'Traceback (most recent call last):\n' ' File ' '"/usr/lib/python3/dist-packages/univention/management/console/modules/decorators.py", ' 'line 259, in _run\n' ' result = self._function(*args, **kwargs) # type: ' 'Union[BaseException, _T]\n' ' File ' '"/usr/lib/python3/dist-packages/univention/management/console/modules/udm/__init__.py", ' 'line 586, in query\n' ' _superordinate, mod = self.get_obj_module(request.flavor, ' 'superordinate)\n' ' File ' '"/usr/lib/python3/dist-packages/univention/management/console/modules/udm/__init__.py", ' 'line 227, in get_obj_module\n' ' return get_obj_module(flavor, ldap_dn, ' 'self.get_ldap_connection()[0])\n' ' File ' '"/usr/lib/python3/dist-packages/univention/management/console/modules/udm/udm_ldap.py", ' 'line 1211, in get_obj_module\n' ' return module.get(ldap_dn, attributes=attr), module\n' ' File ' '"/usr/lib/python3/dist-packages/univention/management/console/modules/udm/udm_ldap.py", ' 'line 725, in get\n' ' UDM_Error(exc).reraise()\n' ' File ' '"/usr/lib/python3/dist-packages/univention/management/console/modules/udm/udm_ldap.py", ' 'line 364, in reraise\n' ' six.reraise(self.__class__, self, self.exc_info[2])\n' ' File "/usr/lib/python3/dist-packages/six.py", line 692, in ' 'reraise\n' ' raise value.with_traceback(tb)\n' ' File ' '"/usr/lib/python3/dist-packages/univention/management/console/modules/udm/udm_ldap.py", ' 'line 714, in get\n' ' obj = self.module.object(None, ldap_connection, None, ' 'ldap_dn, superordinate, attributes=attributes)\n' ' File ' '"/usr/lib/python3/dist-packages/univention/admin/handlers/dns/host_record.py", ' 'line 158, in __init__\n' ' univention.admin.handlers.simpleLdap.__init__(self, co, ' 'lo, position, dn, superordinate, attributes=attributes)\n' ' File ' '"/usr/lib/python3/dist-packages/univention/admin/handlers/__init__.py", ' 'line 230, in __init__\n' " raise univention.admin.uexceptions.wrongObjectType('%s is " "not recognized as %s.' % (self.dn, self.module))\n" 'univention.management.console.modules.udm.udm_ldap.UDM_Error: ' 'Der Objekttyp dieses Objekts unterscheided sich von dem ' 'angegebenen Objekttyp: ' 'relativeDomainName=@,zoneName=phahn50.qa,cn=dns,dc=phahn50,dc=qa ' 'is not recognized as dns/host_record.'} ``` *** This bug has been marked as a duplicate of bug 50385 ***