Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Troubleshooting apcupsd with USB
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
mmarkin
n00b
n00b


Joined: 13 Dec 2003
Posts: 43

PostPosted: Sun Mar 20, 2005 8:21 pm    Post subject: Reply with quote

Thanks for the reply, whiskeypriest. I haven't put much time into this yet (busy) but it seems like there is a problem with the slave client - the slave sees the master just fine, but the master doesn't see the slave. Probably something silly like mismatching versions of software. I'll let you know what the problem is once I get around to a full investigation.


Thanks

Mikhail
Back to top
View user's profile Send private message
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 744

PostPosted: Sat Jul 09, 2005 4:06 am    Post subject: Reply with quote

I just installed apcups (v3.10.15-r1) and I noticed an error in the /etc/apcupsd/apcupsd.conf file. Where it says:
Code:

DEVICE /dev/usb/hiddev[0-9]


I believe it should say:
Code:

DEVICE usb /dev/usb/hiddev[0-9]


I don't know if this causes any problems, as I still am having difficulty with the daemon if I restart it more than twice. The only solution to get the daemon back to normal seems to be to reboot (ugh!).

I'm also having difficulty with the shutdown-- the shutdown seems start ok but then even though I hear some things shutting off (like the hard drives-- I think), the whole computer will not shut down. And yes, my `halt' works like it is supposed to.

dq
Back to top
View user's profile Send private message
Kai Hvatum
Tux's lil' helper
Tux's lil' helper


Joined: 04 Feb 2004
Posts: 93
Location: Traveling around the US

PostPosted: Sun Jul 10, 2005 7:59 am    Post subject: Reply with quote

Sorry for threadjacking but I've one question of you power supply sages - Does Apcups work correctly with a headless server?

I have namely an ES 650VA which I'd like to setup with my server here in Missouri. The summer has given nothing but a never ending series of brownouts and I'd rather not worry about the B-Tree on my one terrabyte array being wiped out. I see there are a number of asthetic annoyances listed in this thread but I'm only concerend that the computer will succesfully shutdown and complete all outstanding hard drive commits.
_________________
Still using Gentoo, just too busy for forums these days.
Back to top
View user's profile Send private message
mmarkin
n00b
n00b


Joined: 13 Dec 2003
Posts: 43

PostPosted: Sun Jul 10, 2005 6:13 pm    Post subject: Reply with quote

I am running Apcupsd on a headless P3 666 Dell Optiplex. It is conveniently placed in one cart-like mini-table with the UPS (APC BackUPS RX1000), router, modem, printer, etc. :)
_________________
MIKHAIL MARKIN
http://www.mikhailmarkin.com
Back to top
View user's profile Send private message
Austin Wang
n00b
n00b


Joined: 28 Jul 2005
Posts: 3

PostPosted: Thu Jul 28, 2005 9:04 pm    Post subject: USB hangs when installed on kernel 2.4.28r9 Reply with quote

I recently installed a UPS XS battery backup on a dual pentium 3 server. I reconfigured my kernel with the USB configuration stated in the guide. After I emerged apcupsd, everything worked fine. I pulled the plug and the system shutdown correctly. I didn't bother with any acpi or apm stuff, since all that really mattered to me was the drives unmount before the battery runs out, which they do.

However, my kernel has become unstable now and will crash after a variable period of time, generally a few hours. It will show a screen with a whole bunch of 8 digit hex codes and then a message saying:

unable to handle kernel paging request at virtual address e0000000
printing eip:
c0151797

I dont have modules enabled in this kernel and I didn't set up hotplug into the kernel. The kernel version is 2.4.28r9. Everything is updated. Here is some hardware information:
0000:00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 03)
0000:00:07.2 USB Controller: Intel Corporation 82371AB/EB/MB PIIX4 USB (rev 01)
0000:00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 02)

Any help would be appreciated.
Thanks
Back to top
View user's profile Send private message
ectospasm
l33t
l33t


Joined: 19 Feb 2003
Posts: 711
Location: Mobile, AL, USA

PostPosted: Thu Jul 28, 2005 11:46 pm    Post subject: Re: USB hangs when installed on kernel 2.4.28r9 Reply with quote

Austin Wang wrote:
...The kernel version is 2.4.28r9...


Is there anything keeping you from trying a 2.6 kernel? That's the first thing that comes to my mind. Otherwise you might want to look for anyone else having this kernel panic. It seems pretty bad. One other thing you might try, if you have to stick with a 2.4 kernel, is try a Gentoo testing kernel (i.e. ~x86). The current ~x86 2.4 kernel is 2.4.31-r1, it may fix your problem.
_________________
Join the adopt an unanswered post initiative today
Join the EFF!
Join the Drug Policy Alliance!
Back to top
View user's profile Send private message
Austin Wang
n00b
n00b


Joined: 28 Jul 2005
Posts: 3

PostPosted: Fri Jul 29, 2005 4:45 pm    Post subject: Reply with quote

