[Nut-upsuser] Spurious messages on start

Pedro Côrte-Real pedro at pedrocr.net
Thu Nov 16 01:52:29 CET 2006


On 11/14/06, Pedro Côrte-Real <pedro at pedrocr.net> wrote:
> On 11/14/06, Arjen de Korte <nut+users at de-korte.org> wrote:
> > Did you also try adding a 5 second sleep between starting upsdrvctl and
> > upsd? I think the problem lies there, upsd is trying to connect to the
> > driver that is still in the process of starting up. Since upsd will
> > periodically retry connecting to the driver if it failed, it will try to
> > reconnect after 15 seconds (if memory serves). A 20 second delay for
> > starting upsmon would blank reporting this problem.
>
> Yes, this was what I tried first and it made no difference. upsdrvctl
> seems to wait until the driver is fully initialized and only then goes
> into the background.

Looks like I hadn't tried it with a 30 second sleep. Putting a "sleep
30" between upsdrvctl and upsd also works so I guess the problem is
there.

Using -DDDDD on upsd seems to stop it from going in the background, so
upsmon doesn't get to run. Since the problem seems to be between the
driver and upsd that's probably ok.

/var/log/daemon.log shows this:

Nov 16 00:48:46 ulisses newhidups[5196]: Startup successful
Nov 16 00:48:46 ulisses upsd[5197]: /etc/nut/upsd.conf is world readable
Nov 16 00:48:46 ulisses upsd[5197]: Connected to UPS [mge1200]: newhidups-auto
Nov 16 00:48:46 ulisses upsd[5197]: /etc/nut/upsd.users is world readable
Nov 16 00:48:55 ulisses upsd[5197]: Pinging UPS [mge1200]
Nov 16 00:48:57 ulisses upsd[5197]: UPS [mge1200]: dump is done
Nov 16 00:49:02 ulisses upsd[5197]: Got PONG from UPS [mge1200]
Nov 16 00:49:10 ulisses upsd[5197]: Pinging UPS [mge1200]
Nov 16 00:49:14 ulisses upsd[5197]: Got PONG from UPS [mge1200]
Nov 16 00:49:22 ulisses upsd[5197]: Pinging UPS [mge1200]
Nov 16 00:49:22 ulisses upsd[5197]: Got PONG from UPS [mge1200]
Nov 16 00:49:30 ulisses upsd[5197]: Pinging UPS [mge1200]
Nov 16 00:49:34 ulisses upsd[5197]: Got PONG from UPS [mge1200]
Nov 16 00:49:42 ulisses upsd[5197]: Pinging UPS [mge1200]
(...)

And outputs on the command line:

/etc/nut/upsd.conf is world readable
Connected to UPS [mge1200]: newhidups-auto
/etc/nut/upsd.users is world readable
Network UPS Tools upsd 2.0.4
Synchronizing........ giving up
Pinging UPS [mge1200]
UPS [mge1200]: dump is done
Got PONG from UPS [mge1200]
Pinging UPS [mge1200]
Got PONG from UPS [mge1200]
Pinging UPS [mge1200]
(...)

I guess the problem is that "Synchronizing..." step.

Pedro.



More information about the Nut-upsuser mailing list