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

Moderators: Site Moderators, FAHC Science Team

Post Reply
dilkie
Posts: 1
Joined: Mon Jan 18, 2021 1:12 pm

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

Post 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.
bruce
Posts: 20910
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

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

Post 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.
Whompithian
Posts: 39
Joined: Thu Jun 25, 2020 12:40 am

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

Post 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.
bruce
Posts: 20910
Joined: Thu Nov 29, 2007 10:13 pm
Location: So. Cal.

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

Post 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?
Whompithian
Posts: 39
Joined: Thu Jun 25, 2020 12:40 am

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

Post 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.
Neil-B
Posts: 2027
Joined: Sun Mar 22, 2020 5:52 pm
Hardware configuration: 1: 2x Xeon E5-2697v3@2.60GHz, 512GB DDR4 LRDIMM, SSD Raid, Win10 Ent 20H2, Quadro K420 1GB, FAH 7.6.21
2: Xeon E3-1505Mv5@2.80GHz, 32GB DDR4, NVME, Win10 Pro 20H2, Quadro M1000M 2GB, FAH 7.6.21 (actually have two of these)
3: i7-960@3.20GHz, 12GB DDR3, SSD, Win10 Pro 20H2, GTX 750Ti 2GB, GTX 1080Ti 11GB, FAH 7.6.21
Location: UK

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

Post 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?
2x Xeon E5-2697v3, 512GB DDR4 LRDIMM, SSD Raid, W10-Ent, Quadro K420
Xeon E3-1505Mv5, 32GB DDR4, NVME, W10-Pro, Quadro M1000M
i7-960, 12GB DDR3, SSD, W10-Pro, GTX1080Ti
i9-10850K, 64GB DDR4, NVME, W11-Pro, RTX3070

(Green/Bold = Active)
Post Reply