6

Today I installed nut on my Ubuntu server (Ubuntu 14.04 LTS).

$ uname -a
Linux boson 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

The UPS is connected to another server (called neutron), so I use nut-client to keep tabs on the UPS state.

When I do sudo upsc ups@neutron.local I get:

Init SSL without certificate database
battery.charge: 15
battery.charge.low: 10
battery.charge.warning: 50
battery.date: not set
battery.mfr.date: 2012/11/27
:

The first line of the output concerns me. I've not seen this on other installations of nut on Debian-based servers.

What can I do to get rid of that line?

EDIT: This "Init SSL without certificate database" is extra annoying because it is not part of the output of upsc and therefore I cannot grep it out.

EDIT(2): To clarify, the (Synology) server (which talks directly to the UPS) is not set-up with SSL or certificates. Other (Debian/Raspbian) clients on the network do not have the above issue. No SSL certificates are installed (as far as I can find out).

find / |grep cert_db on either the server or the clients yields no results.

  • 1
    I get the same message after Upgrade from 12.04 to 14.04... – alfonx Aug 23 '14 at 11:22
5

Your problem is due to the new NSS backend in nut, which was added in 2.7.1 (Changes from 2.6.5 to 2.7.1). The client tries first to contact tcp/3943 with a STARTTLS command and gets ERR FEATURE-NOT-CONFIGURED from upsd, so it shows that warning.

The rationale for this change is that you are transmitting passwords in plaintext over the wire and the developers added SSL certificate support to prevent that. The client is being noisy, after all.

The error message is actually from the client, but you cannot exclude it with a grep because it's coming from the error output (stderr).

The easiest way of solving your problem is to pipe it properly:

upsc ups@neutron.local 2>&1 | grep -v '^Init SSL'

or if you're just using some part of the output for e.g. an RRD graph and you were getting garbage in your cron output, just add the 2>&1 and it will be a normal line:

upsc ups@neutron.local 2>&1 | grep 'battery.charge:' | awk ...

The not-so-easy way of fixing this is to actually configure SSL certificates and the rest of the stuff, like described in 9. Notes on securing NUT | Configuring SSL | NSS backend usage.

| improve this answer | |
2

(For others like me coming via Google)

Just do proper output redirection to filter out the warning message:

upsc ups@neutron.local > /dev/stdout 2> /dev/null
| improve this answer | |
1
+25

You must underline where to find the certificate database, and also tell the certificate that clients will use and the password to decrypt the private key associated with your (public) key by editing upsd.conf:

  1. CERTPATH /usr/local/ups/etc/cert_db
  2. CERTIDENT 'certificate name' 'database password'
| improve this answer | |
  • 1
    There's no directory called /usr/local/ups on this system. Also sudo find / |grep cert_db yields no results. – Mausy5043 May 30 '14 at 6:38
  • 1
    Apparently 3 people like this answer, but it doesn't help me :-( – Mausy5043 Jun 4 '14 at 16:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.