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


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

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


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.


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>