Quantcast
Channel: FedoraForum.org
Viewing all articles
Browse latest Browse all 36122

nut (ups) automatic startup fails

$
0
0
Hi,

I have installed and configured nut (2.6.5-7.fc18) in a fairly standard x86_64 box.

After configuring nut I tested it by starting is manually, e.g. 'upsdrvctl start' and everything worked fine. When I re-started the server nut-server.service is tryng to start nut-driver.service but it fails:

Code:

Mar 17 11:48:19 mybox upsdrvctl[1054]: Fatal error: unusable configuration
Mar 17 11:48:19 mybox upsdrvctl[1054]: Network UPS Tools - BCMXCP UPS driver 0.26 (2.6.5)
Mar 17 11:48:19 mybox upsdrvctl[1054]: RS-232 communication subdriver 0.19
Mar 17 11:48:19 mybox upsdrvctl[1054]: Unable to open /dev/ttyS6: Device or resource busy
Mar 17 11:48:19 mybox upsdrvctl[1054]: Current user id: nut (57)
Mar 17 11:48:19 mybox upsdrvctl[1054]: Serial port owner: root (0)
Mar 17 11:48:19 mybox upsdrvctl[1054]: Serial port group: dialout (18)
Mar 17 11:48:19 mybox upsdrvctl[1054]: Mode of port: 0660
Mar 17 11:48:19 mybox upsdrvctl[1054]: Things to try:
Mar 17 11:48:19 mybox upsdrvctl[1054]: - Use another port (with the right permissions)
Mar 17 11:48:19 mybox upsdrvctl[1054]: - Fix the port owner/group or permissions on this port
Mar 17 11:48:19 mybox upsdrvctl[1054]: - Run this driver as another user (upsdrvctl -u or 'user=...' in ups.conf).
Mar 17 11:48:19 mybox upsdrvctl[1054]: See upsdrvctl(8) and ups.conf(5).
Mar 17 11:48:19 mybox upsdrvctl[1054]: Driver failed to start (exit status=1)
Mar 17 11:48:19 mybox upsdrvctl[1054]: Network UPS Tools - UPS driver controller 2.6.5

I cannot understand why the serial port /dev/ttyS6 would be busy? I have not installed anything else that uses serial ports, and /dev/ttyS6 is naturally dedicated to the UPS.

Serial port /dev/ttyS6:
Code:

$ ll /dev/ttyS6
crw-rw---- 1 root dialout 4, 70 Mar 17 11:48 /dev/ttyS6

User nut is in dialout group:
Code:

$ id nut
uid=57(nut) gid=57(nut) groups=57(nut),18(dialout)

After the boot if I login and do this

Code:

$ sudo systemctl stop nut-monitor.service
$ sudo systemctl start nut-server.service
$ sudo systemctl start nut-monitor.service

Everything works fine, also nut-driver.service starts OK.

nut-driver.service is "static"
nut-server.service is "enabled"
nut-monitor.service is "enabled"

If the error message is right, what is reserving /dev/ttyS6 (and/or other serial ports) during system boots up?

-Paavo

Viewing all articles
Browse latest Browse all 36122

Trending Articles