Univention Bugzilla – Bug 44294
Reject in sync_to_ucs: The attribute 'sid' could not get locked
Last modified: 2023-02-07 02:28:03 CET
Hi, I updated univention to its latest stable version yesterday (4.2). I'd had some problems with the previous version, so I decided to do a fresh installation on my server. I backed up all the information I had on LDAP and ucr variables. When I back up all the previous information and join a slave DC to my domain, I get a huge list of rejecteds. The error I keep getting in /var/log/univention/connector-s4.log is the following: 05.04.2017 10:11:19,539 LDAP (PROCESS): sync to ucs: Resync rejected dn: CN=CAP-UNITAT,CN=Groups,DC=idicat,DC=net 05.04.2017 10:11:19,544 LDAP (PROCESS): sync to ucs: [ group] [ modify] cn=cap_unitat,cn=groups,dc=idicat,dc=net 05.04.2017 10:11:19,563 LDAP (ERROR ): Unknown Exception during sync_to_ucs 05.04.2017 10:11:19,564 LDAP (ERROR ): Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/s4connector/__init__.py", line 1497, in sync_to_ucs result = self.modify_in_ucs(property_type, object, module, position) File "/usr/lib/pymodules/python2.7/univention/s4connector/__init__.py", line 1281, in modify_in_ucs return ucs_object.modify() and self.__modify_custom_attributes(property_type, object, ucs_object, module, position) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 318, in modify return self._modify(modify_childs, ignore_license=ignore_license) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 806, in _modify ml = self._ldap_modlist() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/groups/group.py", line 592, in _ldap_modlist self.groupSid = self.__generate_group_sid(self.oldattr['gidNumber'][0]) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/groups/group.py", line 1009, in __generate_group_sid groupSid = univention.admin.allocators.request(self.lo, self.position, 'sid', sid) File "/usr/lib/pymodules/python2.7/univention/admin/allocators.py", line 196, in request return acquireUnique(lo, position, type, value, _type2attr[type], scope=_type2scope[type]) File "/usr/lib/pymodules/python2.7/univention/admin/allocators.py", line 185, in acquireUnique univention.admin.locking.lock(lo, position, type, value, scope=scope) File "/usr/lib/pymodules/python2.7/univention/admin/locking.py", line 98, in lock raise univention.admin.uexceptions.noLock(_('The attribute %r could not get locked.') % (type,)) noLock: The attribute 'sid' could not get locked. Am I doing something wrong? Is this a bug? It's not the first time I get this error, but I thought it could be solved in the latest release. Thanks, Cristina.
> It's not the first time I get this error, but I thought it could be solved in the latest release. I would recommend to use a different channel to investigate the cause of this issue, either https://help.univention.com/ if you are using the core license or a support channel if you are entitled for that, so we can confidentially obtain full log files from your environment. Something seems stuck in your specific environment. But to address your point here, you may check if there is a temporary lock object left over under "cn=sid,cn=temporary,cn=univention", like this: ============================================================================ eval "$(ucr shell)" accountname="CAP-UNITAT" objectSid=$(univention-s4search sAMAccountName=${accountname} objectSid \ | sed -n 's/^objectSid: //p') univention-ldapsearch -xLLL \ -b "cn=${objectSid},cn=sid,cn=temporary,cn=univention,${ldap_base}" ============================================================================ It should be ok to remove it, but I would also recommend checking the overall UCS system health. Please report back via the recommended channels above, as the bugzilla is used to transparently coordinate product development.
*** Bug 44275 has been marked as a duplicate of this bug. ***
This issue has been filed against UCS 4.2. UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.
This still happens with computer objects in our Test environment: 2 times in /var/log/univention/connector-s4.log: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/univention/s4connector/__init__.py", line 1537, in sync_to_ucs result = self.add_in_ucs(property_type, object, module, position) File "/usr/lib/python2.7/dist-packages/univention/s4connector/__init__.py", line 1278, in add_in_ucs res = ucs_object.create(serverctrls=serverctrls, response=response) File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/__init__.py", line 557, in create dn = self._create(response=response, serverctrls=serverctrls) File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/__init__.py", line 1240, in _create al = self._ldap_addlist() File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/computers/__base.py", line 152, in _ldap_addlist self.machineSid = self.getMachineSid(self.lo, self.position, self.uidNum, self.get('sambaRID')) File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/__init__.py", line 1880, in getMachineSid univention.admin.allocators.request(self.lo, self.position, 'sid', sid) File "/usr/lib/python2.7/dist-packages/univention/admin/allocators.py", line 195, in request return acquireUnique(lo, position, type, value, _type2attr[type], scope=_type2scope[type]) File "/usr/lib/python2.7/dist-packages/univention/admin/allocators.py", line 184, in acquireUnique univention.admin.locking.lock(lo, position, type, value, scope=scope) File "/usr/lib/python2.7/dist-packages/univention/admin/locking.py", line 120, in lock raise univention.admin.uexceptions.noLock(_('The attribute %r could not get locked.') % (type,)) noLock: The attribute 'sid' could not get locked.
(In reply to Arvid Requate from comment #2) > *** Bug 44275 has been marked as a duplicate of this bug. *** Please note, that this duplicate is also for Computer objects: Traceback (most recent call last): File "/usr/lib/pymodules/python2.7/univention/s4connector/__init__.py", line 1493, in sync_to_ucs result = self.modify_in_ucs(property_type, object, module, position) File "/usr/lib/pymodules/python2.7/univention/s4connector/__init__.py", line 1276, in modify_in_ucs return ucs_object.modify() and self.__modify_custom_attributes(property_type, object, ucs_object, module, position) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 317, in modify return self._modify(modify_childs, ignore_license=ignore_license) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 807, in _modify ml = self._ldap_modlist() File "/usr/lib/pymodules/python2.7/univention/admin/handlers/computers/windows.py", line 595, in _ldap_modlist self.machineSid = self.getMachineSid(self.lo, self.position, self.oldattr['uidNumber'][0], self.get('sambaRID')) File "/usr/lib/pymodules/python2.7/univention/admin/handlers/__init__.py", line 1149, in getMachineSid univention.admin.allocators.request(self.lo, self.position, 'sid', sid) File "/usr/lib/pymodules/python2.7/univention/admin/allocators.py", line 196, in request return acquireUnique(lo, position, type, value, _type2attr[type], scope=_type2scope[type]) File "/usr/lib/pymodules/python2.7/univention/admin/allocators.py", line 185, in acquireUnique univention.admin.locking.lock(lo, position, type, value, scope=scope) File "/usr/lib/pymodules/python2.7/univention/admin/locking.py", line 98, in lock raise univention.admin.uexceptions.noLock(_('The attribute %r could not get locked.') % (type,)) noLock: The attribute 'sid' could not get locked.
Happens also during group creation: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/univention/s4connector/__init__.py", line 1538, in sync_to_ucs result = self.add_in_ucs(property_type, object, module, position) File "/usr/lib/python2.7/dist-packages/univention/s4connector/__init__.py", line 1274, in add_in_ucs res = ucs_object.create(serverctrls=serverctrls, response=response) File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/__init__.py", line 568, in create dn = self._create(response=response, serverctrls=serverctrls) File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/__init__.py", line 1247, in _create al = self._ldap_addlist() File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/groups/group.py", line 452, in _ldap_addlist self.groupSid = self.__generate_group_sid(self.gidNum) File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/groups/group.py", line 877, in __generate_group_sid return self.request_lock('sid', sid) File "/usr/lib/python2.7/dist-packages/univention/admin/handlers/__init__.py", line 1670, in request_lock value = univention.admin.allocators.request(self.lo, self.position, name, value) File "/usr/lib/python2.7/dist-packages/univention/admin/allocators.py", line 194, in request return acquireUnique(lo, position, type, value, _type2attr[type], scope=_type2scope[type]) File "/usr/lib/python2.7/dist-packages/univention/admin/allocators.py", line 183, in acquireUnique univention.admin.locking.lock(lo, position, type, value.encode('utf-8'), scope=scope) File "/usr/lib/python2.7/dist-packages/univention/admin/locking.py", line 121, in lock raise univention.admin.uexceptions.noLock(_('The attribute %r could not get locked.') % (type,)) noLock: The attribute 'sid' could not get locked.
it is still in 5.0.2, go see the server forums where i have been running some tests.