On Wed, July 22, 2020 21:47, Andrew Bartlett wrote:> Are you using DLZ_BIND9? There is a bug where it doesn't know the lockingrules for those files. No. I am using the internal dns service.> Otherwise, work out which commend it is waiting on (the child) and > what lock that is waiting on (lslocks on linux is what I used to > debug this stuff).There does not appear to be any child process: [root at smb4-2 private]# ps -auwx | grep python root 16001 0.0 0.0 11448 2812 1 R+J 11:01 0:00.00 grep --color=auto python root 14795 0.0 0.6 143248 94216 2 I+J 10:05 0:05.59 /usr/local/bin/python3.7 -m trace --trace /usr/local/bin/samba-tool doma The code immediately before the point the offline script stalls is: --- modulename: os, funcname: fsencode os.py(812): filename = fspath(filename) # Does type-checking of `filename`. os.py(813): if isinstance(filename, str): os.py(814): return filename.encode(encoding, errors) subprocess.py(1466): if os.path.dirname(executable): --- modulename: posixpath, funcname: dirname posixpath.py(156): p = os.fspath(p) posixpath.py(157): sep = _get_sep(p) --- modulename: posixpath, funcname: _get_sep . . . --- modulename: subprocess, funcname: __enter__ subprocess.py(845): return self subprocess.py(340): try: subprocess.py(341): return p.wait(timeout=timeout) --- modulename: subprocess, funcname: wait subprocess.py(1016): if timeout is not None: subprocess.py(1018): try: subprocess.py(1019): return self._wait(timeout=timeout) --- modulename: subprocess, funcname: _wait subprocess.py(1623): if self.returncode is not None: subprocess.py(1626): if timeout is not None: subprocess.py(1649): while self.returncode is None: subprocess.py(1650): with self._waitpid_lock: subprocess.py(1651): if self.returncode is not None: subprocess.py(1653): (pid, sts) = self._try_wait(0) --- modulename: subprocess, funcname: _try_wait subprocess.py(1610): try: subprocess.py(1611): (pid, sts) = os.waitpid(self.pid, wait_flags) This is FreeBSD so lslock is only available in Linux compatibility mode, which is not the case in this instance. -- *** e-Mail is NOT a SECURE channel *** Do NOT transmit sensitive data via e-Mail Unencrypted messages have no legal claim to privacy Do NOT open attachments nor follow links sent by e-Mail James B. Byrne mailto:ByrneJB at Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3
On Thu, July 23, 2020 16:16:30, Mani Wieser wrote:>>> ../../source4/nbt_server/interfaces.c:228(nbtd_add_socket) >>> Failed to bind to 127.0.162.1:137 - NT_STATUS_ADDRESS_ALREADY_ASSOCIATED> check where has port 137 occupiedThere is nothing listening on 137 [root at smb4-2 ~ (master)]# netstat -an | grep -i listen tcp4 0 0 192.168.18.162.22 *.* LISTEN tcp4 0 0 192.168.216.162.22 *.* LISTEN tcp4 0 0 *.10000 *.* LISTEN> why is your localhost at 127.0.162.1?This problem is occurring in a FreeBSD jail. Jails require separate lo0 addresses from each other and from the host system. I assigned that ip address when I created the jail. The hosts file is appropriately configured to account for this. -- *** e-Mail is NOT a SECURE channel *** Do NOT transmit sensitive data via e-Mail Unencrypted messages have no legal claim to privacy Do NOT open attachments nor follow links sent by e-Mail James B. Byrne mailto:ByrneJB at Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3
On 23.07.2020 19:12, James B. Byrne via samba wrote:> netstat -an | grep -i listenshows also nothing on my server (4.12.5) with port 137, but server1:/var/log# netstat -tulpn|grep 137 udp??????? 0????? 0 127.0.0.1:137 0.0.0.0:*?????????????????????????? 2655912/samba: task udp??????? 0????? 0 127.255.255.255:137 0.0.0.0:*?????????????????????????? 2655912/samba: task udp??????? 0????? 0 192.168.0.251:137 0.0.0.0:*?????????????????????????? 2655912/samba: task udp??????? 0????? 0 192.168.1.255:137 0.0.0.0:*?????????????????????????? 2655912/samba: task server1:/var/log# ps -AF|grep 2655912 root???? 2655912 2655911? 0 44325 15688?? 1 18:11 ? 00:00:00 samba: task[nbt] pre-fork master root???? 2673937 2454885? 0? 1933?? 868?? 7 19:16 pts/4 00:00:00 grep 2655912 Mani
On 23/07/2020 18:12, James B. Byrne via samba wrote:> > On Thu, July 23, 2020 16:16:30, Mani Wieser wrote: > >>>> ../../source4/nbt_server/interfaces.c:228(nbtd_add_socket) >>>> Failed to bind to 127.0.162.1:137 - NT_STATUS_ADDRESS_ALREADY_ASSOCIATED >> check where has port 137 occupied > There is nothing listening on 137 > > [root at smb4-2 ~ (master)]# netstat -an | grep -i listen > tcp4 0 0 192.168.18.162.22 *.* LISTEN > tcp4 0 0 192.168.216.162.22 *.* LISTEN > tcp4 0 0 *.10000 *.* LISTENTry it like this: netstat -an | grep -i LISTEN | grep nmb Rowland
On Thu, 2020-07-23 at 11:27 -0400, James B. Byrne via samba wrote:> On Wed, July 22, 2020 21:47, Andrew Bartlett wrote: > > > Are you using DLZ_BIND9? There is a bug where it doesn't know the > > locking > > rules for those files. > > No. I am using the internal dns service.OK. Good.> > > Otherwise, work out which commend it is waiting on (the child) and > > what lock that is waiting on (lslocks on linux is what I used to > > debug this stuff). > > There does not appear to be any child process:Clearly there is, as otherwise we could not be in waitpid on it. The process is not a python process, it will be tdbbackup. The command line arguments to that process will be instructive. I'm sorry you don't have lslocks, you will have a very hard time debugging this without an equivalent tool. Andrew Bartlett -- Andrew Bartlett https://samba.org/~abartlet/ Authentication Developer, Samba Team https://samba.org Samba Developer, Catalyst IT https://catalyst.net.nz/services/samba