FreeBSD-12.1p7 jail running Samba-4.10.15 on ZFS. When I run 'samba-tool domain backup offline targetdir=/tmp' I see this: running backup on dirs: /var/db/samba4/private /var/db/samba4 /usr/local/etc Starting transaction on /var/db/samba4/private/secrets At which point samba-tool enters a permanent wait state. 86064 root 1 52 0 131M 78M wait 3 0:01 0.00% python3.7 Trace shows this: . . . --- 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) And that is where it stops. Is this caused by a configuration issue? Is so then what? -- *** 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 Wed, July 22, 2020 12:35, James B. Byrne wrote:> FreeBSD-12.1p7 jail running Samba-4.10.15 on ZFS. > > When I run 'samba-tool domain backup offline targetdir=/tmp' I see this: > > running backup on dirs: /var/db/samba4/private /var/db/samba4 /usr/local/etc > Starting transaction on /var/db/samba4/private/secrets >I tried the backup online option instead and received a timeout error: ERROR(runtime): uncaught exception - (3221225653, '{Device Timeout} The specified I/O operation on %hs was not completed before the time-out period expired.') File "/usr/local/lib/python3.7/site-packages/samba/netcmd/__init__.py", line 185, in _run return self.run(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/samba/netcmd/domain_backup.py", line 249, in run backend_store=backend_store) File "/usr/local/lib/python3.7/site-packages/samba/join.py", line 1555, in join_clone backend_store=backend_store) File "/usr/local/lib/python3.7/site-packages/samba/join.py", line 1632, in __init__ backend_store=backend_store) File "/usr/local/lib/python3.7/site-packages/samba/join.py", line 100, in __init__ ctx.site = ctx.find_dc_site(ctx.server) File "/usr/local/lib/python3.7/site-packages/samba/join.py", line 361, in find_dc_site flags=nbt.NBT_SERVER_LDAP | nbt.NBT_SERVER_DS) I infer that this is related to the ntpd service which listens at TCP137. This service is not running on this host because it is disabled in smb.conf. The reason that it is disabled is that samba_server does not start: [2020/07/22 12:48:49.786881, 0] ../../source4/smbd/server.c:587(binary_smbd_main) samba version 4.10.15 started. Copyright Andrew Tridgell and the Samba Team 1992-2019 [2020/07/22 12:48:50.079799, 0] ../../source4/smbd/server.c:773(binary_smbd_main) binary_smbd_main: samba: using 'standard' process model [2020/07/22 12:48:50.103387, 0] ../../source4/nbt_server/interfaces.c:228(nbtd_add_socket) Failed to bind to 127.0.162.1:137 - NT_STATUS_ADDRESS_ALREADY_ASSOCIATED [2020/07/22 12:48:50.150866, 0] ../../lib/util/become_daemon.c:136(daemon_ready) daemon_ready: daemon 'samba' finished starting up and ready to serve connections [2020/07/22 12:48:50.184811, 0] ../../source4/smbd/service_task.c:36(task_server_terminate) task_server_terminate: task_server_terminate: [nbtd failed to setup interfaces] [2020/07/22 12:48:50.300712, 0] ../../source4/smbd/server.c:371(samba_terminate) samba_terminate: samba_terminate of samba 86503: nbtd failed to setup interface Anyone know how to deal with 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 22/07/2020 19:40, James B. Byrne via samba wrote:> > On Wed, July 22, 2020 12:35, James B. Byrne wrote: >> FreeBSD-12.1p7 jail running Samba-4.10.15 on ZFS. >> >> When I run 'samba-tool domain backup offline targetdir=/tmp' I see this: >> >> running backup on dirs: /var/db/samba4/private /var/db/samba4 /usr/local/etc >> Starting transaction on /var/db/samba4/private/secrets >> > I tried the backup online option instead and received a timeout error: > > ERROR(runtime): uncaught exception - (3221225653, '{Device Timeout} The > specified I/O operation on %hs was not completed before the time-out period > expired.') > File "/usr/local/lib/python3.7/site-packages/samba/netcmd/__init__.py", line > 185, in _run > return self.run(*args, **kwargs) > File "/usr/local/lib/python3.7/site-packages/samba/netcmd/domain_backup.py", > line 249, in run > backend_store=backend_store) > File "/usr/local/lib/python3.7/site-packages/samba/join.py", line 1555, in > join_clone > backend_store=backend_store) > File "/usr/local/lib/python3.7/site-packages/samba/join.py", line 1632, in > __init__ > backend_store=backend_store) > File "/usr/local/lib/python3.7/site-packages/samba/join.py", line 100, in > __init__ > ctx.site = ctx.find_dc_site(ctx.server) > File "/usr/local/lib/python3.7/site-packages/samba/join.py", line 361, in > find_dc_site > flags=nbt.NBT_SERVER_LDAP | nbt.NBT_SERVER_DS) > > I infer that this is related to the ntpd service which listens at TCP137. This > service is not running on this host because it is disabled in smb.conf. The > reason that it is disabled is that samba_server does not start: > > [2020/07/22 12:48:49.786881, 0] ../../source4/smbd/server.c:587(binary_smbd_main) > samba version 4.10.15 started. > Copyright Andrew Tridgell and the Samba Team 1992-2019 > [2020/07/22 12:48:50.079799, 0] ../../source4/smbd/server.c:773(binary_smbd_main) > binary_smbd_main: samba: using 'standard' process model > [2020/07/22 12:48:50.103387, 0] > ../../source4/nbt_server/interfaces.c:228(nbtd_add_socket) > Failed to bind to 127.0.162.1:137 - NT_STATUS_ADDRESS_ALREADY_ASSOCIATED > [2020/07/22 12:48:50.150866, 0] ../../lib/util/become_daemon.c:136(daemon_ready) > daemon_ready: daemon 'samba' finished starting up and ready to serve connections > [2020/07/22 12:48:50.184811, 0] > ../../source4/smbd/service_task.c:36(task_server_terminate) > task_server_terminate: task_server_terminate: [nbtd failed to setup interfaces] > [2020/07/22 12:48:50.300712, 0] ../../source4/smbd/server.c:371(samba_terminate) > samba_terminate: samba_terminate of samba 86503: nbtd failed to setup interface > > > Anyone know how to deal with this? >If you have lines in your smb.conf similar to these: ??? bind interfaces only = yes ??? interfaces = lo eth0 Remove them, there was a bug, now fixed, that caused this. Rowland
On Wed, 2020-07-22 at 12:35 -0400, James B. Byrne via samba wrote:> FreeBSD-12.1p7 jail running Samba-4.10.15 on ZFS. > > When I run 'samba-tool domain backup offline targetdir=/tmp' I see > this: > > running backup on dirs: /var/db/samba4/private /var/db/samba4 > /usr/local/etc > Starting transaction on /var/db/samba4/private/secrets > > At which point samba-tool enters a permanent wait state. > > 86064 root 1 52 0 131M 78M > wait 3 0:01 0.00% python3.7 > > Trace shows this: > > . . . > --- 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) > > And that is where it stops. Is this caused by a configuration > issue? Is so > then what?Are you using DLZ_BIND9? There is a bug where it doesn't know the locking rules for those files. 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). Andrew Bartlett -- Andrew Bartlett https://samba.org/~abartlet/ Authentication Developer, Samba Team https://samba.org Samba Development and Support, Catalyst IT - Expert Open Source Solutions https://catalyst.net.nz/services/samba