Re: [Apcupsd-users] apcupsd - systemd issue with pidfile
Brought to you by:
adk0212
|
From: Lorenzo B. <lor...@vd...> - 2022-04-13 13:17:14
|
I had a look inside apcupsd-3.14.14-18.el8.src.rpm and I found that the service file (apcupsd.service) installed by RHEL is the following: ************************** [Unit] Description=APC UPS Power Control Daemon for Linux After=syslog.target After=network-online.target [Service] ExecStartPre=-/bin/rm -f /etc/apcupsd/powerfail ExecStart=/sbin/apcupsd -b -f /etc/apcupsd/apcupsd.conf KillMode=process [Install] WantedBy=multi-user.target ********************************** Unlike Ubuntu, RHEL does not include the following lines: Type=forking PIDFile=/var/run/apcupsd.pid This means that on RHEL systemd will not monitor if the daemon is alive by checking its PID file and this is the reason why you do not get the "Can't open PID file" message. Is it possible for you to add the two lines above in REHL apcupsd.service file and check for the result? It could be useful for going deeper into the issue. Il giorno mer 13 apr 2022 alle ore 15:09 Jean-David Beyer < jea...@ve...> ha scritto: > On 4/13/22 08:56, Lorenzo Buzzi wrote: > > OK. You are right... if it works on Red Hat maybe the packagers did > > something to avoid it. > > Can you tell me the name and version of the RPM? So I can have a look at > > how it is made. > > $ rpm -q apcupsd > apcupsd-3.14.14-18.el8.x86_64 > > > > > Il giorno mer 13 apr 2022 alle ore 14:48 Jean-David Beyer > > <jea...@ve... <mailto:jea...@ve...>> ha scritto: > > > > On 4/13/22 08:19, Lorenzo Buzzi wrote: > > > My post is rather related to the following message, that appears > > in the > > > systemd apcupsd related messages: > > > Apr 01 10:08:31 bacon systemd[1]: *apcupsd.service: Can't open > > PID file > > > /run/apcupsd.pid (yet?) after start: Operation not permitted* > > > > But I do not get that message... > > > > This is all I get since I last rebooted my machine. > > > > > > [/var/log]# grep apcupsd messages > > Apr 10 15:02:46 localhost apcupsd[18082]: apcupsd 3.14.14 (31 May > 2016) > > redhat startup succeeded > > Apr 10 15:02:46 localhost apcupsd[18082]: NIS server startup > succeeded > > > > > -- > .~. Jean-David Beyer > /V\ Shrewsbury, New Jersey > /( )\ Red Hat Enterprise Linux > ^^-^^ up 2 days, 18 hours, 2 minutes > -- -- Lorenzo Buzzi VDS Rail www.vdsrail.com |