[Nut-upsuser] This guy must be an idiot

Leslie Rhorer lrhorer at satx.rr.com
Fri May 29 07:23:14 UTC 2009


 
> On Wed, May 27, 2009 at 1:10 AM, Leslie Rhorer <lrhorer at satx.rr.com>
> wrote:
> >        OK, can someone tell me what utterly moronic thing I am doing
> wrong?
> >
> >        I have two roughly identical Linux system running NUT, and one
> works
> > properly.  The other almost does.  The second system works well once
> > everything is up, but after booting, the system does not have
> connectivity
> > to the UPS.
> 
> What do the logs say?

Well, nothing, which is weird.  That is to say, after booting, there's
nothing in the logs from nut or upsd until after I manually kick-start the
process.

> >  I have to manually run `upsdrvctl start backup`,
> > `/etc/init.d/nut start`, and `upsd` to get NUT working.  Thereafter it
> works
> > fine, whether anyone is logged in or not.  After a boot, however, I have
> to
> > log in and kick-start it again.
> 
> Interesting, most systems are set up such that '/etc/init.d/nut start'
> will run upsdrvctl and upsd.

Right.  This is the case on the one system, or at least I don't do anything
special other than the symlink in /etc/rc2.d.  Running `/etc/init.d/nut
start` seems to be all that's necessary there.  The two nut files are
identical on both systems.

> To restart, does it suffice to only run '/etc/init.d/nut start'?

No, it doesn't, and that's weird, too.  If I run `upsd` before running
`upsdrvctl start Backup`, I get:

May 29 01:59:15 Backup upsd[4969]: listening on 0.0.0.0 port 3493
May 29 01:59:15 Backup upsd[4969]: Can't connect to UPS [Backup]
(usbhid-ups-Backup): No such file or directory
May 29 01:59:15 Backup upsd[4970]: Startup successful

Which tells me the upsdrvctl driver is not initialized.  Once I run both
upsd and upsdrvctl manually, everything works.  I shouldn't have to do this.

 
> >        What am I missing? The S50nut symlink is in /etc/rc2.d, and both
> > systems are at runlevel 2.  I set up the systems the very same way (as
> far
> > as I can remember or tell), except that one employs driver =
> tripplite_usb
> > in usb.conf and the other uses driver = usbhid-ups, plus the two have
> > different backup names.  Otherwise, I think everything is the same.
> 
> One thing you can do to catch any subtle differences is to tar up the
> /etc/nut directory on one machine, then extract it into /tmp on the
> other machine, and use 'diff -Naur /etc/nut /tmp/nut' or whatnot.

Yeah, that was the first thing I did.  The machine name, UPS driver, and UPS
name are different, of course, but everything else is identical.  The
respective names and driver are correct (which we pretty much knew in the
first place, because it wouldn't work at all otherwise).




More information about the Nut-upsuser mailing list