[Samba] Samba AD DC tries to start and fails on reboot

L.P.H. van Belle belle at bazuin.nl
Fri Sep 18 22:08:37 UTC 2020


an, sorry missed that one. 
if and error occured, systemd marks it as bad , masks it.
systemctl unmask service
systemctl enable service 
systemctl start service


if first you can try if it happens again. 

or disable ipv6. 
i use this to setup my servers with systemd 
wget https://raw.githubusercontent.com/thctlo/debian-scripts/master/setup-systemd-networkd.sh
bash setup-systemd-networkd.sh

Instructions after you runned it, its does not change anything. 
but it gives you and idea. 


Greetz, 

Louis


Van: Jonathan Kreider [mailto:jonathan.kreider at gmail.com] 
Verzonden: vrijdag 18 september 2020 18:24
Aan: L.P.H. van Belle
Onderwerp: Re: [Samba] Samba AD DC tries to start and fails on reboot



Hi Louis,


It _is_ now working. I can stop and restart the container and samba comes up.


However, I've not changed anything to my knowledge. The only thing that I've done is disabled and enabled the samba-ad-dc.service once or twice in fiddling around with this. 



Perhaps that was enough to get systemd to realize that it really did need to wait until the network was up before trying to start samba. As I said before, once the system is up, I can start samba with no problems.



As to dhcp, I suspect that I'm using dhcp on ipv6 b/c I've certainly not set up any static settings. IPV6 is there, but I've not figured out how to bend it to my will (or even what my will is) yet.



Thanks,
Jonathan Kreider








On Thu, Sep 17, 2020 at 9:33 AM L.P.H. van Belle via samba <samba at lists.samba.org> wrote:

Hai Jonathan,  

Only one question left then does it work now? ;-) 

if you added the ipv6 to hosts file? 

run 
hostname -I 
these ipnumers , add these in hosts and samba should always start.. 

Unless, your using dhcp.. that might be bit different.. 

greetz, 
 
Louis
 
 

Van: Jonathan Kreider [mailto:jonathan.kreider at gmail.com] 
Verzonden: donderdag 17 september 2020 15:09
Aan: L.P.H. van Belle
CC: samba at lists.samba.org
Onderwerp: Re: [Samba] Samba AD DC tries to start and fails on reboot



Hi Louis,


Thanks for pointing that out. My IPV6 fu is nearly non-existent. So I guess I'd be wise to turn off IPV6 until I understand it.


Does it make sense that samba-ad-dc won't start on boot but will start after boot when I manually start it using:


# systemctl start samba-ad-dc



BTW, I'm using your packages, and I've confirmed that:
---

After=network.target network-online.target 

---
exists in your supplied unit files. 



Since I'm using the samba internal DNS and not running bind9, I don't think that bind9 is relevant in the unit file. 



The reasons for using the internal DNS is that I have a simple, small network (<10 pcs) and didn't want to learn all about bind9 configuration. In the past, it "just worked". I was hoping it would continue to do so.



Thanks,
Jonathan Kreider








On Wed, Sep 16, 2020 at 3:20 AM L.P.H. van Belle via samba <samba at lists.samba.org> wrote:

Hai Jonathan,

This is/looks like a resolving issue

fd61:5ced:6c27:0:216:3eff:fe9b:802a << is this, 'this' server or a remote ? 

You have mutiple options, but try the most simple one. 
Take above add it in /etc/hosts ( if mulple dc's might be needed todo that on all DC's.) 
And if that fixes it, add it as AAAA record to the DNS, ( AND, dont forget the PTR record on the AAAA) 

Also, i've set samba-ad-dc.service to load like this.

systemctl edit samba-ad-dc 

# /etc/systemd/system/samba-ad-dc.service.d/override.conf
[Unit]
After=network.target network-online.target bind9.service



Greetz, 

Louis


