我在尝试在 CentOS 6 计算机上配置 NUT 以控制 Eaton 5E UPS 时遇到一个奇怪的问题。
我已采取以下步骤
# yum install nut
# yum install usbutils
然后更新nut.conf
MODE=standalone
我确认 UPS 可见
# lsusb
Bus 003 Device 006: ID 0463:ffff MGE UPS Systems UPS
然后更新ups.conf
[eaton5e]
driver = usbhid-ups
port = auto
desc = "Eaton5E"
vendorid = 0463
然后尝试运行驱动程序控制失败
# upsdrvctl start
Network UPS Tools - UPS driver controller 2.6.5
Network UPS Tools - Generic HID driver 0.37 (2.6.5)
USB communication driver 0.31
No matching HID UPS found
Driver failed to start (exit status=1)
当我尝试调试它时,虽然我收到了另一个错误,但我不知道为什么
# usbhid-ups -DDD -a eaton5e
*bunch of stuff*
0.000799 Trying to match device
0.000813 Device matches
0.001630 Unable to get HID descriptor (error sending control message: Broken pipe)
0.001636 HID descriptor, method 2: (9 bytes) => 09 21 10 01 21 01 22 25 02
0.001641 HID descriptor length 549
0.001890 Unable to get Report descriptor: Broken pipe
*more bunch of stuff*
我已经和这个问题斗争了一段时间了,但没有运气,以前有人遇到过这个吗?
答案1
我设法通过执行以下操作来解决此问题
1.) 将必要的规则复制(或符号链接)到正确的位置
# cp /lib/udev/rules.d/62-nut-usbups.rules /etc/udev/rules.d
2.) 确定 ups 的正确供应商 ID
# lsusb
Bus 003 Device 006: ID 0463:ffff MGE UPS Systems UPS
3.) 更改 62-nut-usbups.rules 中的权限以进行正确的 ups
# vim 62-nut-usbups.rules
navigate to correct vendor id and update from
ATTR{idVendor}=="0463", ATTR{idProduct}=="ffff", MODE="664", GROUP="dialout"
to
ATTR{idVendor}=="0463", ATTR{idProduct}=="ffff", MODE="660", GROUP="nut"
4.) 重新启动机器