[Nut-upsuser] Nut-upsuser Digest, Vol 153, Issue 13

p1_p1_p1 at seznam.cz p1_p1_p1 at seznam.cz
Tue Mar 27 21:47:31 UTC 2018


maybe i have solved this issue, i unplugged APC BackUPS from USB 2.0 and

PLUGGED INTO USB 3.0 and now it works prefectly at first time without any 
side effects,
strange, this shoud be working since USB 1.0

so ups driver is configured OK, this config works ok for backups, this looks 
like there is no problem with detection of UPS but with
USB driver or something around so simply if somebody has same problem with 
APC BackUPS (SmartUPS works correctly in same USB)
USE FASTEST USB that U have on board, (if you have USB 2.0 and USB 3.0 
onboard use one 3.0 port for UPS),
sounds like nonsense, but it works, just OMG and halelujah for linux usb 
drivers.


-----Původní zpráva----- 
From: nut-upsuser-request at lists.alioth.debian.org
Sent: Tuesday, March 27, 2018 10:08 PM
To: nut-upsuser at lists.alioth.debian.org
Subject: Nut-upsuser Digest, Vol 153, Issue 13

Send Nut-upsuser mailing list submissions to
nut-upsuser at lists.alioth.debian.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
or, via email, send a message with subject or body 'help' to
nut-upsuser-request at lists.alioth.debian.org

You can reach the person managing the list at
nut-upsuser-owner at lists.alioth.debian.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Nut-upsuser digest..."


Today's Topics:

   1. problem with nut APC BackUPS RS 1500 (white) (p1_p1_p1 at seznam.cz)


----------------------------------------------------------------------

Message: 1
Date: Tue, 27 Mar 2018 22:08:24 +0200
From: <p1_p1_p1 at seznam.cz>
To: <nut-upsuser at lists.alioth.debian.org>
Subject: [Nut-upsuser] problem with nut APC BackUPS RS 1500 (white)
Message-ID: <979B56288C9940C1AAF9D81F49BA3861 at BULDOZER>
Content-Type: text/plain; charset="utf-8"

Hello, i have this strange problem with APC BackUPS RS 1500 ? older one 
model, white one
under windows in powerchute is device OK, working everything ok selftest ok, 
just ordinary ups.

under CentOS 7 minimal (CentOS-7-x86_64-Minimal-1708.iso)
kernel version 3.10.0-693.el7.x68_64
driver version 2.7.2

i have this strange probem: nut driver didnt start automatically with error,
after i enter in console twice as root:
systemctl start nut-monitor.service nut-server.service  -this returns error 
again
systemctl start nut-monitor.service nut-server.service  -second try ? 
service is running now ...
now upsc myups shows ups running

ANY SOLUTION how to autostart nut correctly with backups 1500 running? (i 
also tried apcupsd but without success, this works with smartups but not 
with backups, returns clean ups status and fails)
i tried everything what i have find on internet, tried also check system, 
missing files but after two weeks with same result i need some help, 
starting ups monitoring manually after every power fail is nonsense

just installed minimal required parts:
yum install epel-release
#yum update ?y i tested it also with this update but same results
yum install open-vm-tools
yum install putty
yum install mc
yum install nano
yum install usbutils
yum install nut
yum install nut-cgi
yum install nut-client
yum install powerman

nut-scanner ?U
shows ups APC 051D:0002 so i tried:

/etc/ups/ups.conf:
[myups]
driver = "usbhid-ups"
port = /dev/usb/hiddev0
vendorid = "051D"
productid = "0002"

(also tried to comment vendor+product+port and set port=auto same problem)

/lib/systemd/system/nut-driver.service
...
ExecStart=-/sbin/upsdrvctl start myups -h
...

with no difference, problem remains,

cp /usr/lib/udev/rules.d/62-nut-usbups.rules 
/etc/udev/rules.d/62-nut-usbups.rules
cp /usr/lib/tmpfiles.d/nut-run.conf /etc/tmpfiles.d/nut-run.conf

edit /etc/udev/rules.d/52-nut-usbups.rules
# APC - usbhid-ups
ATTR{idVendor}=="051d", ATTR{idProduct}=="0001", MODE="664", GROUP="nut" 
<======THIS IS IMPORTANT!!! nut
ATTR{idVendor}=="051d", ATTR{idProduct}=="0002", MODE="664", GROUP="nut" 
<======THIS IS IMPORTANT!!! nut
ATTR{idVendor}=="051d", ATTR{idProduct}=="0003", MODE="664", GROUP="nut" 
<======THIS IS IMPORTANT!!! nut

