Re: [Nut-upsuser] Init SSL without certificate database

2023-01-28 Thread Charles Lepple via Nut-upsuser
> On Jan 28, 2023, at 6:14 PM, Jim Klimov via Nut-upsuser 
>  wrote:
> 
> and I have a hard time guessing what distro might ship a "driver.version: 
> DSM7-1-1-42930-workplus-version2-repack-42930-220712". Ask them what NUT 
> version (release or snapshot) they use, and if they would consider shipping a 
> newer one?

Jim, veering OT from the original post, but probably a Synology NAS? e.g. 
https://www.synoforum.com/threads/another-dsm7-regression-ups.6586/page-4

I could see this happening if someone unpacks a NUT release tarball in a larger 
Git/SVN working copy, and the NUT version expansion code picks up one of the 
parent repository's tags.

Ubuntu 22.04 includes NUT 2.7.4 + some Debian/Ubuntu patches, and is built 
against NSS instead of OpenSSL, hence that error. Ref: 
https://packages.ubuntu.com/jammy/nut -> 
https://packages.ubuntu.com/jammy/nut-client -> 
https://packages.ubuntu.com/jammy/libupsclient4

Roger, I don't think self-signed certificates will help in this case - if 
present, the code also logs a message to stderr showing the location of the 
certificate database: 
https://github.com/networkupstools/nut/blob/v2.7.4/clients/upsclient.c#L363
___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Init SSL without certificate database

2023-01-28 Thread Jim Klimov via Nut-upsuser
Hello,

  Also note that NUT project does not currently issue packages, and I have
a hard time guessing what distro might ship a "driver.version:
DSM7-1-1-42930-workplus-version2-repack-42930-220712". Ask them what NUT
version (release or snapshot) they use, and if they would consider shipping
a newer one?

  Sometime recently (after 2.8.0 release) an option was added to quiesce
this particular message by setting an envvar, NUT_QUIET_INIT_SSL=true (e.g.
in scripts or shell profile) where you intend to not secure the
communications: https://github.com/networkupstools/nut/pull/1667

Jim

On Sat, Jan 28, 2023, 21:43 Roger Price  wrote:

> On Sat, 28 Jan 2023, John Fowler wrote:
>
> > We are getting "Init SSL without certificate database” in response to
> all requests.
> >
> > pi@cyva:~ $ upsc ups@cyva
> > Init SSL without certificate database
> > battery.charge: 100
>
> If you don't like the warning, then a command such as upsc ups@cyva
> 2>/dev/null
> will hide it.
>
> Otherwise the simplest, and possibly the safest, solution is to create
> local
> self-signed certificates.  For instructions see chapter 10 of
> https://rogerprice.org/NUT/ConfigExamples.A5.pdf . The required
> mkNUTcert.py
> utility program is available at https://rogerprice.org/NUT/mkNUTcert.py
>
> Roger___
> Nut-upsuser mailing list
> Nut-upsuser@alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
>
___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Init SSL without certificate database

2023-01-28 Thread Roger Price

On Sat, 28 Jan 2023, John Fowler wrote:


We are getting "Init SSL without certificate database” in response to all 
requests.

pi@cyva:~ $ upsc ups@cyva
Init SSL without certificate database
battery.charge: 100


If you don't like the warning, then a command such as upsc ups@cyva 2>/dev/null 
will hide it.


Otherwise the simplest, and possibly the safest, solution is to create local 
self-signed certificates.  For instructions see chapter 10 of 
https://rogerprice.org/NUT/ConfigExamples.A5.pdf . The required mkNUTcert.py 
utility program is available at https://rogerprice.org/NUT/mkNUTcert.py


Roger___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser


[Nut-upsuser] Init SSL without certificate database

2023-01-28 Thread John Fowler
Good Day,

We are getting "Init SSL without certificate database” in response to all 
requests.
The NUT software is installed on Ubuntu Server 22.04 LTS. 
All the documentation that we have found that references this error have some 
sort of hack.
Why doesn’t the package support a published path or environment variable where 
a user can point to a functional certificate database?

