[Nut-upsuser] SNMPv3 fails when more than one UPS is configured in ups.conf

Charles Lepple clepple at gmail.com
Sun Dec 3 22:34:44 UTC 2017


On Nov 30, 2017, at 6:31 PM, Lee Damon <nomad at ee.washington.edu> wrote:
> 
> SNMPv3 works fine when I have any one of the three configured in
> ups.conf while the other two are configured with SNMPv1. It doesn't
> matter which _one_ UPS is configured for SNMPv3 in ups.conf, they all
> work individually (see below example).
> 
> However, if I configure any two or all three of them to use SNMPv3 then
> on startup upsdrvctl complains about "unhandled ASN 0x81 received from
> .1.3.6.1.4.1.318.1.1.1.9.3.3.1.7.1.1.3" and fails to start.
> 
Thanks for the detailed bug report. It's an interesting failure mode.

I created an issue on GitHub with a link back to the mail archive because the developers who are most involved with SNMP are more likely to see it there (and so it doesn't get lost; we're attempting to put together a new release at the moment): https://github.com/networkupstools/nut/issues/508 (feel free to reply to the list, or post there).

I suspect that the message you are seeing is from here in the snmp-ups driver:

   https://github.com/networkupstools/nut/blob/v2.7.2/drivers/snmp-ups.c#L706

(There are two other "unhandled ASN ..." messages, but due to the use of upsdebugx(), they probably wouldn't show up the way that upsdrvctl starts the drivers.)

To get more context on what is happening before this error, you can start the driver directly with a few "-D" flags. The command line can be found from a running driver, or you can pass "-D" to upsdrvctl itself (I think; there have been some changes to that code over the years) and it will show the whole command line.

Another option (which papers over the problem, but may help in the near term) is to see if this is just a startup issue. You can specify one UPS with "upsdrvctl start ups1", and then see if the other drivers still start if you wait until the first driver has completed its SNMPv3 handshake. You can automate this a bit with the "maxretry" and "retrydelay" options in ups.conf: http://networkupstools.org/docs/man/ups.conf.html


More information about the Nut-upsuser mailing list