LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-22-2011, 11:49 AM   #1
davidcollins001
Member
 
Registered: Apr 2007
Posts: 43

Rep: Reputation: 21
NUT - UPS failed driver not connected


I was just about to post this message asking for help, but in a last ditch effort I managed to find the solution. I thought I would post this anyway since I have spent weeks of googling and looking for clues. After a number of hours today I finally found this page http://lists.alioth.debian.org/piper...ch/005972.html that explains that the megatec drivers have been replaced by the blazer drivers!! I'm sure the info is out there somewhere but I couldn't find it. This may save someone else some time.

David


I have a Belkin 600VA UPS on my desktop (Linux sandangel 2.6.32-5-686 #1 SMP Tue Mar 8 21:36:00 UTC 2011 i686 GNU/Linux - Debian Stable) since my power is a bit unstable. I recently did an upgrade which changed the NUT config files syntax.

The UPS was previously working fine with NUT and any lengthy power outages caused the machine to shutdown correctly. Since the upgrade I keep on seeing error messages on the console:

Quote:
Broadcast Message from nut@sandangel

UPS belkinups@localhost is unavailable
and also in /var/log/syslog and /var/log/daemon:
Quote:
Apr 22 16:16:17 sandangel upsmon[2264]: UPS belkinups@localhost is unavailable
Apr 22 16:16:22 sandangel upsmon[2264]: Poll UPS [belkinups@localhost] failed - Driver not connected
Apr 22 16:16:27 sandangel upsmon[2264]: Poll UPS [belkinups@localhost] failed - Driver not connected
Apr 22 16:16:32 sandangel upsmon[2264]: Poll UPS [belkinups@localhost] failed - Driver not connected
Apr 22 16:16:37 sandangel upsmon[2264]: Poll UPS [belkinups@localhost] failed - Driver not connected
Apr 22 16:14:37 sandangel upsmon[2264]: Poll UPS [belkinups@localhost] failed - Driver not connected
Apr 22 16:14:41 sandangel upsd[2260]: Can't connect to UPS [belkinups] (megatec_usb-belkinups): No such file or directory
Apr 22 16:14:42 sandangel upsmon[2264]: Poll UPS [belkinups@localhost] failed - Driver not connected
and the UPS is not working as expected. I'm not really why it is not working correctly, the files seem correct and were previously correct (unless there is something I have overlooked in the update). I have googled and not managed to find any solution to this, has anyone seen anything similar or know how I can fix this?

Thanks
David

Here are my config files (with comments removed):

/etc/nut/nut.conf
Code:
MODE=standalone
UPSD_OPTIONS=""
UPSMON_OPTIONS=""
/etc/nut/ups.conf
Code:
[belkinups]
    driver = megatec_usb
    port = auto
    desc = "Belkin UPS"
/etc/nut/upsd.conf
Code:
LISTEN 127.0.0.1 3493
/etc/nut/upsd.users
Code:
[nut]
    password = password
    upsmon = master
/etc/nut/upsmon.conf
Code:
MONITOR belkinups@localhost 1 nut password master
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h -P +0"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5
/etc/nut/upssched.conf
Code:
CMDSCRIPT /upssched-cmd
 
Old 07-04-2012, 09:29 PM   #2
lionslair
LQ Newbie
 
Registered: Sep 2005
Location: Australia
Distribution: Debian
Posts: 12

Rep: Reputation: 0
Did you sort this out?
 
Old 07-05-2012, 07:24 AM   #3
davidcollins001
Member
 
Registered: Apr 2007
Posts: 43

Original Poster
Rep: Reputation: 21
Yes. The solution was to change the megetec driver to blazer, the rest is correct. Took me ages to find that one! Unfortunately the maching got replaced recently with OS X which doesn't support the UPS
 
Old 07-05-2012, 07:27 AM   #4
lionslair
LQ Newbie
 
Registered: Sep 2005
Location: Australia
Distribution: Debian
Posts: 12

Rep: Reputation: 0
I am already using the blazer driver with a powershield UPS but after X period of time it seems to drop the USB connection and it keeps taking a physical unplug and re-plug of the cable then running

udevadm control --reload-rule
udevadm trigger
upsdrvctl start

To make it work again.
 
Old 09-18-2017, 10:11 PM   #5
freealx
LQ Newbie
 
Registered: Mar 2005
Location: Montreal
Distribution: Slackware 11
Posts: 10

Rep: Reputation: 0
Hi Guys,

I found that some problems are related to this issue: https://bugs.debian.org/cgi-bin/bugr...cgi?bug=810449

It could be fixed with that PPA: https://launchpad.net/~clepple/+archive/ubuntu/nut

The unstable UPS state could arise from the Virtual VMware USB Hub, from the host USB 2.0 (or 3.0) port or even from additional hardware USB hub (used to connect few UPS devices to the same monitoring station).

Again, if you have root access to the system, you can use the syslog messages to trigger automated recovery activities as a dirty bandage

For example, with SysV inittab reborn monitoring process - let's name that executalbe (755) file nut-usb-shake in the /etc/nut folder.

Two lines in the /etc/inittab file:

Code:
# Monitor and revive the NUT managed UPS devices
nut-usb-shake:12345:respawn:/etc/nut/nut-usb-shake
The /etc/nut/nut-usb-shake file:

Code:
#! /bin/sh

tail -Fn0 /var/log/syslog | \
while read line ; do
 echo "$line" | grep -q "upsmon\[.*Poll UPS.*failed - Driver not connected"
 if [ $? = 0 ]
 then
  service nut-client stop
  service nut-server stop
  sleep 10
  service nut-server start
  service nut-client start
 fi
done
Finally reload the inittab context with "init q" and every-time when the monitored message is intercepted in the syslog, the remediation commands will be executed.

You can adjust to monitor and execute whatever will serve your needs - the above is just an example.

Good luck!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CyberPower CP1500C UPS and USB with NUT problem 81bones Linux - Hardware 4 09-23-2011 11:01 AM
Network UPS Tools (NUT) error, data stale eric_f Linux - Hardware 1 06-16-2008 11:47 PM
UPS NUT install problem tramni1980 Slackware 0 08-14-2006 07:05 AM
Questions about nut..finding ups dev address creedog Linux - Software 7 03-01-2006 09:39 AM
Ups & Nut Denis Basta Linux - Software 1 09-27-2005 08:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration