Bug 46437 - smbd not running after reboot (univention-samba-slave-pdc)
smbd not running after reboot (univention-samba-slave-pdc)
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: Samba
UCS 4.3
Other Linux
: P5 normal (vote)
: ---
Assigned To: Samba maintainers
Samba maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-02-27 15:05 CET by Felix Botner
Modified: 2021-05-14 16:34 CEST (History)
0 users

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.086
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Botner univentionstaff 2018-02-27 15:05:36 CET
4.3 Master + slave with univention-samba-slave-pdc. After a reboot on the slave smbd is not running.

on my slave
-> date
Di 27. Feb 09:00:03 EST 2018
-> reboot
...
-> date
Di 27. Feb 09:03:41 EST 2018

-> grep -i smbd /var/log/syslog
Feb 27 09:01:22 slave098 systemd[1]: Starting LSB: Samba SMB/CIFS daemon (smbd)...
Feb 27 09:01:24 slave098 smbd[637]: Starting SMB/CIFS daemon: smbd.
Feb 27 09:01:24 slave098 systemd[1]: Started LSB: Samba SMB/CIFS daemon (smbd).

so systemd seems to have started smbd, but

-> ps aux| grep smbd
root      2173  0.0  0.0  14320   932 pts/0    R+   09:05   0:00 grep smbd


What is going on?
Comment 1 Felix Botner univentionstaff 2018-02-27 15:06:47 CET
This is the reason for

[2018-02-26 21:08:28.924614] running [samba]    - FAILED   - testjoin.sh

on the samba slave pdc test.
Comment 2 Felix Botner univentionstaff 2018-02-27 15:35:56 CET
Problem

On the slave smbd is started 25s before slapd. If smbd is started without a running slapd the daemon tries to connect to the ldap server for 15s and finally  exists.

[2018/02/27 09:15:47.707391,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/27 09:15:48.708425,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/27 09:15:49.709533,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/27 09:15:50.713020,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/27 09:15:51.719869,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/27 09:15:52.728735,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/27 09:15:53.732830,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/27 09:15:54.733500,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/27 09:15:55.734796,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/27 09:15:56.736130,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/27 09:15:57.737475,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/27 09:15:58.738819,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/27 09:15:59.740173,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/27 09:16:00.741486,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/27 09:16:01.742826,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/27 09:16:02.749392,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/27 09:16:03.750691,  0] ../source3/passdb/pdb_ldap.c:6644(pdb_ldapsam_init_common)
  pdb_init_ldapsam: WARNING: Could not get domain info, nor add one to the domain. We cannot work reliably without it.
[2018/02/27 09:16:03.750736,  0] ../source3/passdb/pdb_interface.c:180(make_pdb_method_name)
  pdb backend ldapsam:"ldap://slave098.autotest098.local:7389" did not correctly init (error was NT_STATUS_CANT_ACCESS_DOMAIN_INFO)


-> grep -i smbd /var/log/syslog
Feb 27 09:15:47 slave098 smbd[648]: Starting SMB/CIFS daemon: smbd.
Feb 27 09:15:47 slave098 system