pi@cyva:~ $ upsc -l cyva
Init SSL without certificate database
ups
pi@cyva:~ $ upsc -L cyva
Init SSL without certificate database
ups: Description unavailable
pi@cyva:~ $ upsc ups@cyva
Init SSL without certificate database
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 20
battery.mfr.date: CPS
battery.runtime: 4200
battery.runtime.low: 300
battery.type: PbAcid
battery.voltage: 25.6
battery.voltage.nominal: 24
device.mfr: CPS
device.model: CST135UC
device.serial: CYALW7002313
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 5
driver.parameter.port: auto
driver.parameter.synchronous: no
driver.version: DSM7-1-1-42930-workplus-version2-repack-42930-220712
driver.version.data: CyberPower HID 0.4
driver.version.internal: 0.41
input.voltage: 120.0
input.voltage.nominal: 120
output.voltage: 120.0
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.load: 12
ups.mfr: CPS
ups.model: CST135UC
ups.productid: 0601
ups.realpower.nominal: 810
ups.serial: CYALW7002313
ups.status: OL
ups.test.result: No test initiated
ups.timer.shutdown: -60
ups.timer.start: -60
ups.vendorid: 0764
pi@cyva:~ $


https://askubuntu.com/questions/1401545/network-ups-tools-nut-ubuntu-20-04-init-ssl-without-certificate-database-e
Network UPS Tools (NUT) - Ubuntu 20.04 - Init SSL without certificate database 
Error: Data stale
askubuntu.com

https://askubuntu.com/questions/468632/nut-ups-and-ssl-certificates
nut (UPS) and SSL certificates
askubuntu.com

___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] nut does not start after reboot

2023-01-28 Thread Jim Klimov via Nut-upsuser
Hello,

Looking at "udevadm[666]: systemd-udev-settle.service is deprecated. Please
fix nut-driver@ups.service, multipathd.service not to pull it in" above and
https://github.com/openzfs/zfs/issues/10891#issuecomment-749479690 quote
about the deprecation in particular, I wonder if in fact your OS tries to
start NUT device driver before UDEV somehow -- so the access rights to USB
devfs node are not yet assigned to the NUT run-time user account? At least,
"usbhid-ups[2399]: libusb1: Could not open any HID devices: insufficient
permissions on everything " messages point strongly to something like that.

On a side note, I see "CPS" mentioned above, and there's a plethora of
issues discussions (on NUT GitHub and elsewhere) about how these devices
tend to act for a while and disconnect (power-saving maybe?...) And the
system then finds the electric links, picks them up as a new connection
initially owned by kernel, then udev must hand it off to NUT, driver must
reconnect etc.) Don't remember all of it, but more frequent polling might
help IIRC. Some things about reconnections could have been addressed in
master branch after NUT v2.8.0 release, also.

Jim

On Sat, Jan 28, 2023 at 1:38 AM Eyal Lebedinsky  wrote:

