-
-
Notifications
You must be signed in to change notification settings - Fork 382
Service nut-server / upsd not starting automatically on CentOS / RockyLinux #2721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
One thing that comes to mind - when you enabled the service, which symlinks did systemd report as created? Not sure about packaging, but vanilla services deliver a |
You mean these ? It created 2
Sorry, I don't fully understand what you meant about "wants" but I remember I seen "wants" when I looked for nut related files, are these "want" files relevant to know what other services to enable ?
A more serious thing I noticed is that if I disconnect USB cable and plug it back in, it fails to get data:
Works again if I start driver with: I can get around these by writing monitoring scripts but not sure if NUT services should already do this by themselves. |
Cheers, regarding I can't quickly see from the earlier posts what UPS device and driver you have, but normally they should re-connect in case of communications problems, and you would see the data become "not stale" after a while (there are several polling intervals involved in a driver, Regarding service start-up, there seem to be too few systemd mentions in the "screenshot" above, for comparison, on my test system I see the following, which I'd detail as they go in alphabetic order, below.
Generally note that in systemd the
In your case it seems that no units were enabled by packaging (distro problem?) or you disabled some? |
Note that you can view driver logs in |
Thanks for the details Jim.
Not sure how to check versions because I am confused by the many components, but the logs mention Driver is Ups if it matters is an Njoy Keen 800 USB
You mean if I customised something during install ? I just installed it with yum (Package nut-2.8.2-2.el9.x86_64) without altering anything I had this "APC" one installed first: After changing the UPS name or driver name I need to run
If |
My bad, no For custom compilations you can try to follow https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests but to fix up the service units, probably this part of those instructions can suffice with whatever your packages delivered:
Note the disable/enable of units - that is needed to surely record the symlinks they defined according to "wants" etc. properties. Primarily needed when these files could get updated too (as in a custom build) but should not hurt generally.
Probably that should do it, probably either one would suffice; if the |
…e, document the units and why they are enabled or disabled by default [networkupstools#2721] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…e, document the units and why they are enabled or disabled by default [networkupstools#2721] Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Resuming. For make it start automatically on Red Hat like systemd: sudo systemctl enable nut-server Greetings |
@pestevao : note that And the other units (server, target) should be activated by the package or systemd-presets file delivered by NUT. Unless packagers botched their job, or you have a distro version with an older release that did not get modern features and fixes. |
Uh oh!
There was an error while loading. Please reload this page.
I have some trouble with NUT on
RockyLinux 9.2
,Network UPS Tools upsc 2.8.2
Later edit:
driver = nutdrv_qx
, NUT installed with yum:Package nut-2.8.2-2.el9.x86_64
I ran
systemctl enable nut-server
to add nut-server to auto start, but after reboot it says isinactive (dead)
, so command to get UPS data (e.gupsc myups1
) saysConnection refused
.I looked in
/var/log/messages
and since reboot there is no log line containingnut-
, I understand it didn't even try to start, not sure where to look at next.If I manually run
service nut-server restart
orservice upsd restart
then service starts OK and I can see the UPS status text when runningupsc myups1
As a fix, I can auto start the service
nut-server
/upsd
if I add it to a cronjob with@reboot
:upsd
andnut-server
to write same messages in/var/log/messages
or does this indicate a config problem ?Thanks.
The text was updated successfully, but these errors were encountered: