[Nut-upsdev] Same Box, Moved install to different drive, now get Connection failure: Connection refused??

David C. Rankin drankinatty at suddenlinkmail.com
Wed Jul 27 13:51:40 UTC 2011


Arjen, All,

   I need help unwrapping my head from around the problem of getting nut running 
on the same machine it runs fine with on another drive!! Sound easy -- not here :)

   I have network-ups-tools 2.4.1-2 on two servers. On one server I had a raid 
drive fail (which I'm still booting from and running nut on just fine). I bought 
a second pair of drives to establish a new array in the box which is up and 
running just fine except for nut. The daemon.log shows the following error:

Jul 26 21:09:11 nirvana usbhid-ups[2139]: Startup successful
Jul 26 21:09:11 nirvana upsmon[2142]: Startup successful
Jul 26 21:09:11 nirvana upsmon[2143]: UPS [nirvana_ups at localhost]: connect 
failed: Connection failure: Connection refused
Jul 26 21:09:11 nirvana upsmon[2143]: Communications with UPS 
nirvana_ups at localhost lost
Jul 26 21:09:16 nirvana upsmon[2143]: UPS [nirvana_ups at localhost]: connect 
failed: Connection failure: Connection refused
Jul 26 21:09:16 nirvana upsmon[2143]: UPS nirvana_ups at localhost is unavailable
Jul 26 21:09:21 nirvana upsmon[2143]: UPS [nirvana_ups at localhost]: connect 
failed: Connection failure: Connection ref

I have the exact same nut user and nut groups on this new install, both same UID 
and GID. I have copied my /etc/ups file-for-file from old-array to new-array, 
but still I get the connection refused error with 'upsc ups_name at localhost. If I 
boot back to the old array drive (old drive)G, then it works perfectly. I have 
been focusing my feeble mind on this task this evening, and I'm out of ammo. 
Where can the hidden causes of this Connection failure: Connection refused error 
be coming from?

When run on the original drive, upsc works just fine:

[21:20 nirvana:/mnt/nv2/etc/ups] # upsc nirvana_ups
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 20
battery.mfr.date: CPS
battery.runtime: 1110
battery.runtime.low: 300
battery.type: PbAcid
battery.voltage: 13.5
battery.voltage.nominal: 12
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/hiddev0
driver.version: 2.4.1
driver.version.data: CyberPower HID 0.2
driver.version.internal: 0.34
input.transfer.high: 140
input.transfer.low: 90
input.voltage: 114.0
input.voltage.nominal: 120
output.voltage: 114.0
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.load: 22
ups.mfr: CPS
ups.model: UPS CP1000AVRLCD
ups.productid: 0501
ups.realpower.nominal: 88
ups.status: OL
ups.test.result: Done and warning
ups.timer.shutdown: -60
ups.timer.start: 0
ups.vendorid: 0764

but on the other box, I get 'connection refused' errors with upsc. What part of 
the puzzle am I missing? I know this is a forest-for-the-trees issue -- anybody 
have any thought which tree I might look behind?  Thanks for any help you can 
provide.

   The config is a direct copy. 'cp -a /mnt/old/etc/ups /etc/ups'. The files are:

   hosts.conf

MONITOR archangel_ups at archangel.3111skyline.com "Archangel CP1000AVRLCD UPS"
MONITOR nirvana_ups at localhost "Nirvana CP1000AVRLCD UPS"

   nut.conf

MODE = standalone

   ups.conf

[nirvana_ups]
         driver = usbhid-ups
         port = /dev/hiddev0
         desc = "Nirvana CP1000AVRLCD UPS"

   upsd.conf

LISTEN 127.0.0.1 3493
LISTEN 192.168.6.17

   upsmon.conf

MONITOR nirvana_ups at localhost 1 david <snip-same-as-in-upsmon.conf> master
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5

   upssched.conf

CMDSCRIPT /usr/bin/upssched-cmd

   upsset.conf

I_HAVE_SECURED_MY_CGI_DIRECTORY

   upsd.users

[upsmaster]
         password = <snip>
         upsmon master
[upsslave]
         password = <snip>
         upsmon slave
[david]
         password = <snip-same-as-in-upsmon.conf>
         actions = SET
         instcmds = ALL


   I can't figure out why I'm getting the connection refused when I boot from 
the new drive. I have the same /etc/hosts, same /etc/hosts.allow. When I try and 
debug with 'usbhid-ups  -DD -a nirvana_ups', I get:

Checking device (0764/0501) (002/002)
- VendorID: 0764
- ProductID: 0501
- Manufacturer: CPS
- Product: UPS CP1000AVRLCD
- Serial Number: unknown
- Bus: 002
Trying to match device
Device matches
failed to claim USB device: Device or resource busy
detached kernel driver from USB device...
HID descriptor length 387
Report Descriptor size = 387
Using subdriver: CyberPower HID 0.2
Path: UPS.PowerSummary.iProduct, Type: Feature, ReportID: 0x01, Offset: 0, Size: 
8, Value: 1.000000
Path: UPS.PowerSummary.iSerialNumber, Type: Feature, ReportID: 0x02, Offset: 0, 
Size: 8, Value: 2.000000
Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, ReportID: 0x03, Offset: 
0, Size: 8, Value: 4.000000
Path: UPS.PowerSummary.iOEMInformation, Type: Feature, ReportID: 0x04, Offset: 
0, Size: 8, Value: 3.000000
Path: UPS.PowerSummary.Rechargeable, Type: Feature, ReportID: 0x05, Offset: 0, 
Size: 8, Value: 1.000000
Path: UPS.PowerSummary.CapacityMode, Type: Feature, ReportID: 0x06, Offset: 0, 
Size: 8, Value: 2.000000

(usbhid-ups output at: http://www.3111skyline.com/dl/bugs/nut/usbhid-ups.txt )

   I know the answer is probably staring me in the face, but I could sure use a 
bit of help seeing it.


-- 
David C. Rankin, J.D.,P.E.



More information about the Nut-upsdev mailing list