I'm helping to maintain a cluster right now and it would be a hassle to update all the nodes and software to be compatible with kernel 2.6, not to mention a lot of money, so I'd like to avoid that if possible. I noticed in the guide by whiskypriest that USB should be loaded as a module so I think I'll try that first. If anyone still knows how to fix the kernel panic problem please post anyway.

Thanks,
Austin
Back to top
View user's profile Send private message
mrsastro
n00b
n00b


Joined: 15 Feb 2006
Posts: 2
Location: Baltimore, MD USA

PostPosted: Sat Feb 25, 2006 8:32 am    Post subject: thanks Reply with quote

Thanks much for the excellent HOWTO. I emerged apcupsd-3.10.18-r1 on my AMD64 system (quad Opteron on a Tyan S4882-D, 2.6.15-gentoo-r5 kernel) and in almost no time at all had my APC Smart-UPS 1500VA under the control of apcupsd. And much to my pleasant surprise (based on the posts herein), after pulling the UPS plug from the wall my UPS powered down automatically (after my system halted). I plugged the UPS back into the mains, my UPS powered back up again, and then my system powered back up as well. My thanks to you for writing this guide, and to everyone who pushed the upgrades of apcupsd along so that I could experience such a trouble-free installation.
Back to top
View user's profile Send private message
skwang
Tux's lil' helper
Tux's lil' helper


Joined: 12 May 2004
Posts: 149
Location: Chicago, IL

PostPosted: Sun Mar 05, 2006 3:21 am    Post subject: Reply with quote

I am having the problem that apcupsd does not actually power off the computer, nor does it turn off the UPS.

First the hardware and software:
    AMD64 machine running gentoo-sources 2.6.15-gentoo-r5
    APC BK500CS UPS with computer<-UBS<-cable->RJ45-10->UPS
    Installed sys-power/apcupsd-3.10.18-r1


After reading the Wiki HOWTO and seting up apcupsd on my computer I managed to get the daemon to run and communicating with the UPS. What doesn't work is when I do the full power down test. I set the TIMEOUT in /etc/apcupsd/apcupsd.conf to 120 seconds and then pull the power plug of the UPS from the socket. I tail -f /var/log/apcupsd.events to watch what happens. After two minutes the UPS begins the shutdown sequence. I get to "system halted" but the power doesn't turn off, and the UPS does not turn off either. I also get someerror messages.
[These don't appear in any logs so I scribbed down the pertinent parts and and writing this from memory.]
Code:

* Signaling ups driver(s) to kill the load!
Apccontrol doing: /usr/sbin/apcupsd --killpower on UPS
/etc/apcupsd/apccontrol: line 63: /usr/sbin/apcupsd: No such file or directory
/etc/apcupsd/apccontrol: line 64: wall: command not found
* Halt system and wait for UPS to kill our power
System halted.


I waited for five minutes just to make sure. During that time nothing happened, both the machine and UPS stayed on.

The HOWTO and Forum Threads indicated I should try: shutdown -h now. I turned off apcupsd with /etc/init.d/apcupsd stop. Even though apcupsd is not running I still get the exact same behavior (hangs at halt) AND the above error messages about apcupsd.

The HOWTO also said that my kernel configuration is probably the issue. So here is the power management section of my kernel config.
Code:

#
# Power management options
#
CONFIG_PM=y
CONFIG_PM_LEGACY=y
# CONFIG_PM_DEBUG is not set
CONFIG_SOFTWARE_SUSPEND=y
CONFIG_PM_STD_PARTITION=""
CONFIG_SUSPEND_SMP=y

#
# ACPI (Advanced Configuration and Power Interface) Support
#
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_SLEEP_PROC_FS=y
CONFIG_ACPI_SLEEP_PROC_SLEEP=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
# CONFIG_ACPI_VIDEO is not set
CONFIG_ACPI_HOTKEY=m
CONFIG_ACPI_FAN=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_THERMAL=y
CONFIG_ACPI_NUMA=y
# CONFIG_ACPI_ASUS is not set
# CONFIG_ACPI_IBM is not set
CONFIG_ACPI_TOSHIBA=y
CONFIG_ACPI_BLACKLIST_YEAR=2001
# CONFIG_ACPI_DEBUG is not set
CONFIG_ACPI_EC=y
CONFIG_ACPI_POWER=y
CONFIG_ACPI_SYSTEM=y
CONFIG_ACPI_CONTAINER=y

I have also uploaded the full kernel config elsewhere for brevity. I believe I have configured my kernel correctly, although I could be wrong.

Other notes: 1) Before I installed apcupsd a shutdown/halt of the machine would work. 2) I read through this forum post and the previous "HOWTO" forum post but I didn't see this exact problem. If this has already been solved and I just missed it, please accept my apologies and point me to the solution.

Thanks in advance for any assistance.
Back to top
View user's profile Send private message
dashnu
l33t
l33t


Joined: 21 Jul 2004
Posts: 703
Location: Casco Maine

PostPosted: Wed Jun 21, 2006 4:19 pm    Post subject: Reply with quote

I posted in the original topic going to try here in hopes to get some more traction.