> On up-to-date f36, with latest kernel 6.1.7-100.fc36.x86_64.
>
> After receiving a few of these messages
> Broadcast message from n...@e7.eyal.emu.id.au (somewhere)
> UPS ups@ups is unavailable
> I noticed and ran
> sudo systemctl restart nut-driver@ups.service
> which triggered
> Broadcast message from n...@e7.eyal.emu.id.au (somewhere)
> Communications with UPS ups@ups established
>
> I now added the restart to rc.local.
>
> Is there a better/correct way to ensure nut starts at boot time?
>
> Below is what I consider relevant to the situation in the boot log.
>
> Looking at the boot log I see
> $ sudo journalctl -b 0 -o short-iso --no-hostname | egrep -i
> '[^a-zA-Z](ups|nut)'
> 2023-01-28T09:06:57+1100 kernel: usb 1-5.2: Product: UPS VALUE
> 2023-01-28T09:06:57+1100 kernel: hid-generic 0003:0764:0501.0003:
> hiddev96,hidraw2: USB HID v1.10 Device [CPS UPS VALUE] on
> usb-:00:14.0-5.2/input0
> 2023-01-28T09:07:06+1100 kernel: usb 1-5.2: Product: UPS VALUE
> 2023-01-28T09:07:06+1100 kernel: hid-generic 0003:0764:0501.0008:
> hiddev96,hidraw2: USB HID v1.10 Device [CPS UPS VALUE] on
> usb-:00:14.0-5.2/input0
> 2023-01-28T09:07:12+1100 systemd[1]: Created slice
> system-nut\x2ddriver.slice - Slice /system/nut-driver.
> 2023-01-28T09:07:12+1100 udevadm[666]: systemd-udev-settle.service is
> deprecated. Please fix nut-driver@ups.service, multipathd.service not to
> pull it in.
> 2023-01-28T09:07:15+1100 systemd[1]: Starting nut-driver@ups.service -
> Network UPS Tools - device driver for NUT device 'ups'...
> 2023-01-28T09:07:15+1100 kernel: usb 1-5.2: Product: UPS VALUE
> 2023-01-28T09:07:15+1100 kernel: hid-generic 0003:0764:0501.0009:
> hiddev96,hidraw2: USB HID v1.10 Device [CPS UPS VALUE] on
> usb-:00:14.0-5.2/input0
> 2023-01-28T09:07:15+1100 nut-driver@ups[1289]: Network UPS Tools -
> Generic HID driver 0.47 (2.8.0)
> 2023-01-28T09:07:15+1100 nut-driver@ups[1289]: USB communication driver
> (libusb 1.0) 0.43
> 2023-01-28T09:07:15+1100 nut-driver@ups[1289]: libusb1: Could not open
> any HID devices: insufficient permissions on everything
> 2023-01-28T09:07:15+1100 nut-driver@ups[1289]: No matching HID UPS found
> 2023-01-28T09:07:15+1100 nut-driver@ups[1259]: Driver failed to start
> (exit status=1)
> 2023-01-28T09:07:20+1100 nut-driver@ups[1580]: Network UPS Tools -
> Generic HID driver 0.47 (2.8.0)
> 2023-01-28T09:07:20+1100 nut-driver@ups[1580]: USB communication driver
> (libusb 1.0) 0.43
> 2023-01-28T09:07:20+1100 nut-driver@ups[1580]: libusb1: Could not open
> any HID devices: insufficient permissions on everything
> 2023-01-28T09:07:20+1100 nut-driver@ups[1580]: No matching HID UPS found
> 2023-01-28T09:07:20+1100 nut-driver@ups[1259]: Driver failed to start
> (exit status=1)
> 2023-01-28T09:07:25+1100 nut-driver@ups[2378]: Using subdriver:
> CyberPower HID 0.6
> 2023-01-28T09:07:25+1100 nut-driver@ups[2378]: Network UPS Tools -
> Generic HID driver 0.47 (2.8.0)
> 2023-01-28T09:07:25+1100 nut-driver@ups[2378]: USB communication driver
> (libusb 1.0) 0.43
> 2023-01-28T09:07:25+1100 nut-driver@ups[2378]: nut_libusb_get_string:
> Pipe error
> 2023-01-28T09:07:25+1100 nut-driver@ups[2378]: cps_adjust_battery_scale:
> battery readings will be scaled by 2/3
> 2023-01-28T09:07:25+1100 usbhid-ups[2399]: Startup successful
> 2023-01-28T09:07:25+1100 nut-driver@ups[1259]: Network UPS Tools - UPS
> driver controller 2.8.0
> 2023-01-28T09:07:25+1100 systemd[1]: Started nut-driver@ups.service -
> Network UPS Tools - device driver for NUT device 'ups'.
> 2023-01-28T09:07:25+1100 audit[1]: SERVICE_START pid=1 uid=0
> auid=4294967295 ses=4294967295 subj=kernel msg='unit=nut-driver@ups
> comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=?