Arnab Roy
2017-Nov-23 21:46 UTC
[Samba] Compiling Samba 4.7 with systemd support on Fedora 26
The systemd unit file looks like as follows: [Unit] Description=Winbindd Service After=syslog.target network.target [Service] Environment=KRB5CCNAME=FILE:/run/samba/krb5cc_samba Type=notify NotifyAccess=all PIDFile=/var/run/samba/ ExecStart=/usr/local/samba/sbin/winbindd -D ExecReload=/usr/bin/kill -HUP $MAINPID LimitCORE=infinity [Install] @Rowland I am not blaming samba at all, certainly is some sort of systemd+samba issue. I will try increasing the log verbosity and see if I see anything else. Installing samba from rpm works fine, so it would seem fedora package maintainers must be doing something, but currently there isnt samba 4.7 in any of their repos and I would prefer to compile from source tbh. Thanks everyone for your inputs. Arnab On Thu, Nov 23, 2017 at 9:37 PM, Sonic <sonicsmith at gmail.com> wrote:> Contents of your systemd service file in question? >
Rowland Penny
2017-Nov-23 22:03 UTC
[Samba] Compiling Samba 4.7 with systemd support on Fedora 26
On Thu, 23 Nov 2017 21:46:17 +0000 Arnab Roy <arniekol at gmail.com> wrote:> The systemd unit file looks like as follows: > > [Unit] > Description=Winbindd Service > After=syslog.target network.target > > [Service] > Environment=KRB5CCNAME=FILE:/run/samba/krb5cc_samba > Type=notify > NotifyAccess=all > PIDFile=/var/run/samba/I know nothing about systemd, but, shouldn't there be something like 'winbind.pid' on the end of the line above ?> ExecStart=/usr/local/samba/sbin/winbindd -D > ExecReload=/usr/bin/kill -HUP $MAINPID > LimitCORE=infinity > > [Install] > > > @Rowland I am not blaming samba at all, certainly is some sort of > systemd+samba issue.Never thought you were blaming Samba, I was just pointing out that I don't use systemd. I initially thought you might be running Samba as A DC and trying to start winbind manually, you are not, so that's an end to that thought ;-) Rowland
On Thu, Nov 23, 2017 at 4:46 PM, Arnab Roy <arniekol at gmail.com> wrote:> > PIDFile=/var/run/samba/ >Do you have "/var/run/samba" dir? I use: PIDFile=/usr/local/samba/var/run/winbindd.pid And even then I think I had to manually create the "/usr/local/samba/var/run" dir.
Reindl Harald
2017-Nov-23 22:05 UTC
[Samba] Compiling Samba 4.7 with systemd support on Fedora 26
Am 23.11.2017 um 22:46 schrieb Arnab Roy via samba:> The systemd unit file looks like as follows: > > [Unit] > Description=Winbindd Service > After=syslog.target network.target > > [Service] > Environment=KRB5CCNAME=FILE:/run/samba/krb5cc_samba > Type=notify > NotifyAccess=all > PIDFile=/var/run/samba/ > ExecStart=/usr/local/samba/sbin/winbindd -D > ExecReload=/usr/bin/kill -HUP $MAINPID > LimitCORE=infinitytry without the -D param https://www.freedesktop.org/software/systemd/man/systemd.service.html Behavior of notify is similar to simple; however, it is expected that the daemon sends a notification message via sd_notify(3) or an equivalent call when it has finished starting up so in that case the daemon is *not* required to double-fork and should start in foreground
Arnab Roy
2017-Nov-23 22:08 UTC
[Samba] Compiling Samba 4.7 with systemd support on Fedora 26
Yes I have /var/run/samba/ , I spotted the error with not having an actual filename while I was posting this message. Does the pid file need to be in the same path as samba ? On Thu, Nov 23, 2017 at 10:04 PM, Sonic <sonicsmith at gmail.com> wrote:> On Thu, Nov 23, 2017 at 4:46 PM, Arnab Roy <arniekol at gmail.com> wrote: > > > > PIDFile=/var/run/samba/ > > > > Do you have "/var/run/samba" dir? > I use: > PIDFile=/usr/local/samba/var/run/winbindd.pid > > And even then I think I had to manually create the > "/usr/local/samba/var/run" dir. >
Reindl Harald
2017-Nov-23 22:09 UTC
[Samba] Compiling Samba 4.7 with systemd support on Fedora 26
Am 23.11.2017 um 23:03 schrieb Rowland Penny via samba:> On Thu, 23 Nov 2017 21:46:17 +0000 > Arnab Roy <arniekol at gmail.com> wrote: > >> The systemd unit file looks like as follows: >> >> [Unit] >> Description=Winbindd Service >> After=syslog.target network.target >> >> [Service] >> Environment=KRB5CCNAME=FILE:/run/samba/krb5cc_samba >> Type=notify >> NotifyAccess=all >> PIDFile=/var/run/samba/ > > I know nothing about systemd, but, shouldn't there be something like > 'winbind.pid' on the end of the line above?there should be no PIDFile line at all - the whole point of Type=notify is a direct communication channel where a non-forking main-pid tells systemd "i am ready to accept connections"
Reindl Harald
2017-Nov-23 22:11 UTC
[Samba] Compiling Samba 4.7 with systemd support on Fedora 26
Am 23.11.2017 um 23:05 schrieb Reindl Harald via samba:> > > Am 23.11.2017 um 22:46 schrieb Arnab Roy via samba: >> The systemd unit file looks like as follows: >> >> [Unit] >> Description=Winbindd Service >> After=syslog.target network.target >> >> [Service] >> Environment=KRB5CCNAME=FILE:/run/samba/krb5cc_samba >> Type=notify >> NotifyAccess=all >> PIDFile=/var/run/samba/ >> ExecStart=/usr/local/samba/sbin/winbindd -D >> ExecReload=/usr/bin/kill -HUP $MAINPID >> LimitCORE=infinity > > try without the -D param > > https://www.freedesktop.org/software/systemd/man/systemd.service.html > Behavior of notify is similar to simple; however, it is expected that > the daemon sends a notification message via sd_notify(3) or an > equivalent call when it has finished starting up > > so in that case the daemon is *not* required to double-fork and should > start in foreground_________________________________ but as long as that stuff below don't work at build time forget about Type=notify at all, it can not work! for MariaDB on Fedora25/26 "systemd-devel" is enough at build time and then Type=notify works as expected - this is a build problem of samba in case the messages below still appear I am unable to start samba from systemd , systemd kills the process off after startup. I have installed the systemd-devel as recommended, I guess I am missing more dependencies Checking for libsystemd-daemon : not found Checking for libsystemd-journal : not found Checking for libsystemd : not found Checking for library systemd : no
Rowland Penny
2017-Nov-23 22:11 UTC
[Samba] Compiling Samba 4.7 with systemd support on Fedora 26
On Thu, 23 Nov 2017 17:04:48 -0500 Sonic <sonicsmith at gmail.com> wrote:> On Thu, Nov 23, 2017 at 4:46 PM, Arnab Roy <arniekol at gmail.com> wrote: > > > > PIDFile=/var/run/samba/ > > > > Do you have "/var/run/samba" dir?Good point.> I use: > PIDFile=/usr/local/samba/var/run/winbindd.pid > > And even then I think I had to manually create the > "/usr/local/samba/var/run" dir.Shouldn't have to, depending on how you configure Samba when compiling it, will define just where things go and should create most if not all of the required directories and files. Not sure if the OP posted his './configure' line Rowland