Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: SoftDux on March 20, 2008, 11:16:14 PM
-
I have a Powercom BNT-1000 serail UPS, and tried to connect to the it with Nut, as per the Wiki Page (http://wiki.contribs.org/Uninterruptable_Power_Supply)
When I try and connect to it, with upsc UPS@localhost
I get "Error: Data Stale" error and nothing happens.
/var/log/messages give me the following:
Mar 21 00:15:00 intranet upsmon[5906]: Poll UPS [UPS@localhost] failed - Data stale
Mar 21 00:15:04 intranet powercom[5897]: data receiving error (-1 instead of 11 bytes)
Mar 21 00:15:05 intranet upsmon[5906]: Poll UPS [UPS@localhost] failed - Data stale
Mar 21 00:15:09 intranet powercom[5897]: data receiving error (-1 instead of 11 bytes)
Mar 21 00:15:10 intranet upsmon[5906]: Poll UPS [UPS@localhost] failed - Data stale
Mar 21 00:15:14 intranet powercom[5897]: data receiving error (-1 instead of 11 bytes)
Mar 21 00:15:15 intranet upsmon[5906]: Poll UPS [UPS@localhost] failed - Data stale
Mar 21 00:15:19 intranet powercom[5897]: data receiving error (-1 instead of 11 bytes)
Mar 21 00:15:20 intranet upsmon[5906]: Poll UPS [UPS@localhost] failed - Data stale
Mar 21 00:15:24 intranet powercom[5897]: data receiving error (-1 instead of 11 bytes)
Mar 21 00:15:25 intranet upsmon[5906]: Poll UPS [UPS@localhost] failed - Data stale
Is this a bug? Should I report it in the bugtracker? OR am I doing something wrong?
-
I have a Powercom BNT-1000 serail UPS, and tried to connect to the it with Nut, as per the Wiki Page (http://wiki.contribs.org/Uninterruptable_Power_Supply)
That is extremely vague, the wiki has multiple settings.
Let's see if you set it up correctly and then determine if you misconfigured, your UPS isn't supported or if in fact you have found a bug.
Please show the output of (truncate or xxx your master and slave passwords please):
config show nut
Edit: Also show:
cat /etc/ups/ups.conf
-
[root@intranet home]# config show nut
nut=service
Device=/dev/ttyS0
MasterPass=478659948889749
Model=powercom
SlavePass=171161620307504
status=enabled
[root@intranet home]# cat /etc/up
updatedb.conf ups/ upsmon/
[root@intranet home]# cat /etc/ups/ups.conf
#------------------------------------------------------------
# !!DO NOT MODIFY THIS FILE!!
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at http://www.contribs.org/development/
#
# Copyright (C) 1999-2006 Mitel Networks Corporation
#------------------------------------------------------------
[UPS]
driver = powercom
port = /dev/ttyS0
Here's the commands I used to set it up:
config setprop nut Model powercom
config setprop nut Device /dev/ttyS0
config setprop nut status enabled
config show nut
expand-template /etc/sysconfig/ups
expand-template /etc/ups/*
/etc/rc7.d/S15nut start
upsc UPS@localhost
So, I had to modify the commands from the Wiki slightly, since I have a powercom and not a apcsmart UPS
-
SoftDux
try the other driver possibility
ULT-1000 = megatec
/etc/rc7.d/S15nut start
On a sme7.3 server, shouldn't that be
/etc/rc7.d/S38nut start
-
Hi RayMitchell
That driver didn't work:
Mar 21 23:00:36 intranet upsmon[9668]: Poll UPS [UPS@localhost] failed - Driver not connected
Mar 21 23:00:51 intranet last message repeated 3 times
Mar 21 23:00:55 intranet upsd[9663]: Connection from 127.0.0.1
Mar 21 23:00:55 intranet upsd[9663]: Client on 127.0.0.1 logged out
Mar 21 23:00:56 intranet upsmon[9668]: Poll UPS [UPS@localhost] failed - Driver not connected
Mar 21 23:00:57 intranet upsd[9663]: Connection from 127.0.0.1
Mar 21 23:00:57 intranet upsd[9663]: Client on 127.0.0.1 logged out
Mar 21 23:00:58 intranet upsd[9663]: Connection from 127.0.0.1
Mar 21 23:00:58 intranet upsd[9663]: Client on 127.0.0.1 logged out
Mar 21 23:01:01 intranet upsmon[9668]: Poll UPS [UPS@localhost] failed - Driver not connected
I also tried the genericups driver with the same results
-
WARNING!!! DISCONNECT your computer power cord from the UPS and attach 1 low wattage lamp BEFORE testing any of the following scenarios!!!
The powercom driver has 6 types of UPS's that it is written for and named after the first modelname that was coded for each protocol. They are as follows(see "man powercom" for details):
Trust (default)
Egys
KIN252AP
KIN1500AP
KIN2200AP
KP625AP
So in essence, powercom actually consists of 6 different protocols. The problem with this driver is the current template doesn't allow you to set a different type (even though there is a db setting for "Type") so you will have to try these by manually editing /etc/ups/ups.conf until you find a combination that works. If one of them works, you will need to create a custom template and then PLEASE open a new bug in the bugracker so the code can be updated to accommodate this parameter.
OTOH, genericups has 23 different protocols and requires that you indicate which one you want to use. This parameter (upstype) is built into the template and must be set if you want to try to use the genericups driver. The choices are 0 through 22 (see "man genericups")
So, to use the genericups driver you MUST set another parameter that is "upstype" but this is a little confusing because the db value for this is Type (don't ask me why) (and no, this db value won't work on the powercon driver even though the value there IS "type")
config setprop nut Model genericups
config setprop nut Type X <this must be from 0 to 22>
/etc/rc7.d/S38nut stop
WAIT 5 SECONDS
/etc/rc7.d/S38nut start
I always recommend you use the "stop" WAIT "start" sequence between each test to fully unload the old driver and fully load the new one. Watch the output at each "start" and you will know immediately if the driver loads and communicates with the UPS.