Hello, I have three Samba Active Directory Domain Controllers that, from all metrics seem to be working just fine, but for one thing: When I run the following command: # samba-tool visualize uptodateness -r I always get the following response: ERROR(<class 'IndexError'>): uncaught exception - list index out of range File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 185, in _run return self.run(*args, **kwargs) File "/usr/lib/python3/dist-packages/samba/netcmd/visualize.py", line 682, in run utdv_edges = get_utdv_edges(local_kcc, dsas, part_dn, lp, creds) File "/usr/lib/python3/dist-packages/samba/uptodateness.py", line 120, in get_utdv_edges cursors = get_utdv(samdb, part_dn) File "/usr/lib/python3/dist-packages/samba/uptodateness.py", line 86, in get_utdv settings_dn = str(res[0]["distinguishedName"][0]) I run Ubuntu Server 16.04.6 LTS I'm on Samba 4.10.9, which I downloaded and compiled from samba.org. I'm just a little concerned that there's some issue lurking in my data that I would be better off to find and fix that's causing this. Plus, I would really like to see this visualization, as I find it quite helpful. Any tips of how I could hunt down and address the cause of this? Thanks, Matthew ? 2019 KNOCK, inc. All rights reserved. KNOCK, inc, is a registered trademark of KNOCK, inc. This message and any attachments contain information, which is confidential and/or privileged. If you are not the intended recipient, please refrain from any disclosure, copying, distribution or use of this information. Please be aware that such actions are prohibited. If you have received this transmission in error, kindly notify the sender by e-mail. Your cooperation is appreciated.
Hai, That looks like its a bug. I just verified this on a 4.10.10 AD-DC. I was hoping a python package was missing but i dont see/have missing packages here. I have exact the same result. I have reported it : https://bugzilla.samba.org/show_bug.cgi?id=14184 Greetz, Louis> -----Oorspronkelijk bericht----- > Van: samba [mailto:samba-bounces at lists.samba.org] Namens > Matthew Delfino Samba List via samba > Verzonden: dinsdag 5 november 2019 18:39 > Aan: samba at lists.samba.org > Onderwerp: [Samba] List Index Out of Range > > Hello, > > I have three Samba Active Directory Domain Controllers that, > from all metrics seem to be working just fine, but for one > thing: When I run the following command: > > # samba-tool visualize uptodateness -r > > I always get the following response: > > ERROR(<class 'IndexError'>): uncaught exception - list index > out of range > File > "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", > line 185, in _run > return self.run(*args, **kwargs) > File > "/usr/lib/python3/dist-packages/samba/netcmd/visualize.py", > line 682, in run > utdv_edges = get_utdv_edges(local_kcc, dsas, part_dn, lp, creds) > File "/usr/lib/python3/dist-packages/samba/uptodateness.py", > line 120, in get_utdv_edges > cursors = get_utdv(samdb, part_dn) > File "/usr/lib/python3/dist-packages/samba/uptodateness.py", > line 86, in get_utdv > settings_dn = str(res[0]["distinguishedName"][0]) > > I run Ubuntu Server 16.04.6 LTS > I'm on Samba 4.10.9, which I downloaded and compiled from samba.org. > > I'm just a little concerned that there's some issue lurking > in my data that I would be better off to find and fix that's > causing this. Plus, I would really like to see this > visualization, as I find it quite helpful. > > Any tips of how I could hunt down and address the cause of this? > > Thanks, > Matthew > > ? 2019 KNOCK, inc. All rights reserved. KNOCK, inc, is a > registered trademark of KNOCK, inc. This message and any > attachments contain information, which is confidential and/or > privileged. If you are not the intended recipient, please > refrain from any disclosure, copying, distribution or use of > this information. Please be aware that such actions are > prohibited. If you have received this transmission in error, > kindly notify the sender by e-mail. Your cooperation is appreciated. > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba > >
On 06/11/2019 08:01, L.P.H. van Belle via samba wrote:> Hai, > > That looks like its a bug. > > I just verified this on a 4.10.10 AD-DC. > I was hoping a python package was missing but i dont see/have missing packages here. > I have exact the same result. > > I have reported it : https://bugzilla.samba.org/show_bug.cgi?id=14184Hi Louis, you might want to close that bug report ;-) It has been fixed in master and at least 4.11.2. Open /usr/lib/python3/dist-packages/samba/uptodateness.py in your favourite editor Go down to 'def get_utdv(samdb, dn):' Find this block: ??????? res = samdb.search(base=config_dn, ?????????????????????????? expression=("(&(invocationId=%s)" ?????????????????????????????????????? "(objectClass=nTDSDSA))" % inv_id), ?????????????????????????? attrs=["distinguishedName", "invocationId"]) ??????? settings_dn = str(res[0]["distinguishedName"][0]) ??????? prefix, dsa_dn = settings_dn.split(',', 1) ??????? if prefix != 'CN=NTDS Settings': And change it to: ??????? res = samdb.search(base=config_dn, ?????????????????????????? expression=("(&(invocationId=%s)" ?????????????????????????????????????? "(objectClass=nTDSDSA))" % inv_id), ?????????????????????????? attrs=["distinguishedName", "invocationId"]) ??????? try: ??????????? settings_dn = str(res[0]["distinguishedName"][0]) ??????????? prefix, dsa_dn = settings_dn.split(',', 1) ??????? except IndexError as e: ??????????? print("Unknown invocation ID %s" % inv_id, ????????????????? file=sys.stderr) ??????????? continue ??????? if prefix != 'CN=NTDS Settings': Close and save the file and try again. Rowland
Hai Rowland, Thanks for this verification, bug closed. Greetz, Louis> -----Oorspronkelijk bericht----- > Van: samba [mailto:samba-bounces at lists.samba.org] Namens > Rowland penny via samba > Verzonden: woensdag 6 november 2019 10:26 > Aan: samba at lists.samba.org > Onderwerp: Re: [Samba] List Index Out of Range > > On 06/11/2019 08:01, L.P.H. van Belle via samba wrote: > > Hai, > > > > That looks like its a bug. > > > > I just verified this on a 4.10.10 AD-DC. > > I was hoping a python package was missing but i dont > see/have missing packages here. > > I have exact the same result. > > > > I have reported it : > https://bugzilla.samba.org/show_bug.cgi?id=14184 > > Hi Louis, you might want to close that bug report ;-) > > It has been fixed in master and at least 4.11.2. Open > /usr/lib/python3/dist-packages/samba/uptodateness.py in your > favourite > editor > > Go down to 'def get_utdv(samdb, dn):' > > Find this block: > > ??????? res = samdb.search(base=config_dn, > ?????????????????????????? expression=("(&(invocationId=%s)" > ?????????????????????????????????????? > "(objectClass=nTDSDSA))" % inv_id), > ?????????????????????????? attrs=["distinguishedName", > "invocationId"]) > ??????? settings_dn = str(res[0]["distinguishedName"][0]) > ??????? prefix, dsa_dn = settings_dn.split(',', 1) > ??????? if prefix != 'CN=NTDS Settings': > > And change it to: > > ??????? res = samdb.search(base=config_dn, > ?????????????????????????? expression=("(&(invocationId=%s)" > ?????????????????????????????????????? > "(objectClass=nTDSDSA))" % inv_id), > ?????????????????????????? attrs=["distinguishedName", > "invocationId"]) > ??????? try: > ??????????? settings_dn = str(res[0]["distinguishedName"][0]) > ??????????? prefix, dsa_dn = settings_dn.split(',', 1) > ??????? except IndexError as e: > ??????????? print("Unknown invocation ID %s" % inv_id, > ????????????????? file=sys.stderr) > ??????????? continue > ??????? if prefix != 'CN=NTDS Settings': > > Close and save the file and try again. > > Rowland > > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba > >