Problem: ERROR(<type 'exceptions.IndexError'>) in KCC CONNECTION OBJECTS

drs-replication

#1

Problem

With samba-tool drs showrepl you get at the end this traceback. Everything else is OK in the output!

==== KCC CONNECTION OBJECTS ====
Connection --
ERROR(<type 'exceptions.IndexError'>): uncaught exception - list index out of range
File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line 176, in _run
return self.run(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/samba/netcmd/drs.py", line 183, in run
c_server_dns = c_server_res[0]["dnsHostName"][0]

Investigation:

c_server_dns = c_server_res[0]["dnsHostName"][0]
This indicated that a server could not be reached. Without editing the sourcecode you are not be able to see which one, but this is not neccessary.

Solution:

Look with the following search for a deleted server used for the drs replication instead of the online one
univention-s4search --cross-ncs --show-deleted 'fromServer=*' fromServer

You will find the deleted one and the online one, than you can delete the deleted server object with ldbdel:

ldbdel -H /var/lib/samba/private/sam.ldb --cross-ncs <DN>