On Wed, July 22, 2020 14:48, Rowland penny wrote:> 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
>
>
[root at smb4-2 ~ (master)]# grep 'localhost\|smb4-2' /etc/hosts
#::1 localhost localhost.brockley.harte-lyne.ca
#::162:1 localhost localhost.brockley.harte-lyne.ca
127.0.162.1 localhost localhost.brockley.harte-lyne.cao
192.168.18.162 smb4-2.brockley.harte-lyne.ca smb4-2
[root at smb4-2 ~ (master)]# grep ip /etc/rc.conf
ipv6_activate_all_interfaces="NO"
#ipv6_activate_all_interfaces="YES"
[root at smb4-2 ~ (master)]# grep interface /usr/local/etc/smb4.conf
# bind interfaces only = Yes
# interfaces = localhost smb4-1
[root at smb4-2 ~ (master)]# grep net /usr/local/etc/smb4.conf
netbios name = SMB4-2
# disable netbios = yes
[root at smb4-2 ~ (master)]# service samba_server onestatus
samba is not running.
[root at smb4-2 ~ (master)]# service samba_server onestart
Performing sanity check on Samba configuration: OK
Starting samba.
[root at smb4-2 ~ (master)]# service samba_server onestatus
samba is not running.
[root at smb4-2 ~ (master)]# cat /var/log/samba4/*log
[2020/07/23 09:07:46.283583, 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/23 09:07:46.577544, 0]
../../source4/smbd/server.c:773(binary_smbd_main)
binary_smbd_main: samba: using 'standard' process model
[2020/07/23 09:07:46.589539, 0]
../../source4/rpc_server/dcerpc_server.c:3221(add_socket_rpc_tcp_iface)
[2020/07/23 09:07:46.595561, 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/23 09:07:46.595833, 0]
../../source4/smbd/service_task.c:36(task_server_terminate)
task_server_terminate: task_server_terminate: [nbtd failed to setup
interfaces]
[2020/07/23 09:07:46.615270, 0]
../../source4/cldap_server/cldap_server.c:130(cldapd_add_socket)
[2020/07/23 09:07:46.615301, 0]
../../source4/kdc/kdc-server.c:585(kdc_add_socket)
Failed to bind to :::88 TCP - NT_STATUS_UNSUCCESSFUL
[2020/07/23 09:07:46.615643, 0]
../../source4/kdc/kdc-server.c:585(kdc_add_socket)
Failed to bind to :::464 TCP - NT_STATUS_UNSUCCESSFUL
Failed to bind to ipv6::::389 - NT_STATUS_UNSUCCESSFUL
[2020/07/23 09:07:46.640486, 0]
../../lib/util/become_daemon.c:136(daemon_ready)
daemon_ready: daemon 'samba' finished starting up and ready to serve
connections
[2020/07/23 09:07:46.649809, 0]
../../source4/smbd/server.c:371(samba_terminate)
samba_terminate: samba_terminate of samba 12832: nbtd failed to setup
interfaces
[2020/07/23 09:07:46.666460, 0]
../../source4/dns_server/dns_server.c:649(dns_add_socket)
Failed to bind to :::53 TCP - NT_STATUS_UNSUCCESSFUL
[2020/07/23 09:07:48.280774, 0]
../../source4/ldap_server/ldap_server.c:1074(add_socket)
ldapsrv failed to bind to :::389 - NT_STATUS_UNSUCCESSFUL
The problem is that without the 'bind interfaces = "YES"'
statement in smb.conf
samba_server will not start due to no ipv6 support. And nbtd fails to bind to
the ipv4 address as well so removing that statement does not solve the original
problem either.
Is there another way of configuring samba_server not to use ipv6?
Even if there is another way to disable ipv6 binding, the nbtd service still
fails to bind to ipv4:137. And 'samba-tool domain backup offline' still
enters
an infinite wait state at the same location.
--- 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)
--
*** 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
--
*** 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