-> grep -i slapd /var/log/syslog
Feb 27 09:16:13 slave098 root: /etc/init.d/slapd start (pid: 962, ppid:    1 systemd)
Feb 27 09:16:13 slave098 slapd[1265]: @(#) $OpenLDAP: slapd  (Jan  9 2018 12:16:07) $#012#011Debian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>
Feb 27 09:16:14 slave098 slapd[962]: Starting ldap server(s): slapd ...doned[1]: Started LSB: Samba SMB/CIFS daemon (smbd).


Normally i would say we have to add "# Required-Start:	 $slapd" to the /etc/init.d/smbd, but this would break the member setup.
Comment 3 Arvid Requate univentionstaff 2018-02-27 15:46:20 CET
I've added the same lsb header fields as they are in the /etc/init.s/smbd script shipped by samba.

Package: univention-samba
Version: 12.0.1-1A~4.3.0.201802271540
Branch: ucs_4.3-0

Changelog added.
Comment 4 Stefan Gohmann univentionstaff 2018-03-01 06:59:17 CET
It doesn't work:

root@slave098:~# grep slapd /etc/init.d/smbd 
# Should-Start:      slapd cups
# Should-Stop:       slapd cups
root@slave098:~# 

root@slave098:~# dpkg -l | grep univention-samba
ii  univention-samba                                    12.0.1-1A~4.3.0.201802271540                     all          UCS - Samba domain controller
ii  univention-samba-local-config                       12.0.1-1A~4.3.0.201802271540                     all          UCS - UCR Extensions for configuration of local shares
ii  univention-samba-slave-pdc                          12.0.1-1A~4.3.0.201802271540                     all          UCS - Samba domain controller (as slave)
root@slave098:~# 

stefan@frakta:~$ grep smbd /tmp/journalctl  | head -n 10
Feb 28 21:17:02 slave098 systemd[1]: Starting LSB: Samba SMB/CIFS daemon (smbd)...
Feb 28 21:17:06 slave098 smbd[651]: Starting SMB/CIFS daemon: smbd.
Feb 28 21:17:06 slave098 systemd[1]: Started LSB: Samba SMB/CIFS daemon (smbd).
Feb 28 21:21:35 slave098 systemd[1]: Stopping LSB: Samba SMB/CIFS daemon (smbd)...
Feb 28 21:21:35 slave098 smbd[3322]: Stopping SMB/CIFS daemon: smbdstart-stop-daemon: warning: failed to kill 660: No such process
Feb 28 21:21:36 slave098 smbd[3322]: .
Feb 28 21:21:36 slave098 systemd[1]: Stopped LSB: Samba SMB/CIFS daemon (smbd).
Feb 28 21:21:39 slave098 systemd[1]: Starting LSB: Samba SMB/CIFS daemon (smbd)...
Feb 28 21:21:39 slave098 smbd[3376]: Starting SMB/CIFS daemon: smbd.
Feb 28 21:21:39 slave098 systemd[1]: Started LSB: Samba SMB/CIFS daemon (smbd).


stefan@frakta:~$ grep slapd /tmp/journalctl  | head -n 10
Feb 28 21:17:30 slave098 root[1147]: /etc/init.d/slapd start (pid: 958, ppid:    1 systemd)
Feb 28 21:17:30 slave098 slapd[1210]: @(#) $OpenLDAP: slapd  (Jan  9 2018 12:16:07) $
Feb 28 21:17:30 slave098 slapd[1210]: Loaded metadata from "/usr/share/univention-management-console/saml/idp/ucs-sso.autotest098.local.xml"
Feb 28 21:17:31 slave098 slapd[958]: Starting ldap server(s): slapd ...done.
Feb 28 21:24:15 slave098 root[6613]: /etc/init.d/slapd stop (pid: 6604, ppid:    1 systemd)
Feb 28 21:24:15 slave098 slapd[1284]: DIGEST-MD5 common mech free
Feb 28 21:24:15 slave098 slapd[1284]: DIGEST-MD5 common mech free
Feb 28 21:24:15 slave098 slapd[6604]: Stopping ldap server(s): slapd ...done.
Feb 28 21:24:15 slave098 root[6631]: /etc/init.d/slapd start (pid: 6618, ppid:    1 systemd)
Feb 28 21:24:15 slave098 slapd[6632]: @(#) $OpenLDAP: slapd  (Jan  9 2018 12:16:07) $
stefan@frakta:~$ 

root@slave098:~# grep -A1 '2018/02/28 21' /var/log/samba/log.smbd
[2018/02/28 21:17:06.332373,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/28 21:17:07.338985,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/28 21:17:08.352117,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/28 21:17:09.353117,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/28 21:17:10.354785,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/28 21:17:11.356055,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/28 21:17:12.362787,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/28 21:17:13.364073,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/28 21:17:14.365136,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/28 21:17:15.366453,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/28 21:17:16.368894,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/28 21:17:17.369646,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/28 21:17:18.374161,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/28 21:17:19.383386,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/28 21:17:20.384717,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/28 21:17:21.392582,  0] ../source3/lib/smbldap.c:622(smbldap_start_tls)
  Failed to issue the StartTLS instruction: Can't contact LDAP server
[2018/02/28 21:17:22.401247,  0] ../source3/passdb/pdb_ldap.c:6644(pdb_ldapsam_init_common)
  pdb_init_ldapsam: WARNING: Could not get domain info, nor add one to the domain. We cannot work reliably without it.
[2018/02/28 21:17:22.401299,  0] ../source3/passdb/pdb_interface.c:180(make_pdb_method_name)
  pdb backend ldapsam:"ldap://slave098.autotest098.local:7389" did not correctly init (error was NT_STATUS_CANT_ACCESS_DOMAIN_INFO)
[2018/02/28 21:21:43.368778,  0] ../lib/util/become_daemon.c:124(daemon_ready)
  STATUS=daemon 'smbd' finished starting up and ready to serve connections
[2018/02/28 21:22:30.720052,  0] ../lib/util/become_daemon.c:124(daemon_ready)
  STATUS=daemon 'smbd' finished starting up and ready to serve connections
root@slave098:~# 

So, the slapd is still started after smbd decided to exit.
Comment 5 Stefan Gohmann univentionstaff 2018-03-03 09:46:09 CET
I don't think this is a release blocker since it is only relevant for Slave PDC setup. I'll move it to 4.3-0-errata. If you think it is a release blocker, feel free to change the target milestone.
Comment 6 Arvid Requate univentionstaff 2018-03-06 20:33:10 CET
Can't reproduce on KVM slave updated to UCS 4.3-0 RC1. After reboot:
===========================================================================
root@slave22:~# ps ax | grep smbd
 1426 ?        Ss     0:00 /usr/sbin/smbd -D
 1471 ?        S      0:00 /usr/sbin/smbd -D
 1472 ?        S      0:00 /usr/sbin/smbd -D
 1486 ?        S      0:00 /usr/sbin/smbd -D
 4007 pts/0    S+     0:00 grep smbd

root@slave22:~# journalctl -b | egrep '(slapd|smbd)'
Mär 06 20:23:40 slave22 root[1030]: /etc/init.d/slapd start (pid: 870, ppid:    1 systemd)
Mär 06 20:23:40 slave22 slapd[1303]: @(#) $OpenLDAP: slapd  (Jan  9 2018 12:16:07) $
Mär 06 20:23:40 slave22 slapd[1303]: Loaded metadata from "/usr/share/univention-management-console/saml/idp/ucs-sso.ar422i1.qa.xml"
Mär 06 20:23:40 slave22 slapd[870]: Starting ldap server(s): slapd ...done.
Mär 06 20:23:40 slave22 systemd[1]: Starting LSB: Samba SMB/CIFS daemon (smbd)...
Mär 06 20:23:41 slave22 smbd[1316]: Starting SMB/CIFS daemon: smbd.
Mär 06 20:23:41 slave22 systemd[1]: Started LSB: Samba SMB/CIFS daemon (smbd).

root@slave22:~# net rpc testjoin
Join to 'AR422I1' is OK

root@slave22:~# smbclient -L localhost -N
WARNING: The "auth methods" option is deprecated

        Sharename       Type      Comment
        ---------       ----      -------
        print$          Disk      Printer Drivers
        netlogon        Disk      Domain logon service
        IPC$            IPC       IPC Service (slave22 univention corporate server)
Reconnecting with SMB1 for workgroup listing.

        Server               Comment
        ---------            -------

        Workgroup            Master
        ---------            -------
        AR422I1 

root@slave22:~# dpkg -l univention-samba*
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
         Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name                                  Version                 Architektur             Beschreibung
+++-=====================================-=======================-=======================-================================================================================
ii  univention-samba                      12.0.1-1A~4.3.0.2018022 all                     UCS - Samba domain controller
ii  univention-samba-local-config         12.0.1-1A~4.3.0.2018022 all                     UCS - UCR Extensions for configuration of local shares
ii  univention-samba-slave-pdc            12.0.1-1A~4.3.0.2018022 all                     UCS - Samba domain controller (as slave)
un  univention-samba4                     <keine>                 <keine>                 (keine Beschreibung vorhanden)
===========================================================================

Also not on fresh installed UCS 4.3-0 slave(+master)
Comment 7 Stefan Gohmann univentionstaff 2018-03-10 09:48:54 CET
The samba process is now restarted in our test cases. Please undo after fixing this issue:

[4.3-0 14676cd2fb] Restart samba after rebooting. Workaround for Bug #46437
Comment 8 Ingo Steuwer univentionstaff 2021-05-14 15:41:12 CEST
This issue has been filed against UCS 4.3.

UCS 4.3 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.