[Nut-upsuser] Problems starting upsd
tehnic at occidentalconsulting.com
tehnic at occidentalconsulting.com
Mon May 28 09:53:36 UTC 2007
Hello list,
I'm fresh in using an ups for shutting down a linux server and i was
thinking someone could give a hand at debugging a problem i stumbled to.
I'm used to the redhat type of distribution, mainly centos 4/5, and
off-course i installed nut and nut-client from the available rpm packages.
After some reading i disconnected the server from the power supplied by
the ups and proceeded in setting it up in the configuration files after i
plugged the server directly to the outlet.
The ups is a unknown brand and after some googling i've found out that it
uses the fenton driver. I saw the warning that says the fenton driver will
be removed and the megatec one replaces it so i tried with the megatec
driver instead.
All configuration went smooth and the megatec driver recognized the ups
and all was working fine. So i reconnected the server to the ups. And at
start-up i started to receive some weird messages that warned me the
connection to the ups was lost.
The ups is connected to the server through a serial cable on ttyS1.
Here's what's happening when i try to start the ups daemon:
[root at corporate log]# [root at corporate all]# service ups start
Starting megatec: Network UPS Tools - Megatec protocol driver 1.5 (2.0.5)
Carlos Rodrigues (c) 2003-2006
Megatec protocol UPS detected [ Pro 1400 4.01p].
[ OK ]
Starting upsd: Network UPS Tools upsd 2.0.5
Can't connect to UPS [upguards] (upguards): No such file or directory
[ OK ]
Starting UPS monitor (master): Network UPS Tools upsmon 2.0.5
UPS: upguards at localhost (master) (power value 1)
Using power down flag file /etc/killpower
[ OK ]
[root at corporate all]#
Broadcast message from nut (Mon May 28 12:41:24 2007):
Communications with UPS upguards at localhost lost
Broadcast message from nut (Mon May 28 12:41:29 2007):
UPS upguards at localhost is unavailable
[root at corporate all]#
The ups.conf file contains only these lines:
[upguards]
driver = megatec
port = /dev/ttyS1
desc = "UPguardS Pro 1400"
The funny thing is that when the power to the server was not supplied by
the ups all worked fine but when i go through the ups the daemon fails.
I've checked permissions, and i have the user nut that is in the group
uucp and that group can read and write to ttyS1
I cannot seem to find who is causing the No such file or directory error
message when the daemon starts up.
Another weird thing is if i start the driver manually and then the daemon
all is fine and working !
Here's what i'm talking about:
[root at corporate ups]# upsdrvctl start upguards
Network UPS Tools - UPS driver controller 2.0.5
Network UPS Tools - Megatec protocol driver 1.5 (2.0.5)
Carlos Rodrigues (c) 2003-2006
Megatec protocol UPS detected [ Pro 1400 4.01p].
[root at corporate ups]# upsc upguards at localhost
Error: Connection failure: Connection refused
[root at corporate ups]# service ups start
Starting megatec: Network UPS Tools - Megatec protocol driver 1.5 (2.0.5)
Carlos Rodrigues (c) 2003-2006
/dev/ttyS1 is locked by another process
[FAILED]
Starting upsd: Network UPS Tools upsd 2.0.5
Connected to UPS [upguards]: upguards
[ OK ]
Starting UPS monitor (master): Network UPS Tools upsmon 2.0.5
UPS: upguards at localhost (master) (power value 1)
Using power down flag file /etc/killpower
[ OK ]
[root at corporate ups]# upsc upguards at localhost
battery.charge: 85.0
battery.voltage: 26.20
battery.voltage.nominal: 24.0
driver.name: megatec
driver.parameter.port: /dev/ttyS1
driver.version: 2.0.5
driver.version.internal: 1.5
input.frequency: 49.0
input.voltage: 208.0
input.voltage.fault: 208.0
input.voltage.maximum: 212.0
input.voltage.minimum: 208.0
output.voltage: 208.0
output.voltage.nominal: 220.0
ups.beeper.status: enabled
ups.delay.shutdown: 0
ups.delay.start: 2
ups.load: 3.0
ups.mfr:
ups.model: Pro 1400 4.01p
ups.serial: unknown
ups.status: OL
ups.temperature: 43.0
[root at corporate ups]#
I'm VERY confused right now.
More information about the Nut-upsuser
mailing list