Hi
I have a DC server (named dc-server1) with corrupted database. I
transferred all FSMO to dc-server2 and now I'm trying to demote dc-server1
running "samba-tool domain demote --verbose
--remove-other-dead-server=dc-server1" on dc-server2, but the following
error occurred.
The problem continues even after running "samba-tool dbcheck --cross-ncs
--fix --yes".
Samba version is 4.4.5
ERROR(<type 'exceptions.TypeError'>): uncaught exception -
__ndr_unpack__()
argument 1 must be string or read-only buffer, not dnsp.DnssrvRpcRecord
File
"/usr/local/samba/lib64/python2.7/site-packages/samba/netcmd/__init__.py",
line 175, in _run
return self.run(*args, **kwargs)
File
"/usr/local/samba/lib64/python2.7/site-packages/samba/netcmd/domain.py",
line 720, in run
remove_dc.remove_dc(samdb, logger, remove_other_dead_server)
File
"/usr/local/samba/lib64/python2.7/site-packages/samba/remove_dc.py",
line 423, in remove_dc
remove_dns_account=True)
File
"/usr/local/samba/lib64/python2.7/site-packages/samba/remove_dc.py",
line 351, in offline_remove_ntds_dc
remove_dns_account=remove_dns_account)
File
"/usr/local/samba/lib64/python2.7/site-packages/samba/remove_dc.py",
line 266, in offline_remove_server
remove_dns_references(samdb, logger, dnsHostName)
File
"/usr/local/samba/lib64/python2.7/site-packages/samba/remove_dc.py",
line 186, in remove_dns_references
for v in values if not to_remove(v) ]
File
"/usr/local/samba/lib64/python2.7/site-packages/samba/remove_dc.py",
line 160, in to_remove
dnsRecord = ndr_unpack(dnsp.DnssrvRpcRecord, value)
File "/usr/local/samba/lib64/python2.7/site-packages/samba/ndr.py",
line
45, in ndr_unpack
object.__ndr_unpack__(data, allow_remaining=allow_remaining)
A transaction is still active in ldb context [0x28f6100] on
tdb:///usr/local/samba/private/sam.ldb