Cant remove server

Hi,

today i tried to remove my secondary DC on my Primary Node with this Article. How-To: Remove a Server

Now i get an error:

root@primary:~# samba-tool domain demote --remove-other-dead-server=secondary
INFO 2022-08-14 10:32:55,572 pid:2514 /usr/lib/python3/dist-packages/samba/remove_dc.py #337: Removing nTDSConnection: CN=9ff2f04e-fe22-40f3-8d21-05d6ea5f93c4,CN=NTDS Settings,CN=PRIMARY,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=c-lab,DC=one
INFO 2022-08-14 10:32:55,576 pid:2514 /usr/lib/python3/dist-packages/samba/remove_dc.py #359: Removing nTDSDSA: CN=NTDS Settings,CN=SECONDARY,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=c-lab,DC=one (and any children)
ERROR(ldb): uncaught exception - No such Base DN: CN=SECONDARY,OU=Domain Controllers,DC=c-lab,DC=one
  File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 186, in _run
    return self.run(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/samba/netcmd/domain.py", line 806, in run
    remove_dc.remove_dc(samdb, logger, remove_other_dead_server)
  File "/usr/lib/python3/dist-packages/samba/remove_dc.py", line 449, in remove_dc
    remove_dns_account=True)
  File "/usr/lib/python3/dist-packages/samba/remove_dc.py", line 371, in offline_remove_ntds_dc
    remove_dns_account=remove_dns_account)
  File "/usr/lib/python3/dist-packages/samba/remove_dc.py", line 255, in offline_remove_server
    scope=ldb.SCOPE_BASE)
A transaction is still active in ldb context [0x1a9c1b0] on tdb:///var/lib/samba/private/sam.ldb

grafik

The Server is already stopped etc.
How i can solve it?

Mastodon