[Nut-upsuser] nut suddenly stopped working...

A.Lizard alizard at ecis.com
Wed Feb 28 12:08:11 CET 2007


At 12:41 PM 2/27/07, you wrote:
It now works - with minor issues.
>Hi again,
>
>several people have already responded to this message, so I will be
>brief. I just wanted to reiterate that the output below is exactly as
>it should be. I don't see any bugs there.
>
>The problem rather seems to be that you are not following the
>instructions precisely. What is the point of starting, then stopping
>the driver? Of course you cannot read anything from the UPS if you
>have stopped the driver.
>
>If you need some step-by-step instructions in addition to the ones
>that are contained in the file INSTALL in the NUT distribution, try
>these:
>
>http://www.mathstat.dal.ca/~selinger/ups/backups.html
>
>They have been written for Linux 2.6.10 and an APC device, but it
>should work the same way for Belkin and other operating systems.
>
>If you still run into trouble, please write to the list again!
>Preferably include information on what set of instructions you
>followed, up to what step you got, and in what step of the
>instructions the error occurred.
>
>Good luck! -- Peter

Thanks. When looking at the URL earlier, I'd missed something rather 
important, and as a result, misunderstood most of the advice I'd gotten.
Basically, hotplugging failed with either the hotplug or hotplug-ng files.

I missed step 17... as a result, I didn't know adding nut startup commands 
to rc.local was required and the place to run -u root commands if need 
be.  It came up running as soon as boot complated as soon as I added the 
rc.local commands and rebooted.

17. power-on startup during regular boot
echo "Starting UPS driver, daemon, and monitor."
upsdrvctl -u root start belkin-ups
upsd -u root

Glitches:
1. knutclient won't run instant commands, but the upscmd is an adequate 
workaround.
2. The ups doesn't shut down after the system is powered off, but that's 
because I'm figuring out where to put your recommended additions to 
/etc/init.d/halt

If I can't get it to work, I'll probably be back for help.

Thanks again to you and to everyone on the list who responded.

A.Lizard