> -----Oorspronkelijk bericht-----
> Van: samba [mailto:samba-bounces at lists.samba.org] Namens 
> Jonathan Kreider via samba
> Verzonden: woensdag 16 september 2020 2:04
> Aan: samba at lists.samba.org
> Onderwerp: [Samba] Samba AD DC tries to start and fails on reboot
> 
> OS = Ubuntu 18.04 LXD container
> Samba version = 4.11.12
> Repo = Louis' (many thanks)
> 
> I recently upgraded from 4.10.14->4.10.17->4.11.12
> 
> Now the samba-ad-dc service fails with the following upon reboot:
> ---
> root at samba:~# systemctl status samba-ad-dc
> ??? samba-ad-dc.service - Samba AD Daemon
>    Loaded: loaded (/lib/systemd/system/samba-ad-dc.service; 
> enabled; vendor
> preset: enabled)
>    Active: failed (Result: exit-code) since Tue 2020-09-15 
> 19:16:16 EDT;
> 57s ago
>      Docs: man:samba(8)
>            man:samba(7)
>            man:smb.conf(5)
>   Process: 213 ExecStart=/usr/sbin/samba --foreground 
> --no-process-group
> $SAMBAOPTIONS (code=exited, status=1/FAILURE)
>  Main PID: 213 (code=exited, status=1/FAILURE)
> 
> Sep 15 19:16:06 samba samba[341]:   task_server_terminate:
> task_server_terminate: [kdc failed to setup interfaces]
> Sep 15 19:16:06 samba samba[338]: [2020/09/15 19:16:06.375707,  0]
> ../../source4/cldap_server/cldap_server.c:130(cldapd_add_socket)
> Sep 15 19:16:06 samba samba[338]:   Failed to bind to
> ipv6:fd61:5ced:6c27:0:216:3eff:fe9b:802a:389 -
> NT_STATUS_ADDRESS_NOT_ASSOCIATED
> Sep 15 19:16:06 samba samba[338]: [2020/09/15 19:16:06.375968,  0]
> ../../source4/smbd/service_task.c:36(task_server_terminate)
> Sep 15 19:16:06 samba samba[338]:   task_server_terminate:
> task_server_terminate: [cldapd failed to setup interfaces]
> Sep 15 19:16:06 samba samba[213]: [2020/09/15 19:16:06.399691,  0]
> ../../source4/smbd/server.c:371(samba_terminate)
> Sep 15 19:16:06 samba samba[213]:   samba_terminate: 
> samba_terminate of
> samba 213: kdc failed to setup interfaces
> Sep 15 19:16:06 samba systemd[1]: samba-ad-dc.service: Main 
> process exited,
> code=exited, status=1/FAILURE
> Sep 15 19:16:16 samba systemd[1]: samba-ad-dc.service: Failed 
> with result
> 'exit-code'.
> Sep 15 19:16:16 samba systemd[1]: Failed to start Samba AD Daemon.
> ---
> 
> If I manually start it:
> $ systemctl start samba-ad-dc
> then it loads ok.
> 
> Is the systemd unit file missing a dependency? I compared the version
> between an AD running 4.10.14 and 4.11.12(this current 
> problem machine) and
> the one difference between the two is that 
> resolveconf.service is listed as
> a dependency in 4.11.12 and not in the older version.
> 
> $ systemctl list-dependencies samba-ad-dc
> ??? ??????system.slice
> ??? ??????network-online.target
> ??? ??? ??????systemd-networkd-wait-online.service
> ??? ??????sysinit.target
> ???   ??????apparmor.service
> ???   ??????blk-availability.service
> ???   ??????dev-hugepages.mount
> ???   ??????dev-mqueue.mount
> ???   ??????keyboard-setup.service
> ???   ??????kmod-static-nodes.service
> ???   ??????lvm2-lvmetad.socket
> ???   ??????lvm2-lvmpolld.socket
> ???   ??????lvm2-monitor.service
> ???   ??????open-iscsi.service
> ???   ??????plymouth-read-write.service
> ???   ??????plymouth-start.service
> ???   ??????proc-sys-fs-binfmt_misc.automount
> ???   ??????resolvconf.service   ## this is the only change
> ???   ??????setvtrgb.service
> ???   ??????sys-fs-fuse-connections.mount
> ???   ??????sys-kernel-config.mount
> ???   ??????sys-kernel-debug.mount
> ???   ??????systemd-ask-password-console.path
> ???   ??????systemd-binfmt.service
> ???   ??????systemd-hwdb-update.service
> ???   ??????systemd-journal-flush.service
> ???   ??????systemd-journald.service
> ???   ??????systemd-machine-id-commit.service
> ???   ??????systemd-modules-load.service
> ???   ??????systemd-random-seed.service
> ???   ??????systemd-sysctl.service
> ???   ??????systemd-timesyncd.service
> ???   ??????systemd-tmpfiles-setup-dev.service
> ???   ??????systemd-tmpfiles-setup.service
> ???   ??????systemd-udev-trigger.service
> ???   ??????systemd-udevd.service
> ???   ??????systemd-update-utmp.service
> ???   ??????cryptsetup.target
> ???   ??????local-fs.target
> ???   ??? ??????systemd-remount-fs.service
> ???   ??????swap.target
> 
> However, I'm using netplan not resolveconf (I think...)
> # systemctl status resolveconf
> Unit resolveconf.service could not be found.
> 
> I ran Louis' script and can post it if it will help.
> 
> Thanks,
> Jonathan Kreider
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
> 
> 


-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba



More information about the samba mailing list