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!
что, в этот момент, показывают ps ax|grep apcupsd netstat -apn|grep apcupsd
# 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
# 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.
я не могу это воспроизвести. Если apcupsd запустился, он должен повиснуть на 127.0.0.1:3551 tcp 0 0 127.0.0.1:3551 0.0.0.0:* LISTEN 27909/apcupsd Конфиг на сколько правился ?
я неправильно запускал apctest его надо запускать при выключенном демоне apcupsd
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, быть не должно... Если в конфиге не отключить.
Кстати, дополнение. apcupsd не может повиснуть на 127.0.0.1, если ядро с vserver. Почему - не разбирался, да и 4.0 это не касается уже. С ядром с OpenVZ работает.