Am 12.07.2016 um 23:21 schrieb Reindl Harald:> > > Am 12.07.2016 um 22:55 schrieb Achim Gottinger: >> Funny current debian service files use a wrong PIDFile path (should be >> /var/run/amba/samba.pid). >> >> If I use Type=forking and an wrong PIDFile systemctl start samba must be >> CTRL-C'ed. >> >> Type=notify works with or without an proper PIDFile. > > well, after 5 years of production with systemd all that pidfile stuff > is the root of all evil - get rid of it until you have a very godd > reason and most problems will go away > > systemd is damned good in monitor process states and pidfiles where a > dirty workaround for init-systems with no clue about anything > > that goes so far that i start mysqld without mysqld_safe, Type=simple > and "--pid-file=/dev/null" to get rid of all sort of troubles when > idiotic processes don't create and remove their pid files at the > current point in time >Thank you for the comment, so i removed the pidfile line from the service file. With type=forking it shows (8591 is the pid in /var/run/samba/samba.pid) systemctl status samba-ad-dc ● samba-ad-dc.service - Samba AD Daemon Loaded: loaded (/lib/systemd/system/samba-ad-dc.service; enabled) Active: active (running) since Tue 2016-07-12 23:46:19 CEST; 2s ago Docs: man:samba(8) man:samba(7) man:smb.conf(5) Process: 8590 ExecStart=/usr/sbin/samba $SAMBAOPTIONS (code=exited, status=0/SUCCESS) Main PID: 8591 (samba) Status: "winbindd: ready to serve connections..." CGroup: /system.slice/samba-ad-dc.service ├─8591 /usr/sbin/samba ├─8592 /usr/sbin/samba ├─8593 /usr/sbin/samba ├─8594 /usr/sbin/samba ├─8595 /usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─8596 /usr/sbin/samba ├─8597 /usr/sbin/samba ├─8598 /usr/sbin/samba ├─8599 /usr/sbin/samba ├─8600 /usr/sbin/samba ├─8601 /usr/sbin/samba ├─8602 /usr/sbin/samba ├─8603 /usr/sbin/winbindd -D --option=server role check:inhibit=yes --foreground ├─8604 /usr/sbin/samba ├─8605 /usr/sbin/samba ├─8608 /usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─8609 /usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─8611 /usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground └─8613 /usr/sbin/winbindd -D --option=server role check:inhibit=yes --foreground With Type=notify NotifyAccess=all systemctl status samba-ad-dc ● samba-ad-dc.service - Samba AD Daemon Loaded: loaded (/lib/systemd/system/samba-ad-dc.service; enabled) Active: active (running) since Tue 2016-07-12 23:48:50 CEST; 2s ago Docs: man:samba(8) man:samba(7) man:smb.conf(5) Main PID: 8749 (samba) Status: "winbindd: ready to serve connections..." CGroup: /system.slice/samba-ad-dc.service ├─8749 /usr/sbin/samba ├─8750 /usr/sbin/samba ├─8751 /usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─8752 /usr/sbin/samba ├─8753 /usr/sbin/samba ├─8754 /usr/sbin/samba ├─8755 /usr/sbin/samba ├─8756 /usr/sbin/samba ├─8757 /usr/sbin/samba ├─8758 /usr/sbin/samba ├─8759 /usr/sbin/samba ├─8760 /usr/sbin/samba ├─8761 /usr/sbin/winbindd -D --option=server role check:inhibit=yes --foreground ├─8762 /usr/sbin/samba ├─8763 /usr/sbin/samba ├─8766 /usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─8767 /usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─8769 /usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground └─8771 /usr/sbin/winbindd -D --option=server role check:inhibit=yes --foreground Here it does not mention the inital process pid. Both options work without killing the processes. If i remove NotifyAccess=all systemctl status samba-ad-dc ● samba-ad-dc.service - Samba AD Daemon Loaded: loaded (/lib/systemd/system/samba-ad-dc.service; enabled) Active: active (running) since Tue 2016-07-12 23:50:50 CEST; 16s ago Docs: man:samba(8) man:samba(7) man:smb.conf(5) Main PID: 8875 (samba) Status: "samba: ready to serve connections..." CGroup: /system.slice/samba-ad-dc.service ├─8875 /usr/sbin/samba ├─8876 /usr/sbin/samba ├─8877 /usr/sbin/samba ├─8878 /usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─8879 /usr/sbin/samba ├─8880 /usr/sbin/samba ├─8881 /usr/sbin/samba ├─8882 /usr/sbin/samba ├─8883 /usr/sbin/samba ├─8884 /usr/sbin/samba ├─8885 /usr/sbin/samba ├─8886 /usr/sbin/samba ├─8887 /usr/sbin/winbindd -D --option=server role check:inhibit=yes --foreground ├─8888 /usr/sbin/samba ├─8889 /usr/sbin/samba ├─8892 /usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─8893 /usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─8895 /usr/sbin/smbd -D --option=server role check:inhibit=yes --foreground └─8897 /usr/sbin/winbindd -D --option=server role check:inhibit=yes --foreground Jul 12 23:50:50 dc3 samba[8875]: [2016/07/12 23:50:50.042455, 0] ../lib/util/become_daemon.c:124(daemon_ready) Jul 12 23:50:50 dc3 samba[8875]: STATUS=daemon 'samba' finished starting up and ready to serve connections Jul 12 23:50:50 dc3 winbindd[8887]: [2016/07/12 23:50:50.173942, 0] ../source3/winbindd/winbindd_cache.c:3245(initialize_winbindd_cache) Jul 12 23:50:50 dc3 winbindd[8887]: initialize_winbindd_cache: clearing cache and re-creating with version number 2 Jul 12 23:50:50 dc3 smbd[8878]: [2016/07/12 23:50:50.470873, 0] ../lib/util/become_daemon.c:124(daemon_ready) Jul 12 23:50:50 dc3 systemd[1]: samba-ad-dc.service: Got notification message from PID 8878, but reception only permitted for main PID 8875 Jul 12 23:50:50 dc3 smbd[8878]: STATUS=daemon 'smbd' finished starting up and ready to serve connections Jul 12 23:50:50 dc3 winbindd[8887]: [2016/07/12 23:50:50.682114, 0] ../lib/util/become_daemon.c:124(daemon_ready) Jul 12 23:50:50 dc3 systemd[1]: samba-ad-dc.service: Got notification message from PID 8887, but reception only permitted for main PID 8875 Jul 12 23:50:50 dc3 winbindd[8887]: STATUS=daemon 'winbindd' finished starting up and ready to serve connections There are two warnings about messages for smbd and winbindd pids, otherwise it's working. Type=simple does not work ● samba-ad-dc.service - Samba AD Daemon Loaded: loaded (/lib/systemd/system/samba-ad-dc.service; enabled) Active: deactivating (stop-sigterm) since Tue 2016-07-12 23:53:49 CEST; 11s ago Docs: man:samba(8) man:samba(7) man:smb.conf(5) Process: 9047 ExecStart=/usr/sbin/samba $SAMBAOPTIONS (code=exited, status=0/SUCCESS) Main PID: 9047 (code=exited, status=0/SUCCESS) CGroup: /system.slice/samba-ad-dc.service └─9049 /usr/sbin/samba Jul 12 23:53:49 dc3 systemd[1]: Starting Samba AD Daemon... Jul 12 23:53:49 dc3 systemd[1]: Started Samba AD Daemon. Jul 12 23:53:49 dc3 samba[9047]: [2016/07/12 23:53:49.141341, 0] ../source4/smbd/server.c:373(binary_smbd_main) Jul 12 23:53:49 dc3 samba[9047]: samba version 4.4.5-Debian started. There is one samba process running and systemctl stop samba does not end that process. "kill 9049" does the job. The file /var/run/samba/samba.pid shows an previous used pid. So I'll use Type=notify NotifyAccess=all and no PIDFile.>> Am 12.07.2016 um 22:47 schrieb Sonic: >>> On Tue, Jul 12, 2016 at 4:29 PM, Achim Gottinger <achim at ag-web.biz> >>> wrote: >>>> Does your PIDFile exist? >>> Yes. Everything works properly as long as I use Type=forking > > >
On Tue, Jul 12, 2016 at 5:58 PM, Achim Gottinger <achim at ag-web.biz> wrote:> With type=forking it shows (8591 is the pid in /var/run/samba/samba.pid) > > systemctl status samba-ad-dc > ● samba-ad-dc.service - Samba AD DaemonI get this: ================================================================# systemctl status samba.service ● samba.service - Samba AD server Loaded: loaded (/etc/systemd/system/samba.service; enabled) Active: active (running) since Tue 2016-07-12 14:39:17 EDT; 4h 44min ago Process: 21350 ExecStart=/usr/local/samba/sbin/samba (code=exited, status=0/SUCCESS) Main PID: 21351 (samba) CGroup: /system.slice/lxc.service/system.slice/samba.service ├─21351 /usr/local/samba/sbin/samba ├─21352 /usr/local/samba/sbin/samba ├─21354 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─21355 /usr/local/samba/sbin/samba ├─21356 /usr/local/samba/sbin/samba ├─21357 /usr/local/samba/sbin/samba ├─21358 /usr/local/samba/sbin/samba ├─21359 /usr/local/samba/sbin/samba ├─21360 /usr/local/samba/sbin/samba ├─21361 /usr/local/samba/sbin/samba ├─21362 /usr/local/samba/sbin/samba ├─21363 /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground ├─21364 /usr/local/samba/sbin/samba ├─21365 /usr/local/samba/sbin/samba ├─21368 /usr/local/samba/sbin/winbindd -D --option=server role check:inhibit=yes --foreground ├─21369 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground ├─21370 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground └─21372 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground Jul 12 19:14:17 kwad winbindd[21368]: [2016/07/12 19:14:17.981972, 0] ../source3/winbindd/winbindd_cm.c:1849(wb_open_internal_pipe) Jul 12 19:14:17 kwad winbindd[21368]: open_internal_pipe: Could not connect to lsarpc pipe: NT_STATUS_UNSUCCESSFUL Jul 12 19:14:17 kwad winbindd[21368]: [2016/07/12 19:14:17.982073, 0] ../source3/winbindd/winbindd_cm.c:1849(wb_open_internal_pipe) Jul 12 19:14:17 kwad winbindd[21368]: open_internal_pipe: Could not connect to lsarpc pipe: NT_STATUS_UNSUCCESSFUL Jul 12 19:19:17 kwad winbindd[21368]: [2016/07/12 19:19:17.985495, 0] ../source3/winbindd/winbindd_cm.c:1849(wb_open_internal_pipe) Jul 12 19:19:17 kwad winbindd[21368]: open_internal_pipe: Could not connect to dssetup pipe: NT_STATUS_UNSUCCESSFUL Jul 12 19:19:17 kwad winbindd[21368]: [2016/07/12 19:19:17.985653, 0] ../source3/winbindd/winbindd_cm.c:1849(wb_open_internal_pipe) Jul 12 19:19:17 kwad winbindd[21368]: open_internal_pipe: Could not connect to lsarpc pipe: NT_STATUS_UNSUCCESSFUL Jul 12 19:19:17 kwad winbindd[21368]: [2016/07/12 19:19:17.985747, 0] ../source3/winbindd/winbindd_cm.c:1849(wb_open_internal_pipe) Jul 12 19:19:17 kwad winbindd[21368]: open_internal_pipe: Could not connect to lsarpc pipe: NT_STATUS_UNSUCCESSFUL ================================================================ Trying to figure out the anomaly with winbindd starting, although it is running. Chris
Am 13.07.2016 um 01:34 schrieb Sonic:> On Tue, Jul 12, 2016 at 5:58 PM, Achim Gottinger <achim at ag-web.biz> wrote: >> With type=forking it shows (8591 is the pid in /var/run/samba/samba.pid) >> >> systemctl status samba-ad-dc >> ● samba-ad-dc.service - Samba AD Daemon > I get this: > ================================================================> # systemctl status samba.service > ● samba.service - Samba AD server > Loaded: loaded (/etc/systemd/system/samba.service; enabled) > Active: active (running) since Tue 2016-07-12 14:39:17 EDT; 4h 44min ago > Process: 21350 ExecStart=/usr/local/samba/sbin/samba (code=exited, > status=0/SUCCESS) > Main PID: 21351 (samba) > CGroup: /system.slice/lxc.service/system.slice/samba.service > ├─21351 /usr/local/samba/sbin/samba > ├─21352 /usr/local/samba/sbin/samba > ├─21354 /usr/local/samba/sbin/smbd -D --option=server role > check:inhibit=yes --foreground > ├─21355 /usr/local/samba/sbin/samba > ├─21356 /usr/local/samba/sbin/samba > ├─21357 /usr/local/samba/sbin/samba > ├─21358 /usr/local/samba/sbin/samba > ├─21359 /usr/local/samba/sbin/samba > ├─21360 /usr/local/samba/sbin/samba > ├─21361 /usr/local/samba/sbin/samba > ├─21362 /usr/local/samba/sbin/samba > ├─21363 /usr/local/samba/sbin/winbindd -D --option=server > role check:inhibit=yes --foreground > ├─21364 /usr/local/samba/sbin/samba > ├─21365 /usr/local/samba/sbin/samba > ├─21368 /usr/local/samba/sbin/winbindd -D --option=server > role check:inhibit=yes --foreground > ├─21369 /usr/local/samba/sbin/smbd -D --option=server role > check:inhibit=yes --foreground > ├─21370 /usr/local/samba/sbin/smbd -D --option=server role > check:inhibit=yes --foreground > └─21372 /usr/local/samba/sbin/smbd -D --option=server role > check:inhibit=yes --foreground > > Jul 12 19:14:17 kwad winbindd[21368]: [2016/07/12 19:14:17.981972, 0] > ../source3/winbindd/winbindd_cm.c:1849(wb_open_internal_pipe) > Jul 12 19:14:17 kwad winbindd[21368]: open_internal_pipe: Could not > connect to lsarpc pipe: NT_STATUS_UNSUCCESSFUL > Jul 12 19:14:17 kwad winbindd[21368]: [2016/07/12 19:14:17.982073, 0] > ../source3/winbindd/winbindd_cm.c:1849(wb_open_internal_pipe) > Jul 12 19:14:17 kwad winbindd[21368]: open_internal_pipe: Could not > connect to lsarpc pipe: NT_STATUS_UNSUCCESSFUL > Jul 12 19:19:17 kwad winbindd[21368]: [2016/07/12 19:19:17.985495, 0] > ../source3/winbindd/winbindd_cm.c:1849(wb_open_internal_pipe) > Jul 12 19:19:17 kwad winbindd[21368]: open_internal_pipe: Could not > connect to dssetup pipe: NT_STATUS_UNSUCCESSFUL > Jul 12 19:19:17 kwad winbindd[21368]: [2016/07/12 19:19:17.985653, 0] > ../source3/winbindd/winbindd_cm.c:1849(wb_open_internal_pipe) > Jul 12 19:19:17 kwad winbindd[21368]: open_internal_pipe: Could not > connect to lsarpc pipe: NT_STATUS_UNSUCCESSFUL > Jul 12 19:19:17 kwad winbindd[21368]: [2016/07/12 19:19:17.985747, 0] > ../source3/winbindd/winbindd_cm.c:1849(wb_open_internal_pipe) > Jul 12 19:19:17 kwad winbindd[21368]: open_internal_pipe: Could not > connect to lsarpc pipe: NT_STATUS_UNSUCCESSFUL > ================================================================> > Trying to figure out the anomaly with winbindd starting, although it is running. > > ChrisIt doesn not show Status: "winbindd: ready to serve connections..." below the Mai PID line. I guess samba still tries to start winbindd and if you start it in type=notify mode it did not send the sd_notify started message. That is why it does not return after systemctl start samba, it has not finished the starting process. Once you fixed the winbind problem I assume it will work with type=notify.
Am 12.07.2016 um 23:58 schrieb Achim Gottinger:> With > > Type=notify > NotifyAccess=all > > systemctl status samba-ad-dc > ● samba-ad-dc.service - Samba AD Daemon > Loaded: loaded (/lib/systemd/system/samba-ad-dc.service; enabled) > Active: active (running) since Tue 2016-07-12 23:48:50 CEST; 2s ago > Docs: man:samba(8) > man:samba(7) > man:smb.conf(5) > Main PID: 8749 (samba) > Status: "winbindd: ready to serve connections..." > CGroup: /system.slice/samba-ad-dc.service > ├─8749 /usr/sbin/samba > ├─8750 /usr/sbin/samba > ├─8751 /usr/sbin/smbd -D --option=server role > check:inhibit=yes --foreground > ├─8752 /usr/sbin/samba > ├─8753 /usr/sbin/samba > ├─8754 /usr/sbin/samba > ├─8755 /usr/sbin/samba > ├─8756 /usr/sbin/samba > ├─8757 /usr/sbin/samba > ├─8758 /usr/sbin/samba > ├─8759 /usr/sbin/samba > ├─8760 /usr/sbin/samba > ├─8761 /usr/sbin/winbindd -D --option=server role > check:inhibit=yes --foreground > ├─8762 /usr/sbin/samba > ├─8763 /usr/sbin/samba > ├─8766 /usr/sbin/smbd -D --option=server role > check:inhibit=yes --foreground > ├─8767 /usr/sbin/smbd -D --option=server role > check:inhibit=yes --foreground > ├─8769 /usr/sbin/smbd -D --option=server role > check:inhibit=yes --foreground > └─8771 /usr/sbin/winbindd -D --option=server role > check:inhibit=yes --foreground > > Here it does not mention the inital process pidMain PID: 8749 (samba) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20160713/a1a78830/signature.sig>
Am 13.07.2016 um 12:09 schrieb Reindl Harald:> > > Am 12.07.2016 um 23:58 schrieb Achim Gottinger: >> With >> >> Type=notify >> NotifyAccess=all >> >> systemctl status samba-ad-dc >> ● samba-ad-dc.service - Samba AD Daemon >> Loaded: loaded (/lib/systemd/system/samba-ad-dc.service; enabled) >> Active: active (running) since Tue 2016-07-12 23:48:50 CEST; 2s ago >> Docs: man:samba(8) >> man:samba(7) >> man:smb.conf(5) >> Main PID: 8749 (samba) >> Status: "winbindd: ready to serve connections..." >> CGroup: /system.slice/samba-ad-dc.service >> ├─8749 /usr/sbin/samba >> ├─8750 /usr/sbin/samba >> ├─8751 /usr/sbin/smbd -D --option=server role >> check:inhibit=yes --foreground >> ├─8752 /usr/sbin/samba >> ├─8753 /usr/sbin/samba >> ├─8754 /usr/sbin/samba >> ├─8755 /usr/sbin/samba >> ├─8756 /usr/sbin/samba >> ├─8757 /usr/sbin/samba >> ├─8758 /usr/sbin/samba >> ├─8759 /usr/sbin/samba >> ├─8760 /usr/sbin/samba >> ├─8761 /usr/sbin/winbindd -D --option=server role >> check:inhibit=yes --foreground >> ├─8762 /usr/sbin/samba >> ├─8763 /usr/sbin/samba >> ├─8766 /usr/sbin/smbd -D --option=server role >> check:inhibit=yes --foreground >> ├─8767 /usr/sbin/smbd -D --option=server role >> check:inhibit=yes --foreground >> ├─8769 /usr/sbin/smbd -D --option=server role >> check:inhibit=yes --foreground >> └─8771 /usr/sbin/winbindd -D --option=server role >> check:inhibit=yes --foreground >> >> Here it does not mention the inital process pid > > Main PID: 8749 (samba) > > >Was talking about "Process 8590" whom invokes 8591 and exitst afterwards. This one is only listed on forked mode status. systemctl status samba-ad-dc ● samba-ad-dc.service - Samba AD Daemon Loaded: loaded (/lib/systemd/system/samba-ad-dc.service; enabled) Active: active (running) since Tue 2016-07-12 23:46:19 CEST; 2s ago Docs: man:samba(8) man:samba(7) man:smb.conf(5) Process: 8590 ExecStart=/usr/sbin/samba $SAMBAOPTIONS (code=exited, status=0/SUCCESS) Main PID: 8591 (samba)