Mark Hansen
2016-Dec-25 16:20 UTC
[Nut-upsuser] /var/run/nut directory not created on CentOS 7.2 with systemd
Hello, I'm configuring the NUT package which comes with CentOS 7.X: nut.x86_64 2.7.2-3.el7 @epel nut-client.x86_64 2.7.2-3.el7 @epel I've configured NUT based on the instructions found on this page: https://www.luzem.com/2015/01/25/install-ups-in-centos-7/ which worked, except for one problem. When starting the services (nut-server, nut-monitor) the /var/run/nut directory is not created, and so the service fails to start. If I create the directory manually, using the following commands, I can get the services to start, but upon re-boot, the directory is gone and the services fail to start again: mkdir /var/run/nut chown root:nut /var/run/nut chmod 770 /var/run/nut restorecon -v /var/run/nut I searched and it seems the issue is that /var/run is on a temporary filesystem, so stuff created there do not survive a reboot. To work around the problem, I've created a start-up script (/usr/local/sbin/rc.local) and create the directory there. This seems to work, but I'm thinking there is something wrong or missing in my configuration. What is the correct fix? Thanks,
Larry Fahnoe
2016-Dec-25 17:25 UTC
[Nut-upsuser] /var/run/nut directory not created on CentOS 7.2 with systemd
My environment is a little different, but I'm seeing at least the client working without issue on CentOS 7. On CentOS 7.2 I also used the epel repository and installed nut-client; currently nut-client-2.7.2-3.el7.x86_64 The only configuration change was to update the /etc/ups/upsmon.conf file with the appropriate MONITOR statement. Other than that, normal enabling and starting the service was sufficient to have it work properly. The CentOS systems are installed from the minimal image and have a small set of KVM virtualization packages installed. In my environment, the nut server runs on a Raspberry Pi, so only the client is needed on the other systems. --Larry On Sun, Dec 25, 2016 at 10:20 AM, Mark Hansen <meh at winfirst.com> wrote:> Hello, > > I'm configuring the NUT package which comes with CentOS 7.X: > > nut.x86_64 2.7.2-3.el7 > @epel > nut-client.x86_64 2.7.2-3.el7 > @epel > > I've configured NUT based on the instructions found on this page: > > https://www.luzem.com/2015/01/25/install-ups-in-centos-7/ > > which worked, except for one problem. When starting the services > (nut-server, nut-monitor) > the /var/run/nut directory is not created, and so the service fails to > start. > > If I create the directory manually, using the following commands, I can > get the services > to start, but upon re-boot, the directory is gone and the services fail to > start again: > > mkdir /var/run/nut > chown root:nut /var/run/nut > chmod 770 /var/run/nut > restorecon -v /var/run/nut > > I searched and it seems the issue is that /var/run is on a temporary > filesystem, so stuff > created there do not survive a reboot. > > To work around the problem, I've created a start-up script > (/usr/local/sbin/rc.local) and > create the directory there. This seems to work, but I'm thinking there is > something wrong > or missing in my configuration. > > What is the correct fix? > > Thanks, > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at lists.alioth.debian.org > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser >-- Larry Fahnoe, Fahnoe Technology Consulting, fahnoe at FahnoeTech.com Minneapolis, Minnesota www.FahnoeTech.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20161225/12e87aa6/attachment.html>
Mark Hansen
2016-Dec-25 20:37 UTC
[Nut-upsuser] /var/run/nut directory not created on CentOS 7.2 with systemd
On 12/25/2016 9:25 AM, Larry Fahnoe wrote:> My environment is a little different, but I'm seeing at least the client > working without issue on CentOS 7. > > On CentOS 7.2 I also used the epel repository and installed nut-client; > currently nut-client-2.7.2-3.el7.x86_64 The only configuration change was > to update the /etc/ups/upsmon.conf file with the appropriate MONITOR > statement. Other than that, normal enabling and starting the service was > sufficient to have it work properly. The CentOS systems are installed from > the minimal image and have a small set of KVM virtualization packages > installed. In my environment, the nut server runs on a Raspberry Pi, so > only the client is needed on the other systems. > > --LarryThanks Larry. I'm not sure what's different with my system then. I've installed both "nut" and "nut-client" (as shown below). The service that is failing to start is "nut-server.service". If you're not running that, then that is probably why you're not seeing this problem. I think one of the NUT configuration/control files is supposed to create this directory when it starts, but that's not happening. Is it possible this is a bug in the NUT package on CentOS? Thanks,> > On Sun, Dec 25, 2016 at 10:20 AM, Mark Hansen <meh at winfirst.com> wrote: > >> Hello, >> >> I'm configuring the NUT package which comes with CentOS 7.X: >> >> nut.x86_64 2.7.2-3.el7 >> @epel >> nut-client.x86_64 2.7.2-3.el7 >> @epel >> >> I've configured NUT based on the instructions found on this page: >> >> https://www.luzem.com/2015/01/25/install-ups-in-centos-7/ >> >> which worked, except for one problem. When starting the services >> (nut-server, nut-monitor) >> the /var/run/nut directory is not created, and so the service fails to >> start. >> >> If I create the directory manually, using the following commands, I can >> get the services >> to start, but upon re-boot, the directory is gone and the services fail to >> start again: >> >> mkdir /var/run/nut >> chown root:nut /var/run/nut >> chmod 770 /var/run/nut >> restorecon -v /var/run/nut >> >> I searched and it seems the issue is that /var/run is on a temporary >> filesystem, so stuff >> created there do not survive a reboot. >> >> To work around the problem, I've created a start-up script >> (/usr/local/sbin/rc.local) and >> create the directory there. This seems to work, but I'm thinking there is >> something wrong >> or missing in my configuration. >> >> What is the correct fix? >> >> Thanks, >> >> _______________________________________________ >> Nut-upsuser mailing list >> Nut-upsuser at lists.alioth.debian.org >> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser >> > > >
Reasonably Related Threads
- /var/run/nut directory not created on CentOS 7.2 with systemd
- /var/run/nut directory not created on CentOS 7.2 with systemd
- NUT 2.7.2.3 on CentOS 7.2 doesn't cut power to the host after shutdown
- New improved version of nut-report script
- Best way to shut down RH KVM/QEMU based VMs via NUT