Bug 11978

Summary: apcupsd неработает error
Product: Branch 3.0 Reporter: noc <noc>
Component: apcupsdAssignee: Sergey Y. Afonin <asy>
Status: CLOSED FIXED QA Contact: at <at>
Severity: major    
Priority: P2    
Version: 3.0   
Hardware: all   
OS: Linux   

Description noc 2007-06-06 11:06:05 MSD
ALTLinux-4.0 Server x86_64
После инсталяции  apcupsd запускаеться нормально

/etc/init.d/apcupsd status
FATAL ERROR in apcaccess.c at line 271
tcp_open: cannot connect to server localhost on port 3551.
ERR=Connection refused

#apctest
Checking configuration ...
Attached to driver: usb
sharenet.type = DISABLE
cable.type = USB_CABLE

You are using a USB cable type, so I'm entering USB test mode
mode.type = USB_UPS
Setting up the port ...
apctest FATAL ERROR in device.c at line 70
Unable to create UPS lock file.
  If apcupsd or apctest is already running,
  please stop it and run this program again.
apctest error termination completed
Checking configuration ...
Attached to driver: usb
sharenet.type = DISABLE
cable.type = USB_CABLE

Steps to Reproduce:
1.apt-get install acpupsd
2.apcupsd status
3.apctest
Actual Results:  
dont work!

Expected Results:  
must work!
Comment 1 Sergey Y. Afonin 2007-06-06 11:20:04 MSD
что, в этот момент, показывают
ps ax|grep apcupsd
netstat -apn|grep apcupsd
Comment 2 noc 2007-06-06 16:21:39 MSD
 # ps ax|grep apcupsd
 3073 ?        Ss     0:00 /sbin/apcupsd -f /etc/apcupsd/apcupsd.conf
 3194 pts/0    S+     0:00 grep apcupsd

netstat -apn|grep apcupsd
unix  2      [ ]         DGRAM                    8452   3073/apcupsd
Comment 3 noc 2007-06-06 16:24:00 MSD
# apcupsd -d 10
0.000 apcupsd: apcupsd.c:220 Options parsed.
0.000 apcupsd: apcupsd.c:243 Config file /etc/apcupsd/apcupsd.conf processed.
0.000 apcupsd: apcupsd.c:262 Attached to driver: usb
apcupsd FATAL ERROR in device.c at line 70
Unable to create UPS lock file.
  If apcupsd or apctest is already running,
  please stop it and run this program again.
Comment 4 Sergey Y. Afonin 2007-06-06 16:48:13 MSD
я не могу это воспроизвести. Если apcupsd запустился, он должен повиснуть на 
127.0.0.1:3551

tcp   0   0 127.0.0.1:3551    0.0.0.0:*     LISTEN      27909/apcupsd

Конфиг на сколько правился ?
Comment 5 noc 2007-06-06 17:00:58 MSD
я неправильно запускал apctest
его надо запускать при выключенном демоне apcupsd

Comment 6 Sergey Y. Afonin 2007-06-06 17:12:41 MSD
apctest apctest-ом, я до этого что-то и не дошёл. :-) Я смотрел вот на это:

/etc/init.d/apcupsd status
FATAL ERROR in apcaccess.c at line 271
tcp_open: cannot connect to server localhost on port 3551.
ERR=Connection refused

Такого, при запущенном apcupsd, быть не должно... Если в конфиге не отключить.
Comment 7 Sergey Y. Afonin 2008-03-07 00:37:31 MSK
Кстати, дополнение. apcupsd не может повиснуть на 127.0.0.1, если ядро с
vserver. Почему - не разбирался, да и 4.0 это не касается уже. С ядром с OpenVZ
работает.