systemd times out when starting samba from user installation if Type=notify

Issues related to applications and software problems
Post Reply
charlweed
Posts: 14
Joined: 2016/01/22 16:54:25

systemd times out when starting samba from user installation if Type=notify

Post by charlweed » 2018/07/25 20:15:00

I built samba 4.8.3 from source, and configured it to run from my home directory for testing. It starts and runs fine from the command line, but it the systemd service times out and stops, even when it launches the binary correctly. I can work around this by changing the service type from 'notify' to 'simple', so I know systemd can find the pid, exec, and environment files.
As far as I can tell, either my build is not calling sd_notify, or systemd is failing to read it. The stock samba-4.7.1 service works as expected.
No errors show up in any logs, or journalctl. In particular, I see no SELinux denials.
Is this a CentOS systemd issue? I have a vague memory that user services were limited somehow, but I can't find anything detailed.

This is the service file for nmb and smb:

Code: Select all

[Unit]
Description=Samba SMB Daemon
Documentation=man:smbd(8) man:samba(7) man:smb.conf(5)
After=network.target nmb.service winbind.service

[Service]
WorkingDirectory=/home/SAMDOM/deft/opt/samba-4
Type=notify
NotifyAccess=all
PIDFile=/home/SAMDOM/deft/opt/samba-4/run/smbd.pid
LimitNOFILE=16384
EnvironmentFile=-/home/SAMDOM/deft/opt/samba-4/etc/samba/sysconfig/samba
ExecStart=/home/SAMDOM/deft/opt/samba-4/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS
ExecReload=/bin/kill -HUP $MAINPID
LimitCORE=infinity

Post Reply