Page 1 of 1

centOS7, stop doesn't work --run-as and --pid-file not work

Posted: Mon Jan 18, 2021 1:25 pm
by dilkie
Haven't seen anyone else reporting this but "/etc/init.d/FAHClient stop" doesn't work for me.

process looks like this when running

root 27767 0.0 0.1 105136 5240 pts/6 Sl Jan17 0:34 /usr/bin/FAHClient /etc/fahclient/config.xml --run-as fahclient --pid-file=/var/run/fahclient.pid --daemon

The reason is because --pid-file isn't being created and the /etc/init.d/FAHClient script requires that.

Also note that the --run-as doesn't seem to be working either.

Note, yes, I'm running as root when I started it.

And a side note, usually pid's are written to a file in a directory "under" /var/run, as that isn't world writable.

If I manually copy the pid to the file specified, it'll stop when requested.

Re: centOS7, stop doesn't work --run-as and --pid-file not w

Posted: Mon Jan 18, 2021 2:36 pm
by bruce
That's a well written bug report. One of us should open a ticket here: https://github.com/FoldingAtHome/fah-issues.

How did you start the software? There should be a corresponding "cwd" command in the script that started it. Also, the installation should have created a (new?) user for the "run-as" command called "fahclient" and private files for the CWD and the --run-as command in which the daemon keeps its working files.

I'm not sure why that didn't work. Perhaps there's an "unsupported" issue somewhere associated with that.

Re: centOS7, stop doesn't work --run-as and --pid-file not w

Posted: Tue Jan 19, 2021 6:41 am
by Whompithian
viewtopic.php?f=108&t=36200#p344141

That post contains my advice for installing and running FAHClient on RPM-based distros. Essentially, explicitly creating a systemd unit to override the behavior of the init.d script solves numerous client issues.

Re: centOS7, stop doesn't work --run-as and --pid-file not w

Posted: Tue Jan 19, 2021 6:57 pm
by bruce
Whompithian wrote:https://foldingforum.org/viewtopic.php? ... 00#p344141

That post contains my advice for installing and running FAHClient on RPM-based distros. Essentially, explicitly creating a systemd unit to override the behavior of the init.d script solves numerous client issues.
We still need a report in github.com/FoldingAtHome/fah-issues. I'd think that the installer should be able to create either a systemd script or an init.d script (or maybe both). That would preserve backward compatibility as well as fix the problem going forward. Do you want to write it?

Re: centOS7, stop doesn't work --run-as and --pid-file not w

Posted: Wed Jan 20, 2021 6:32 am
by Whompithian
Most of the described behavior was already reported in https://github.com/FoldingAtHome/fah-issues/issues/1610 and there are requests for the installers to provide a proper systemd init script at least as far back as v7.6.9.

Re: centOS7, stop doesn't work --run-as and --pid-file not w

Posted: Wed Jan 20, 2021 7:27 am
by Neil-B
Going to be interesting to see what the current upheaval truely means for the likes of CentOS .. it may have ceased to exist before this issue gets fixed?