I almost had nut_2.0.5-3_i386.deb (from http://packages.debian.org/unstable/admin/nut - installed via dpkg, not via repository) working: * problems with getting it to come up during boot * monitoring via knutclient was OK * shutdown on low battery worked adequately, if not quite as described) and newhidups suddenly stopped talking to my Belkin F6C550-AVR . It's only been in use for a couple of months, so I doubt it's a hardware problem. And in general, the USB setup works, my printer runs just fine. also installed - nut-usb nut-dev (2.0.5-3) Computer hardware: Biostar Geforce 6100 AM2 (integrated motherboard nvidia chipsets) OS: Debian Etch terrarium:/home/alizard/install# uname -a Linux terrarium 2.6.18-3-486 #1 Mon Dec 4 15:59:52 UTC 2006 i686 GNU/Linux thanks A.Lizard terrarium:/etc/default# /lib/nut/newhidups -DD port=auto Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.0.5) Checking device (050D/0551) (001/008) - VendorID: 050d - ProductID: 0551 - Manufacturer: unknown - Product: unknown - Serial Number: unknown - Bus: 001 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 retrieved (Reportlen = 424) Unable to get Report descriptor (-1): Operation not permitted 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 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@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
This looks like another driver is already attached to your Belkin. Perhaps you already have a copy of newhidups running in the background, or perhaps as a zombie process left over from previous experiments. Try ps -ef | grep ups to see what is running, and kill it if necessary. -- Peter A.Lizard wrote:> > I almost had nut_2.0.5-3_i386.deb (from > http://packages.debian.org/unstable/admin/nut - installed via dpkg, not via > repository) working: > > * problems with getting it to come up during boot > * monitoring via knutclient was OK > * shutdown on low battery worked adequately, if not quite as described) > > and newhidups suddenly stopped talking to my Belkin F6C550-AVR . It's only > been in use for a couple of months, so I doubt it's a hardware problem. And > in general, the USB setup works, my printer runs just fine. > > also installed - nut-usb nut-dev (2.0.5-3) > > Computer hardware: > Biostar Geforce 6100 AM2 (integrated motherboard nvidia chipsets) > OS: Debian Etch > terrarium:/home/alizard/install# uname -a > Linux terrarium 2.6.18-3-486 #1 Mon Dec 4 15:59:52 UTC 2006 i686 GNU/Linux > > > thanks > A.Lizard > > terrarium:/etc/default# /lib/nut/newhidups -DD port=auto > Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.0.5) > > Checking device (050D/0551) (001/008) > - VendorID: 050d > - ProductID: 0551 > - Manufacturer: unknown > - Product: unknown > - Serial Number: unknown > - Bus: 001 > 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 retrieved (Reportlen = 424) > Unable to get Report descriptor (-1): Operation not permitted > > 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 > 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@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 > > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser@lists.alioth.debian.org > http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser >
[please, keep the traffic on the list] 2007/2/23, A.Lizard <alizard@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 -- Linux / Unix Expert - MGE UPS SYSTEMS - R&D Dpt Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/ Debian Developer - http://people.debian.org/~aquette/ OpenSource Developer - http://arnaud.quette.free.fr/
On 2/27/07, A.Lizard <alizard@ecis.com> wrote:> At 04:48 AM 2/27/07, you wrote: > >On 2/27/07, A.Lizard <alizard@ecis.com> wrote: > >>and "upsd gets a 'connection refused' message" was a typo, I meant *upsc* . > >>I haven't tried running upsd since building the wrong source package. > > > >upsc connects to upsd (this is the network portion of "Network UPS > >Tools"), so upsd needs to be running or else you will get a > >"connection refused" message from upsc. > > > >upsd also connects to the individual drivers, as Arjen as pointed out. > > > >-- > >- Charles Lepple > > interesting... so I tried this and got: > > terrarium:/home/alizard# /usr/local/ups/sbin/upsd -u root > Network UPS Tools upsd 2.0.5-pre2 > /usr/local/ups/etc/upsd.conf is world readable > Connected to UPS [belkin-ups]: belkin-ups > /usr/local/ups/etc/upsd.users is world readable > terrarium:/home/alizard# > > and knutclient suddenly started displaying. > > Afterwards, I tried: > 2469 ? 00:00:00 upsd > 2515 pts/1 00:00:00 ps > terrarium:/home/alizard# kill -9 2469 > terrarium:/home/alizard# /etc/init.d/nut start > Starting Network UPS Tools: (upsdrvctl failed). > terrarium:/home/alizard# /etc/init.d nut stop > bash: /etc/init.d: is a directory > terrarium:/home/alizard# /etc/init.d/nut stop > Stopping Network UPS Tools: (upsdrvctl failed) upsd upsmon. > terrarium:/home/alizard# /usr/local/ups/sbin/upsd -u root > Network UPS Tools upsd 2.0.5-pre2 > /usr/local/ups/etc/upsd.conf is world readable > Connected to UPS [belkin-ups]: belkin-ups > /usr/local/ups/etc/upsd.users is world readable > > [note - I have root , nut , alizard entries in upsd.users ]upsd.users lists roles - they don't have to be named like the system users such as root or nut. The "-u" parameter for the daemons is for overriding the choice of the "nut" system user.> terrarium:/home/alizard# /usr/local/ups/sbin/upsd -u alizard > Network UPS Tools upsd 2.0.5-pre2 > Can't chdir to /var/state/ups: Permission deniedRight, permissions are usually restricted to the nut system user on that directory.> terrarium:/home/alizard# /usr/local/ups/sbin/upsd -u nut > Network UPS Tools upsd 2.0.5-pre2 > /usr/local/ups/etc/upsd.conf is world readable > Can't connect to UPS [belkin-ups] (belkin-ups): Permission deniedThis is also expected, since it sounds like you still have the driver running with "-u root". -- - Charles Lepple
[for general debugging like this, please keep the list copied.] On 2/27/07, A.Lizard <alizard@ecis.com> wrote:> At 05:09 AM 2/27/07, you wrote: > >On 2/27/07, A.Lizard <alizard@ecis.com> wrote: > >>At 04:48 AM 2/27/07, you wrote: > >> >On 2/27/07, A.Lizard <alizard@ecis.com> wrote: > >> >>and "upsd gets a 'connection refused' message" was a typo, I meant > >> *upsc* . > >> >>I haven't tried running upsd since building the wrong source package. > >> > > >> >upsc connects to upsd (this is the network portion of "Network UPS > >> >Tools"), so upsd needs to be running or else you will get a > >> >"connection refused" message from upsc. > >> > > >> >upsd also connects to the individual drivers, as Arjen as pointed out. > >> > > >> >-- > >> >- Charles Lepple > >> > >>interesting... so I tried this and got: > >> > >>terrarium:/home/alizard# /usr/local/ups/sbin/upsd -u root > >>Network UPS Tools upsd 2.0.5-pre2 > >>/usr/local/ups/etc/upsd.conf is world readable > >>Connected to UPS [belkin-ups]: belkin-ups > >>/usr/local/ups/etc/upsd.users is world readable > >>terrarium:/home/alizard# > >> > >>and knutclient suddenly started displaying. > >> > >>Afterwards, I tried: > >> 2469 ? 00:00:00 upsd > >> 2515 pts/1 00:00:00 ps > >>terrarium:/home/alizard# kill -9 2469 > >>terrarium:/home/alizard# /etc/init.d/nut start > >>Starting Network UPS Tools: (upsdrvctl failed). > >>terrarium:/home/alizard# /etc/init.d nut stop > >>bash: /etc/init.d: is a directory > >>terrarium:/home/alizard# /etc/init.d/nut stop > >>Stopping Network UPS Tools: (upsdrvctl failed) upsd upsmon. > >>terrarium:/home/alizard# /usr/local/ups/sbin/upsd -u root > >>Network UPS Tools upsd 2.0.5-pre2 > >>/usr/local/ups/etc/upsd.conf is world readable > >>Connected to UPS [belkin-ups]: belkin-ups > >>/usr/local/ups/etc/upsd.users is world readable > >> > >>[note - I have root , nut , alizard entries in upsd.users ] > > > >upsd.users lists roles - they don't have to be named like the system > >users such as root or nut. > > > >The "-u" parameter for the daemons is for overriding the choice of the > >"nut" system user. > > > >>terrarium:/home/alizard# /usr/local/ups/sbin/upsd -u alizard > >>Network UPS Tools upsd 2.0.5-pre2 > >>Can't chdir to /var/state/ups: Permission denied > > > >Right, permissions are usually restricted to the nut system user on > >that directory. > > > >>terrarium:/home/alizard# /usr/local/ups/sbin/upsd -u nut > >>Network UPS Tools upsd 2.0.5-pre2 > >>/usr/local/ups/etc/upsd.conf is world readable > >>Can't connect to UPS [belkin-ups] (belkin-ups): Permission denied > > > >This is also expected, since it sounds like you still have the driver > >running with "-u root". > > I haven't been able to get it to run any other way - newhidups outputs > (non-root and root) below.Right. The fact that it works when both the driver and upsd are passed "-u root" points to a permissions problem. Basically, you need to pass the same system user to "-u" on both the driver and upsd. Users in ups.users are not connected to the system user IDs, but they are one part of the system used to prevent random users from being able to shut down the system. -- - Charles Lepple
As I said earlier, I got it working using the -u root option. I'm running on the Debian distribution. Upon upsmon -c fsd , it shuts down the workstation, but NOT the UPS. In order to shut down both, I first tried Peter Selinger's shutdown patch for init.d halt : note: program locations reflect where nut*.deb puts things in the Debian filesystem. if [ -f /etc/killpower ] ; then # if USB is already disabled, re-enable it. if [ ! -f /proc/bus/usb/devices ]; then echo "Mounting USB filesystem" mount -t usbfs usbfs /proc/bus/usb fi # hotplugging is probably off, so run driver as -u root echo "Killing the power, bye!" /lib/nut/newhidups -u root -k belkin-ups sleep 20 # uh oh... the UPS power-off failed # you probably want to reboot here so you don't get stuck! # *** see the section on power races in shutdown.txt! *** echo "Rebooting." reboot fi I tried inserting it: # See if we need to cut the power. if [ "$INIT_HALT" = "POWEROFF" ] && [ -x /etc/init.d/ups-monitor ] then /etc/init.d/ups-monitor poweroff fi before and after /etc/init.d/ups-monitor poweroff. I then tried changing the ups-monitor script: original version: poweroff) flag=`sed -ne 's#^ *POWERDOWNFLAG *\(.*\)$#\1#p' /etc/nut/upsmon.conf` wait_delay=`sed -ne 's#^ *POWEROFF_WAIT= *\(.*\)$#\1#p' /etc/default/nut` if [ -f "$flag" ] ; then if /sbin/upsmon -K >/dev/null 2>&1 ; then echo "Shutting down the UPS ..." sleep 1 # if /sbin/upsdrvctl shutdown ; then I tried changing: if /sbin/upsdrvctl -u root shutdown ; then That failed. I then tried changing the above line to: if /lib/nut/newhidups -a belkin-ups -k ; then What I got was hundreds of iterations of "did not claim interface 0 before use" if /lib/nut/newhidups -a belkin-ups -k ; then Note: /sbin/upsdrvctl -u root [command] belkin-ups works for: start stop but NOT shutdown I decided that if things are to the point where I'm trying to modify ups-monitor, it's time for me to ask for help. thanks A.Lizard 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@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
Apparently Analagous Threads
- printing device node name (was Re: [Nut-upsuser] nut suddenly stopped working...)
- Belkin F6C100-UNV + newhidups
- Configuring a server without an UPS attached
- New batteries and another attempt to get nut running
- right problem with ups belkin (model who work with nut)