platojones wrote:
Quote:
Anybody else getting this lately. I don't know when it started happening, but I just noticed it while doing a ps:

Code:

root 8585 10943 0 10:43 ? 00:00:00 [apcupsd] <defunct>
root 8587 20641 0 10:43 pts/1 00:00:00 grep apcupsd


I haven't done a test to see if it actually still works (though it did a few days ago when I had a real power glitch), but it is annoying.



Any fix for this yet? I get this on my Master and 4 slaves.. Pain in the but.. leaves crap proc entries around also.

None of my network slaves report the correct time.... they all say

Wed Dec 31 19:00:00 EST 1969

Anyone see this?

Also I have a APC room monitoring Card can apcupsd interact with it?

I need something to shut down my servers if the AC dies. What do people use for this??

TIA
_________________
write quit bang
Back to top
View user's profile Send private message
fbarton
n00b
n00b


Joined: 08 Aug 2006
Posts: 1

PostPosted: Tue Aug 08, 2006 6:51 pm    Post subject: USB Detection Reply with quote

I've gotten apcupsd working nicely with my APC Back-UPS CS 350 using USB, however I'm having one little problem:

When I power on my machine, the UPS is not detected until I unplug, and then re-plug it in via UPS (it's not listed in /proc/bus/usb/devices, and apcupsd doesn't start) (I am using the APC provided cable, plugged directly into the computer)

I use coldplug on boot, and have usbhid listed in my modules.autoload file

lsmod before and after unplugging and replugging shows no difference

The obvious workaround is to unplug it, replug it, zap and then start apcupsd every time the server comes up.

Does anybody have any ideas what I could do to fix this?
Back to top
View user's profile Send private message
skwang
Tux's lil' helper
Tux's lil' helper


Joined: 12 May 2004
Posts: 149
Location: Chicago, IL

PostPosted: Fri Aug 18, 2006 9:44 pm    Post subject: Reply with quote

@fbarton

Stupid question for you. You are starting apcupsd on startup right? That is you've set:
Code:
rc-update add apcupsd default


Could you post your "dmesg" output online someone and link it to the forums? That might help people diagnoise the problem.
Back to top
View user's profile Send private message
tp11235
n00b
n00b


Joined: 22 Aug 2006
Posts: 35
Location: England

PostPosted: Sun Oct 08, 2006 4:17 pm    Post subject: Similar issue for me - daemon says it cannot locate UPS Reply with quote

I have been getting some help on another thread but now I'm stuck so I thought I'd come to the experts.

I installed the apcupsd software, no problem. When I start it with "/etc/init.d/apcupsd start" I get an [ok] report.
However, the log (apcupsd.events) shows this:

Sun Oct 08 16:11:27 GMT 2006 apcupsd error shutdown completed
Sun Oct 08 16:12:54 GMT 2006 apcupsd FATAL ERROR in linux-usb.c at line 597
Cannot find UPS device --
For a link to detailed USB trouble shooting information,
please see <http://www.apcupsd.com/support.html>.
Sun Oct 08 16:12:55 GMT 2006 apcupsd error shutdown completed

The USB system seems to recognise the UPS, this is what I get from

cat /proc/bus/usb/devices

T: Bus=02 Lev=01 Prnt=01 Port=01 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= 0.06
S: Manufacturer=American Power Conversion
S: Product=Back-UPS CS 500 FW:808.q5.I USB FW:q5
S: SerialNumber=BB0529020096
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=(none)
E: Ad=81(I) Atr=03(Int.) MxPS= 6 Ivl=100ms

I tried the suggested link for advice, but the webpage was no longer available.

I followed the advice in WhiskeyPriest's HOW-To and unplugged and replugged the cable and my main system log showed this:

Oct 8 16:28:47 [kernel] usb 2-2: USB disconnect, address 4
Oct 8 16:29:44 [kernel] ohci_hcd 0000:00:10.0: wakeup
Oct 8 16:29:44 [kernel] usb 2-2: new low speed USB device using ohci_hcd and address 5
Oct 8 16:29:45 [kernel] usb 2-2: configuration #1 chosen from 1 choice

There is a DEVICE setting in the apcupsd.conf file and I have tried many variations on /dev/bus/usb etc but to no avail. Whiskeypriest said his was commented out for autodetection, but this does not work either.

Any ideas?

Cheers

Tim.
Back to top
View user's profile Send private message
tp11235
n00b
n00b


Joined: 22 Aug 2006
Posts: 35
Location: England

PostPosted: Sat Oct 14, 2006 4:40 pm    Post subject: Problem solved Reply with quote

The system is working perfectly now.

I checked out the documentation at:
http://www.apcupsd.org/

I cannot find the precise place again, but I got a hint that the UPS daemon treats the UPS as a USB HID (Human Interface Device). I have no USB mouse or keyboard on my server so I had excluded the support for HID from the kernel.

As soon as put it back in the daemon worked perfectly.

In summary: make sure that USB support is compiled into the daemon when you build it then make sure you have USB HID support in the kernel. After that just follow WhiskeyPriest's HOW-TO.

Cheers

Tim.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum