upsd doesn't start on system startup

Bug #221737 reported by Ákos Mattiassich
10
Affects Status Importance Assigned to Milestone
nut (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: nut

/etc/init.d/nut start
doesn't really start upsd.
If I run it in console, I get the following output:
 * Starting Network UPS Tools [ OK ]
But upsd doesn't started.

If I run
upsdrvctl start && upsd
it works fine.

Info:
nut package version: 2.2.1-2.1ubuntu7

$ lsb_release -ra
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 8.04
Release: 8.04
Codename: hardy

Related branches

Revision history for this message
Arnaud Quette (aquette) wrote : Re: [Bug 221737] [NEW] upsd doesn't start on system startup

You possibly missed the boot time configuration in /etc/default/nut
please validate this and get back to us

Chuck Short (zulcss)
Changed in nut:
status: New → Incomplete
Revision history for this message
Ákos Mattiassich (mattiassicha) wrote :

Yes, you're right, in /etc/default/nut i changed this:
# start upsd
START_UPSD=yes
...
# start upsmon
START_UPSMON=yes
and now it works.
Thank you for your quick response!

Chuck Short (zulcss)
Changed in nut:
status: Incomplete → Invalid
Revision history for this message
Mathias Gug (mathiaz) wrote :

Why is upsd not started by default ? Is there a reason why the upsd should not be started by default ?

When a package is installed it should work out of the box with a sane default configuration.

Changed in nut:
status: Invalid → Incomplete
Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: [Bug 221737] Re: upsd doesn't start on system startup

I tend to agree with Mathias here. I installed nut and was surprised
to find out I had to go digging around /etc/default to turn it on. I
think we should update that config file on installation.

:-Dustin

Revision history for this message
Arnaud Quette (aquette) wrote :

moot point guys.
NUT can be a network master (same for standalone boxes), requiring
driver+upsd+upsmon, or a net slave requiring only upsmon.
So if there was a component to be started in all cases, that would be upsmon.
but this is void, and it would simply fail if there is no upsd running
and no suitable config.
the same would go for upsd, if there is no ups.conf+upsd.{conf,users}.
And running only driver+upsd in the best case doesn't protect you:
here you need upsmon.

QED

now if you're really looking for something that works without config
(TM), look there and support this for HH+1:
https://blueprints.edge.launchpad.net/ubuntu/+spec/integrated-usb-ups-support

Arnaud
--
Linux / Unix Expert R&D - MGE Office Protection Systems - http://www.mgeops.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://people.debian.org/~aquette/
Free Software Developer - http://arnaud.quette.free.fr/

Revision history for this message
Mathias Gug (mathiaz) wrote :

The init script prints a misleading message though. If upsd is set to not start by default, the init script should say so rather than stating that it started correctly.

Revision history for this message
Anders Häggström (hagge) wrote :

I agree to Mathias, this is a strange behavior. In my opinion a newly installed service should autostart, or at least give a hint during installation that a configuration is needed before it is able to start up, and a short description how to accomplish that.

I am running Ubuntu 8.04 server (amd64) and nut version 2.2.1-2.1ubuntu7.1 and experience this same behavior.
A fix for this bug/behavior could be one of the following:
1) Change the default behavior to autostart the service and change the startup/init-script to signal "No configuration file is found" during boot, if that is the case, and return "Failed".
2) Leave a message in the end of the installation that nut needs to be configured before it can be started, and include the "START_UPSD=yes" options in the config-files so you do not have to edit /etc/defaults/nut
3) Change the default behavior to autostart and try to autoconfigure nut during post-installation, as described in Bug #129523

Note, the following is just a cross-reference to my duplicate: Bug #231212

Regards
Anders

Revision history for this message
Jayson Rowe (jayson.rowe) wrote :

Since it's been a very long time since any additional info was added to this bug, I'm just checking to see if this is still an issue, and find out what additional work should be done on this bug.

Revision history for this message
Anders Häggström (hagge) wrote :

I am still interested in a more logical standard installation, according to the proposals I have mentioned before, but I do not have the time or knowledge to implement a patch for the startup script.

I am running ubuntu 8.04.1 (amd64) and nut version 2.2.1-2.1ubuntu7.1.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nut - 2.4.1-2ubuntu1

---------------
nut (2.4.1-2ubuntu1) jaunty; urgency=low

  * Acknowledge closed bugs in upstream and Debian: LP: #1568, LP: #221737,
    LP: #239025, LP: #278495, LP: #332030, LP: #332032
  * Merge from debian unstable, remaining changes:
    + debian/control:
      - Update maintainer field as per spec.
      - Add Breaks on nut-hal-drivers to ensure we have correct udev version.
    + debian/{nut-cgi,nut}.postinst: add nut to the dialout and nut groups
      unconditionally, to handle the upgrade from the hardy release (simply
      uncommented).
    + debian/rules: pre merge the changes for Ubuntu (udev path and version),
      (simply uncommented).

 -- Arnaud Quette <email address hidden> Fri, 27 Feb 2009 12:49:24 +0100

Changed in nut:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.