>A.Lizard wrote:
> >
> > I tried building nut 2.0.5 pre2 from source using the user=nut and make 
> usb
> > options, and got the same results. It works from -u root, but upsd gets a
> > "connection refused" message.
> >
> > Same messages when I run newhidups directly. I can't find any processes
> > connected to the UPS.
> >
> > I am open to suggestions. Giving up isn't an option for me, I really do
> > need to get this running and more to the point, I'm writing an article
> > about this which is due in a few days.
> >
> > here's some of the output I've gotten:
> > terrarium:/usr/local/ups/etc# /usr/local/ups/bin/upsdrvctl start
> > Network UPS Tools - UPS driver controller 2.0.5-pre2
> > Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 
> (2.0.5-pre2)
> >
> > No matching HID UPS found
> > Driver failed to start (exit status=1)
> > terrarium:/usr/local/ups/etc# /usr/local/ups/bin/upsdrvctl stop
> > Network UPS Tools - UPS driver controller 2.0.5-pre2
> > Can't open /var/state/ups/newhidups-belkin-ups.pid: No such file or 
> directory
> > terrarium:/usr/local/ups/etc# /usr/local/ups/bin/upsdrvctl -u root start
> > Network UPS Tools - UPS driver controller 2.0.5-pre2
> > Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 
> (2.0.5-pre2)
> >
> > Detected a UPS: Belkin/UPS
> > Using subdriver: Belkin HID 0.1
> > terrarium:/usr/local/ups/etc# /usr/local/ups/bin/upsdrvctl -u root stop
> > Network UPS Tools - UPS driver controller 2.0.5-pre2
> > terrarium:/usr/local/ups/etc# /usr/local/ups/bin/upsdrvctl -u nut stop
> > Network UPS Tools - UPS driver controller 2.0.5-pre2
> > Can't open /var/state/ups/newhidups-belkin-ups.pid: No such file or 
> directory
> > terrarium:/usr/local/ups/etc# /usr/local/ups/bin/upsdrvctl -u nut start
> > Network UPS Tools - UPS driver controller 2.0.5-pre2
> > Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 
> (2.0.5-pre2)
> >
> > No matching HID UPS found
> > Driver failed to start (exit status=1)
> > terrarium:/usr/local/ups/etc#
> >
> >
> > >At 11:48 PM 2/23/07, you wrote:
> > >>At 06:14 PM 2/23/07, you wrote:
> > >>>Back to square one. Is there any other process running that might
> > >>>already be attached to that device? -- Peter
> > >>
> > >>these are the only hal processes running
> > >>terrarium:/usr/lib/hal# ps axjf
> > >>
> > >>/usr/sbin/hald
> > >>  2590  2591  2590  2590 ?           -1 S        0   0:00  \_ hald-runner
> > >>  2591  2597  2590  2590 ?           -1 S      105   0:00      \_
> > >> hald-addon-acpi: listening on acpid socket /var/run/acpid.socket
> > >>  2591  2603  2590  2590 ?           -1 S      105   0:00      \_
> > >> hald-addon-keyboard: listening on /dev/input/event0
> > >>  2591  2617  2590  2590 ?           -1 S        0   0:01      \_
> > >> hald-addon-storage: polling /dev/hdc
> > >>
> > >>/usr/lib/hal# usbmodules --device /proc/bus/usb/002/006    usbhid
> > >>
> > >>from dmesg:
> > >>hiddev96: USB HID v1.11 Device [Belkin UPS] on usb-0000:00:0b.0-5.3
> > >>
> > >>from messages:
> > >>Feb 23 14:17:25 terrarium kernel: usb 2-5.3: USB disconnect, address 3
> > >>Feb 23 14:22:23 terrarium kernel: usb 2-5.3: new low speed USB device
> > >>using ohci_hcd and address 6
> > >>Feb 23 14:22:23 terrarium kernel: usb 2-5.3: configuration #1 chosen 
> from
> > >>1 choice
> > >>Feb 23 14:22:23 terrarium kernel: hiddev96: USB HID v1.11 Device [Belkin
> > >>UPS] on usb-0000:00:0b.0-5.3
> > >>
> > >>
> > >>Is there anywhere else I should be looking?
> > >>
> > >>thanks
> > >>A.Lizard
> > >>
> > >>
> > >>>A.Lizard wrote:
> > >>> >
> > >>> > At 01:01 PM 2/23/07, you wrote:
> > >>> > I tried the procedure - no change.
> > >>> >
> > >>> > terrarium:/usr/lib/hal# /lib/nut/newhidups -DDD   -a belkin-ups
> > >>> > Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 
> (2.0.5)
> > >>> >
> > >>> > debug level is '3'
> > >>> > Checking device (050D/0551) (002/006)
> > >>> > - VendorID: 050d
> > >>> > - ProductID: 0551
> > >>> > - Manufacturer: unknown
> > >>> > - Product: unknown
> > >>> > - Serial Number: unknown
> > >>> > - Bus: 002
> > >>> > Trying to match device
> > >>> > Device matches
> > >>> > failed to claim USB device, trying 2 more time(s)...
> > >>> > detaching kernel driver from USB device...
> > >>> > failed to detach kernel driver from USB device...
> > >>> > trying again to claim USB device...
> > >>> > failed to claim USB device, trying 1 more time(s)...
> > >>> > detaching kernel driver from USB device...
> > >>> > failed to detach kernel driver from USB device...
> > >>> > trying again to claim USB device...
> > >>> > failed to claim USB device, trying 0 more time(s)...
> > >>> > detaching kernel driver from USB device...
> > >>> > failed to detach kernel driver from USB device...
> > >>> > trying again to claim USB device...
> > >>> > Unable to get HID descriptor (error sending control message:
> > >>> Operation not
> > >>> > permitted)
> > >>> > HID descriptor, method 2: (9 bytes) => 09 21 11 01 21 01 22 a8 01
> > >>> > HID descriptor retrieved (Reportlen = 424)
> > >>> > Unable to get Report descriptor (-1): Operation not permitted
> > >>> > Checking device (04A9/1094) (002/005)
> > >>> > - VendorID: 04a9
> > >>> > - ProductID: 1094
> > >>> > - Manufacturer: unknown
> > >>> > - Product: unknown
> > >>> > - Serial Number: unknown
> > >>> > - Bus: 002
> > >>> > Trying to match device
> > >>> > Device does not match - skipping
> > >>> > Checking device (058F/9254) (002/002)
> > >>> > - VendorID: 058f
> > >>> > - ProductID: 9254
> > >>> > - Manufacturer: unknown
> > >>> > - Product: unknown
> > >>> > - Serial Number: unknown
> > >>> > - Bus: 002
> > >>> > Trying to match device
> > >>> > Device does not match - skipping
> > >>> > Checking device (04A9/220E) (002/004)
> > >>> > - VendorID: 04a9
> > >>> > - ProductID: 220e
> > >>> > - Manufacturer: unknown
> > >>> > - Product: unknown
> > >>> > - Serial Number: unknown
> > >>> > - Bus: 002
> > >>> > Trying to match device
> > >>> > Device does not match - skipping
> > >>> > Checking device (0000/0000) (002/001)
> > >>> > - VendorID: 0000
> > >>> > - ProductID: 0000
> > >>> > - Manufacturer: unknown
> > >>> > - Product: unknown
> > >>> > - Serial Number: unknown
> > >>> > - Bus: 002
> > >>> > Trying to match device
> > >>> > Device does not match - skipping
> > >>> > Checking device (0000/0000) (001/001)
> > >>> > - VendorID: 0000
> > >>> > - ProductID: 0000
> > >>> > - Manufacturer: unknown
> > >>> > - Product: unknown
> > >>> > - Serial Number: unknown
> > >>> > - Bus: 001
> > >>> > Trying to match device
> > >>> > Device does not match - skipping
> > >>> > No appropriate HID device found
> > >>> > No matching HID UPS found
> > >>> > terrarium:/usr/lib/hal# exit
> > >>> > exit
> > >>> >
> > >>> > terrarium:/home/alizard# /lib/nut/newhidups -DDD -u root  -a 
> belkin-ups
> > >>> > Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 
> (2.0.5)
> > >>> >
> > >>> > debug level is '3'
> > >>> > Checking device (050D/0551) (002/006)
> > >>> > - VendorID: 050d
> > >>> > - ProductID: 0551
> > >>> > - Manufacturer: Belkin
> > >>> > - Product: UPS
> > >>> > - Serial Number: unknown
> > >>> > - Bus: 002
> > >>> > Trying to match device
> > >>> > Device matches
> > >>> > failed to claim USB device, trying 2 more time(s)...
> > >>> > detaching kernel driver from USB device...
> > >>> > trying again to claim USB device...
> > >>> >
> > >>> >
> > >>> > >[please, keep the traffic on the list]
> > >>> > >
> > >>> > >2007/2/23, A.Lizard <alizard at ecis.com>:
> > >>> > >>At 05:12 AM 2/23/07, you wrote:
> > >>> > >> >Not sure you've seen it, so I step up:
> > >>> > >> >
> > >>> > >> >in the "ps" output, there is: hald-addon-hid-ups
> > >>> > >> >this is an HAL addon, based upon the same code as our old 
> hidups...
> > >>> > >> >this is what I'm working on in NUT to replace.
> > >>> > >> >I've not thought at it before since I've completely disabled 
> hiddev
> > >>> > >> >support in kernel for MGE units, but any other brand that is HID
> > >>> > >> >compliant, should face it.
> > >>> > >> >
> > >>> > >> >the detach method might fail since the driver is _used_, not 
> only
> > >>> loaded!
> > >>> > >> >
> > >>> > >> >Note that the above is the reason why I've not thrown out 
> _our_ HAL
> > >>> > >> >support: we still need a way to instruct the HAL autoloaded 
> drivers
> > >>> > >> >not to run if we want to use the classic nut . And this will 
> be done
> > >>> > >> >through the new config (nut.conf -> MODE)
> > >>> > >> >
> > >>> > >> >I've no clean solution apart from removing / renaming the 
> addon...
> > >>> > >>
> > >>> > >>So I should try finding the addon and removing or renaming it?
> > >>> > >
> > >>> > >right
> > >>> > >
> > >>> > >simply unplug your UPS' USB cord
> > >>> > >rename the hald-addon-hid-ups file (should be somewhere in
> > >>> > >/usr/lib/hal ; use rpm or deb to query the content exact and path of
> > >>> > >the hal package)
> > >>> > >plug back your USB cord,
> > >>> > >retry the previous tests.
> > >>> > >
> > >>> > >Arnaud

member The Internet Society (ISOC), The HTML Writers Guild.
"You can't have in a democracy various groups with arms - you have to have 
the state with a monopoly on power." Condoleeza Rice, US Secretary of State
Personal Website http://www.ecis.com/~alizard
business Website http://www.reptilelabs.com
backup address (if ALL else fails) alizard at gmail.com
PGP 8.0 key available by request or keyserver. Download PGP from:
http://www.pgpi.org for e-mail privacy.
Disaster prep info: http://www.ecis.com/~alizard/y2k.html
***Looking for INTELLIGENT new technology public policy 
alternatives?***               http://www.ecis.com/~alizard/technology.html




More information about the Nut-upsuser mailing list