mkdir /var/run/nut
chown root:nut /var/run/nut
chmod 770 /var/run/nut
udevadm control --reload-rules
udevadm trigger
systemctl enable nut-monitor.service nut-server.service
systemctl start nut-monitor.service nut-server.service
reboot

and then i check
upsc myups and error,
systemctl status nut-server.service
returns error in driver service so
systemctl status nut-driver.service ?l
and there is info about upsdrvctl failed to find ups ...

when i now enter twice
systemctl start nut-monitor.service nut-server.service
systemctl start nut-monitor.service nut-server.service
upsc myups
everything looks fine and ups communicates again

================================================
systemctl status nut-driver.service ?l after system tried autostart nut:
? nut-driver.service - Network UPS Tools - power device driver controller
   Loaded: loaded (/usr/lib/systemd/system/nut-driver.service; static; 
vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2018-03-27 15:47:48 EDT; 38s 
ago
  Process: 1216 ExecStop=/usr/sbin/upsdrvctl stop (code=exited, 
status=1/FAILURE)
  Process: 1112 ExecStart=/usr/sbin/upsdrvctl start (code=exited, 
status=1/FAILURE)
  Process: 1106 ExecStartPre=/usr/bin/systemd-tmpfiles --create 
/etc/tmpfiles.d/nut-run.conf (code=exited, status=0/SUCCESS)

Mar 27 15:47:45 APCUPSNUT systemd[1]: Starting Network UPS Tools - power 
device driver controller...
Mar 27 15:47:48 APCUPSNUT upsdrvctl[1112]: Driver exited abnormally
Mar 27 15:47:48 APCUPSNUT upsdrvctl[1112]: Network UPS Tools - UPS driver 
controller 2.7.2
Mar 27 15:47:48 APCUPSNUT upsdrvctl[1216]: kill: No such process
Mar 27 15:47:48 APCUPSNUT upsdrvctl[1216]: Stopping 
/var/run/nut/usbhid-ups-myups.pid failed: No such process
Mar 27 15:47:48 APCUPSNUT upsdrvctl[1216]: Network UPS Tools - UPS driver 
controller 2.7.2
Mar 27 15:47:48 APCUPSNUT systemd[1]: nut-driver.service: control process 
exited, code=exited status=1
Mar 27 15:47:48 APCUPSNUT systemd[1]: Failed to start Network UPS Tools - 
power device driver controller.
Mar 27 15:47:48 APCUPSNUT systemd[1]: Unit nut-driver.service entered failed 
state.
Mar 27 15:47:48 APCUPSNUT systemd[1]: nut-driver.service failed.
==========================================================================
systemctl status nut-driver.service ?l after first manual try systemctl 
start nut-monitor.service nut-server.service:
? nut-driver.service - Network UPS Tools - power device driver controller
   Loaded: loaded (/usr/lib/systemd/system/nut-driver.service; static; 
vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2018-03-27 15:49:16 EDT; 13s 
ago
  Process: 1265 ExecStop=/usr/sbin/upsdrvctl stop (code=exited, 
status=1/FAILURE)
  Process: 1261 ExecStart=/usr/sbin/upsdrvctl start (code=exited, 
status=1/FAILURE)
  Process: 1258 ExecStartPre=/usr/bin/systemd-tmpfiles --create 
/etc/tmpfiles.d/nut-run.conf (code=exited, status=0/SUCCESS)

Mar 27 15:49:12 APCUPSNUT upsdrvctl[1261]: kill: No such process
Mar 27 15:49:16 APCUPSNUT upsdrvctl[1261]: Driver exited abnormally
Mar 27 15:49:16 APCUPSNUT upsdrvctl[1261]: Network UPS Tools - UPS driver 
controller 2.7.2
Mar 27 15:49:16 APCUPSNUT upsdrvctl[1265]: kill: No such process
Mar 27 15:49:16 APCUPSNUT upsdrvctl[1265]: Stopping 
/var/run/nut/usbhid-ups-myups.pid failed: No such process
Mar 27 15:49:16 APCUPSNUT upsdrvctl[1265]: Network UPS Tools - UPS driver 
controller 2.7.2
Mar 27 15:49:16 APCUPSNUT systemd[1]: nut-driver.service: control process 
exited, code=exited status=1
Mar 27 15:49:16 APCUPSNUT systemd[1]: Failed to start Network UPS Tools - 
power device driver controller.
Mar 27 15:49:16 APCUPSNUT systemd[1]: Unit nut-driver.service entered failed 
state.
Mar 27 15:49:16 APCUPSNUT systemd[1]: nut-driver.service failed.
===========================================================================
systemctl status nut-driver.service ?l after SECOND ALLWAYS SUCESSFUL try 
systemctl start nut-monitor.service nut-server.service:
? nut-driver.service - Network UPS Tools - power device driver controller
   Loaded: loaded (/usr/lib/systemd/system/nut-driver.service; static; 
vendor preset: disabled)
   Active: active (running) since Tue 2018-03-27 15:49:35 EDT; 4s ago
  Process: 1265 ExecStop=/usr/sbin/upsdrvctl stop (code=exited, 
status=1/FAILURE)
  Process: 1276 ExecStart=/usr/sbin/upsdrvctl start (code=exited, 
status=0/SUCCESS)
  Process: 1275 ExecStartPre=/usr/bin/systemd-tmpfiles --create 
/etc/tmpfiles.d/nut-run.conf (code=exited, status=0/SUCCESS)
Main PID: 1286 (usbhid-ups)
   CGroup: /system.slice/nut-driver.service
           ??1286 /usr/sbin/usbhid-ups -a myups

Mar 27 15:49:33 APCUPSNUT systemd[1]: Starting Network UPS Tools - power 
device driver controller...
Mar 27 15:49:33 APCUPSNUT upsdrvctl[1276]: kill: No such process
Mar 27 15:49:34 APCUPSNUT upsdrvctl[1276]: Using subdriver: APC HID 0.95
Mar 27 15:49:34 APCUPSNUT upsdrvctl[1276]: Network UPS Tools - Generic HID 
driver 0.38 (2.7.2)
Mar 27 15:49:34 APCUPSNUT upsdrvctl[1276]: USB communication driver 0.32
Mar 27 15:49:35 APCUPSNUT upsdrvctl[1276]: Network UPS Tools - UPS driver 
controller 2.7.2
Mar 27 15:49:35 APCUPSNUT systemd[1]: Started Network UPS Tools - power 
device driver controller.
Mar 27 15:49:35 APCUPSNUT usbhid-ups[1286]: Startup successful

and now it is running ! and im asking why OMG why ...

=============================
upsc returns this info about UPS (after two manual starts of nut server):
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.date: 2001/09/25
battery.mfr.date: 2006/04/24
battery.runtime: 4219
battery.runtime.low: 120
battery.type: PbAc
battery.voltage: 26.9
battery.voltage.nominal: 24.0
device.mfr: APC
device.model: Back-UPS RS 1500
device.serial: JB0617042829
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.version: 2.7.2
driver.version.data: APC HID 0.95
driver.version.internal: 0.38
input.sensitivity: high
input.transfer.high: 264
input.transfer.low: 194
input.voltage: 228.0
input.voltage.nominal: 230
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.firmware: 8.g9 .I
ups.firmware.aux: g9
ups.load: 9
ups.mfr: APC
ups.mfr.date: 2006/04/24
ups.model: Back-UPS RS 1500
ups.productid: 0002
ups.realpower.nominal: 865
ups.serial: JB0617042829
ups.status: OL
ups.test.result: No test initiated
ups.timer.reboot: 0
ups.timer.shutdown: -1
ups.vendorid: 051d
=============================================
lsusb shows this info about usb bus:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 051d:0002 American Power Conversion Uninterruptible 
Power Supply
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
=============================================
usb-devices returns this:
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 6
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=03.10
S:  Manufacturer=Linux 3.10.0-693.el7.x86_64 ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=0000:02:01.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev=03.10
S:  Manufacturer=Linux 3.10.0-693.el7.x86_64 uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:02:00.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0e0f ProdID=0003 Rev=01.03
S:  Manufacturer=VMware
S:  Product=VMware Virtual USB Mouse
C:  #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=01 Prot=02 Driver=usbhid

T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  3 Spd=12  MxCh= 7
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0e0f ProdID=0002 Rev=01.00
S:  Product=VMware Virtual USB Hub
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=02 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#=  4 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=051d ProdID=0002 Rev=01.06
S:  Manufacturer=American Power Conversion
S:  Product=Back-UPS RS 1500 FW:8.g9 .I USB FW:g9
S:  SerialNumber=JB0617042829
C:  #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=24mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbfs
================================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20180327/3d1f436f/attachment.html>

------------------------------

Subject: Digest Footer

_______________________________________________
Nut-upsuser mailing list
Nut-upsuser at lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

------------------------------

End of Nut-upsuser Digest, Vol 153, Issue 13
******************************************** 




More information about the Nut-upsuser mailing list