Public bug reported:

I'm trying to connect to an AP9619 management card with SNMPv3 authPriv,
but the snmp-ups driver fails to start.

When running the driver directly:

$ sudo /lib/nut/snmp-ups -a ups1 -DDD
Network UPS Tools - Generic SNMP UPS driver 0.58 (2.6.3)                        
                                                                 
   0.000000     debug level is '3'
   0.001185     SNMP UPS driver : entering upsdrv_initups()                     
                                                                 
   0.001251     SNMP UPS driver : entering nut_snmp_init(snmp-ups)
   0.076190     SNMP UPS driver : entering load_mib2nut(apcc)                   
                                                                 
   0.076219     load_mib2nut: trying classic method with 'apcc' mib
   0.076265     Entering nut_snmp_get_str()                                     
                                                                 
   0.076280     nut_snmp_get(.1.3.6.1.4.1.318.1.1.1.1.1.1.0)
   6.103015     Unknown mibs value: apcc                                        
                                                                 

tcpdump output while running the aforementioned driver:

17:42:51.178566 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP 
(17), length 92)
    10.0.10.10.57051 > 10.0.0.6.161: [bad udp cksum 0x1e69 -> 0x7e35!]  { 
SNMPv3 { F=r } { USM B=0 T=0 U= } { ScopedPDU E=  C= { GetRequest(14) 
R=235897244  } } }
17:42:51.199124 IP (tos 0x0, ttl 63, id 15, offset 0, flags [none], proto UDP 
(17), length 147)                                                  
    10.0.0.6.161 > 10.0.10.10.57051: [no cksum]  { SNMPv3 { F= } { USM B=115 
T=520500 U= } { ScopedPDU E= 0x800x000x010x3E0x030x000xC00xB70x7E0xC80xFB C= { 
Report(35) R=235897244  .1.3.6.1.6.3.15.1.1.4.0=12 } } }                        
                                                      
17:42:51.199480 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP 
(17), length 180)
    10.0.10.10.57051 > 10.0.0.6.161: [bad udp cksum 0x1ec1 -> 0xf39d!]  { 
SNMPv3 { F=apr } { USM B=115 T=520500 U=apc_ups_1_authpriv } { ScopedPDU 
[!scoped 
PDU]f2_ac_c6_d7_3f_1d_ec_bf_df_c6_f0_81_44_cf_b8_7f_18_8c_73_54_b2_a0_7e_f7_68_1c_ee_a8_4e_36_a6_51_24_64_80_e3_c8_12_67_64_b0_68_c3_eb_e4_f7_53_b6_1d_47_3c_17_87_f5_d6_fe}
 } 
[the last packet repeated 5 times, with T=T+1 and different ScopedPDUs each 
time]
...

When setting nut to use SNMPv1, the GetRequests are for a different OID,
no response from the UPS as v1 is disabled:

16:42:32.323542 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP 
(17), length 77)                                                      
    10.0.10.10.54510 > 10.0.0.6.161: [bad udp cksum 0x1e5a -> 0xa2d0!]  { 
SNMPv1 { GetRequest(34) R=1587461727  .1.3.6.1.4.1.318.1.1.1.1.1.1.0 } }

If I query the UPS with the same OID, but v3 protocol, I get a normal
response from the UPS:

$ snmpget -Cf -v 3 -u apc_ups_1_authpriv -l authPriv -a MD5 -A 'auth password 
obfuscated'  -X 'priv password obfuscated' 10.0.0.6 
.1.3.6.1.4.1.318.1.1.1.1.1.1.0
SNMPv2-SMI::enterprises.318.1.1.1.1.1.1.0 = STRING: "Smart-UPS 3000 RM"

So I think snmp-ups is querying the wrong OIDs somehow, or something else is 
not right.
Also might be relevant, my authPriv passwords have special characters in them, 
like dots, colons, semicolons, parents, dashes, more/less, equals). The 
passwords obviously work with the normal snmpget command. There is no mention 
in the documentation, config files or man pages whether qouting is required 
around the passwords in ups.conf when using passwords containing special 
characters, so I tried them plain, double or single quoted with no difference.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: nut-snmp 2.6.3-1ubuntu1.1
ProcVersionSignature: Ubuntu 3.5.0-32.53~precise1-generic 3.5.7.11
Uname: Linux 3.5.0-32-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.3
Architecture: amd64
Date: Thu Jul  4 17:33:46 2013
KernelVersion: Linux PE2970 3.5.0-32-generic #53~precise1-Ubuntu SMP Wed May 29 
20:33:37 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
MarkForUpload: True
SourcePackage: nut
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: nut (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug precise

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to nut in Ubuntu.
https://bugs.launchpad.net/bugs/1197878

Title:
  SNMPv3 not working with APC

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nut/+bug/1197878/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to