Problem to get data from UPS (nut "Error: Data stale")

Hi friends! I have a problem. I configured sysutils/nut for UPS and when I want get data from UPS (serial cable) getting error.

# upsc King@localhost
Code:
Error: Data stale

I have "Powercom 1500 King UPS" and FreeBSD 9.3 RELEASE x64. In configuration file ups.conf I using:
Code:
[King]
  driver = powercom
  port = /dev/cuau0
When I restart service "nut" I getting:

# /usr/local/etc/rc.d/nut restart
Code:
Stopping nut.
Waiting for PIDS: 1099.
Network UPS Tools - UPS driver controller 2.7.3
Network UPS Tools - UPS driver controller 2.7.3
Network UPS Tools - PowerCom protocol UPS driver 0.14 (2.7.3)
data receiving error (0 instead of 11 bytes)
Starting nut.
Network UPS Tools upsd 2.7.3
fopen /var/db/nut/upsd.pid: No such file or directory
/usr/local/etc/nut/upsd.conf is world readable
listening on 127.0.0.1 port 3493
Connected to UPS [King]: powercom-King
/usr/local/etc/nut/upsd.users is world readable
# ls -l /var/db/nut/
Code:
total 16
srw-rw----  1 uucp  uucp  0  1 січ 22:57 powercom-King
-rw-r--r--  1 uucp  uucp  6  1 січ 22:57 powercom-King.pid
-rw-r--r--  1 uucp  uucp  6  1 січ 22:57 upsd.pid
-rw-r--r--  1 root  uucp  5 30 гру 21:20 upslog.pid
-rw-r--r--  1 root  uucp  5 30 гру 21:20 upsmon.pid

I give group wheel permission on /var/db/nut/upsd.pid, but after restart nut permission change to only user and group uucp. What is wrong?
 
Last edited by a moderator:
Ownerships changing to uucp might not be a problem. Word stale would indicate a communication problem. Does /usr/local/ups/sbin/upsdrvctl start show what it should be?

Juha
 
Hi.
# /usr/local/sbin/upsdrvctl start
Code:
Network UPS Tools - UPS driver controller 2.7.3
Network UPS Tools - PowerCom protocol UPS driver 0.14 (2.7.3)
Duplicate driver instance detected! Terminating other driver!
data receiving error (0 instead of 11 bytes)

Broadcast Message from andrian@freebsd
  (no tty) at 16:45 EET...

Communications with UPS kin@localhost established


Broadcast Message from andrian@freebsd
  (no tty) at 16:45 EET...

Communications with UPS kin@localhost lost
 
Last edited by a moderator:
I change name "kin" in config files, but no data from ups.
# ps -aux | grep uucp
Code:
root  30595  0,0  0,1  16324  2228  0  R+  9:52  0:00,00 grep uucp

# /usr/local/sbin/upsdrvctl start
Code:
Network UPS Tools - UPS driver controller 2.7.3
Network UPS Tools - PowerCom protocol UPS driver 0.14 (2.7.3)
data receiving error (0 instead of 11 bytes)

# ps -aux | grep uucp
Code:
uucp  30670  0,0  0,1  16468  2272 ??  Ss  9:53  0:00,00 /usr/local/libexec/nut/powercom -a king
root  30714  0,0  0,1  16324  2252  0  S+  9:53  0:00,01 grep uucp

# /usr/local/etc/rc.d/nut start
Code:
Network UPS Tools - UPS driver controller 2.7.3
Network UPS Tools - PowerCom protocol UPS driver 0.14 (2.7.3)
Duplicate driver instance detected! Terminating other driver!
data receiving error (0 instead of 11 bytes)
Starting nut.
Network UPS Tools upsd 2.7.3
fopen /var/db/nut/upsd.pid: No such file or directory
/usr/local/etc/nut/upsd.conf is world readable
listening on 127.0.0.1 port 3493
Connected to UPS [king]: powercom-king
/usr/local/etc/nut/upsd.users is world readable

# ps -aux | grep uucp
Code:
uucp  30782  0,0  0,1  16468  2272 ??  Ss  9:54  0:00,02 /usr/local/libexec/nut/powercom -a king
uucp  30784  0,0  0,1  18340  2140 ??  Ss  9:54  0:00,01 /usr/local/sbin/upsd
root  30968  0,0  0,1  16324  2252  0  S+  9:55  0:00,00 grep uucp
root@freebsd:/usr/local/etc/nut #

I not see upslog and upsmon in process list and I run theirs manually.
 
Last edited by a moderator:
Back
Top