nut (UPS) and SSL certificates
Solution 1:
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 [email protected] 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 [email protected] 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.
Solution 2:
(For others like me coming via Google)
Just do proper output redirection to filter out the warning message:
upsc [email protected] > /dev/stdout 2> /dev/null
Solution 3:
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:
- CERTPATH /usr/local/ups/etc/cert_db
- CERTIDENT 'certificate name' 'database password'