[Nut-upsuser] Fwd: [EXTERNAL] SNMP shutdown timing out

Lee Damon nomad at ee.washington.edu
Mon May 4 20:32:34 BST 2020


I meant to send this to the list but evidently only sent it to David.
Since sending it I've done a second test which shows what a successful
snmpset looks like.

First attachment, from the forwarded email, is nutout.txt. Second
attachment is snmpout.txt.

nomad


-------- Forwarded Message --------
Subject: Re: [Nut-upsuser] [EXTERNAL] SNMP shutdown timing out
Date: Mon, 4 May 2020 09:28:57 -0700
From: Lee Damon <nomad at ee.washington.edu>
To: David Zomaya <David_Zomaya at tripplite.com>

On 4/29/20 4:11 PM, David Zomaya wrote:
> The encryption of SNMPv3 will might make it little harder to debug with
> tcpdump if you have to drill into packet contents. Switching to v1/2c
> for troubleshooting would make it plaintext, but then not exactly apples
> to apples to now.
>

Well that's interesting.

The attached script output shows the two commands I used.

The first command, nut-scanner, showed no traffic at all, probably not
surprising given the error:

: || lvd at chscc-pc-052 ~ [1121] ; please tcpdump host apcups and port snmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eno1, link-type EN10MB (Ethernet), capture size 262144 bytes
^C
0 packets captured
4 packets received by filter
0 packets dropped by kernel


But the second command, snmp-ups, showed unencrypted traffic. I don't
have a working version to test against but that seems ... off:

: || lvd at chscc-pc-052 ~ [1121] ; please tcpdump host apcups and port snmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eno1, link-type EN10MB (Ethernet), capture size 262144 bytes
09:20:30.023454 IP chscc-pc-052.castle.org.59649 >
apcups.castle.org.snmp:  GetRequest(28)  system.sysObjectID.0
09:20:30.045067 IP apcups.castle.org.snmp >
chscc-pc-052.castle.org.59649:  GetResponse(43)
system.sysObjectID.0=E:318.1.3.2.10
09:20:30.045508 IP chscc-pc-052.castle.org.59649 >
apcups.castle.org.snmp:  GetRequest(34)  E:318.1.1.1.1.1.1.0
09:20:30.070001 IP apcups.castle.org.snmp >
chscc-pc-052.castle.org.59649:  GetResponse(52)
E:318.1.1.1.1.1.1.0="SMART-UPS 1400"
09:20:30.070174 IP chscc-pc-052.castle.org.59649 >
apcups.castle.org.snmp:  GetRequest(34)  E:318.1.1.1.1.1.1.0
09:20:30.089659 IP apcups.castle.org.snmp >
chscc-pc-052.castle.org.59649:  GetResponse(52)
E:318.1.1.1.1.1.1.0="SMART-UPS 1400"
09:20:30.089782 IP chscc-pc-052.castle.org.59649 >
apcups.castle.org.snmp:  SetRequest(35)  E:318.1.1.1.6.1.1.0=2
09:20:31.091181 IP chscc-pc-052.castle.org.59649 >
apcups.castle.org.snmp:  SetRequest(35)  E:318.1.1.1.6.1.1.0=2
09:20:32.092488 IP chscc-pc-052.castle.org.59649 >
apcups.castle.org.snmp:  SetRequest(35)  E:318.1.1.1.6.1.1.0=2
09:20:33.093894 IP chscc-pc-052.castle.org.59649 >
apcups.castle.org.snmp:  SetRequest(35)  E:318.1.1.1.6.1.1.0=2
09:20:34.095278 IP chscc-pc-052.castle.org.59649 >
apcups.castle.org.snmp:  SetRequest(35)  E:318.1.1.1.6.1.1.0=2
09:20:35.096665 IP chscc-pc-052.castle.org.59649 >
apcups.castle.org.snmp:  SetRequest(35)  E:318.1.1.1.6.1.1.0=2
^C
12 packets captured
16 packets received by filter
0 packets dropped by kernel

I left tcpdump running for at least 5 seconds after the command returned
each time.

Also, on the chance this was a problem with the binaries from EPEL I
downloaded the source and compiled for myself with the exact same result.

nomad

-------------- next part --------------
Script started on 2020-05-04 09:19:50-07:00
]0;lvd at chscc-pc-052:~: || lvd at chscc-pc-052 ~ [936] ; nut-scanner -S --secLevel authPriv --secName nut --authProtocol MD5 --privProtocol DES --authPassword NutScan at P
Password43LongerWord --privPassword NutScan at Password43LongerWord -s apcups
Scanning SNMP bus.
Error: unknown authtypeError generating Ku from authentication pass phrase
]0;lvd at chscc-pc-052:~: || lvd at chscc-pc-052 ~ [937] ; please snmp-ups -DDDD -a nutdev1 -x secLevel=authPriv -x secName=nut -x authProtocol=MD5 -x privProtocol=DES -x
x authPassword=NutScan at Password43LongerWord -x privPassword=NutScan at Password43LongerWord  -k
[sudo] password for lvd: 
Network UPS Tools - Generic SNMP UPS driver 0.97 (2.7.4)
   0.000000	debug level is '4'
   0.001357	SNMP UPS driver: entering upsdrv_initups()
   0.001363	SNMP UPS driver: entering nut_snmp_init(snmp-ups)
   0.009091	Setting SNMP retries to 5
   0.009096	Setting SNMP timeout to 1 second(s)
   0.009128	SNMP UPS driver: entering load_mib2nut(auto)
   0.009132	trying the new match_sysoid() method
   0.009134	Entering nut_snmp_get_oid()
   0.009138	nut_snmp_get(.1.3.6.1.2.1.1.2.0)
   0.009156	nut_snmp_walk(.1.3.6.1.2.1.1.2.0)
   0.009158	nut_snmp_walk: max. iteration = 1
   0.030970	OID value: .1.3.6.1.4.1.318.1.3.2.10
   0.030992	match_sysoid: device sysOID value = .1.3.6.1.4.1.318.1.3.2.10
   0.030995	match_sysoid: checking MIB apcc
   0.030997	match_sysoid: checking MIB mge
   0.030999	match_sysoid: comparing .1.3.6.1.4.1.318.1.3.2.10 with .1.3.6.1.4.1.705.1
   0.031016	match_sysoid: checking MIB netvision
   0.031018	match_sysoid: comparing .1.3.6.1.4.1.318.1.3.2.10 with .1.3.6.1.4.1.4555.1.1.1
   0.031021	match_sysoid: checking MIB pw
   0.031024	match_sysoid: comparing .1.3.6.1.4.1.318.1.3.2.10 with .1.3.6.1.4.1.534.1
   0.031026	match_sysoid: checking MIB pxgx_ups
   0.031029	match_sysoid: comparing .1.3.6.1.4.1.318.1.3.2.10 with .1.3.6.1.4.1.534.2.12
   0.031031	match_sysoid: checking MIB aphel_genesisII
   0.031033	match_sysoid: comparing .1.3.6.1.4.1.318.1.3.2.10 with .1.3.6.1.4.1.17373
   0.031035	match_sysoid: checking MIB aphel_revelation
   0.031038	match_sysoid: comparing .1.3.6.1.4.1.318.1.3.2.10 with .1.3.6.1.4.1.534.6.6.6
   0.031040	match_sysoid: checking MIB eaton_epdu
   0.031042	match_sysoid: comparing .1.3.6.1.4.1.318.1.3.2.10 with .1.3.6.1.4.1.534.6.6.7
   0.031044	match_sysoid: checking MIB pulizzi_switched1
   0.031073	match_sysoid: comparing .1.3.6.1.4.1.318.1.3.2.10 with .1.3.6.1.4.1.20677.1
   0.031075	match_sysoid: checking MIB pulizzi_switched2
   0.031077	match_sysoid: comparing .1.3.6.1.4.1.318.1.3.2.10 with .1.3.6.1.4.1.20677.2
   0.031078	match_sysoid: checking MIB raritan
   0.031080	match_sysoid: comparing .1.3.6.1.4.1.318.1.3.2.10 with .1.3.6.1.4.1.13742
   0.031082	match_sysoid: checking MIB baytech
   0.031083	match_sysoid: checking MIB cpqpower
   0.031085	match_sysoid: comparing .1.3.6.1.4.1.318.1.3.2.10 with .1.3.6.1.4.1.232.165.3
   0.031087	match_sysoid: checking MIB bestpower
   0.031089	match_sysoid: checking MIB cyberpower
   0.031116	match_sysoid: comparing .1.3.6.1.4.1.318.1.3.2.10 with .1.3.6.1.4.1.3808
   0.031117	match_sysoid: checking MIB delta_ups
   0.031119	match_sysoid: comparing .1.3.6.1.4.1.318.1.3.2.10 with .1.3.6.1.4.1.2254.2.4
   0.031121	match_sysoid: checking MIB xppc
   0.031123	match_sysoid: comparing .1.3.6.1.4.1.318.1.3.2.10 with .1.3.6.1.4.1.935
   0.031125	match_sysoid: checking MIB huawei
   0.031128	match_sysoid: comparing .1.3.6.1.4.1.318.1.3.2.10 with .1.3.6.1.4.1.8072.3.2.10
   0.031130	match_sysoid: checking MIB ietf
   0.031148	match_sysoid: comparing .1.3.6.1.4.1.318.1.3.2.10 with .1.3.6.1.4.1.850.1
   0.031151	match_sysoid: checking MIB eaton_ats
   0.031153	match_sysoid: comparing .1.3.6.1.4.1.318.1.3.2.10 with .1.3.6.1.4.1.705.1
   0.031172	match_sysoid: checking MIB apc_ats
   0.031174	match_sysoid: comparing .1.3.6.1.4.1.318.1.3.2.10 with .1.3.6.1.4.1.318.1.3.11
   0.031176	match_sysoid: checking MIB ietf
   0.031198	match_sysoid: comparing .1.3.6.1.4.1.318.1.3.2.10 with .1.3.6.1.2.1.33
   0.031201	No matching MIB found for sysOID '.1.3.6.1.4.1.318.1.3.2.10'!
Please report it to NUT developers, with an 'upsc' output for your device.
Going back to the classic MIB detection method.
   0.031205	load_mib2nut: trying classic method with 'apcc' mib
   0.031222	su_find_info: "ups.model" found
   0.031224	Testing ups.model using OID .1.3.6.1.4.1.318.1.1.1.1.1.1.0
   0.031227	Entering nut_snmp_get_str()
   0.031229	nut_snmp_get(.1.3.6.1.4.1.318.1.1.1.1.1.1.0)
   0.031247	nut_snmp_walk(.1.3.6.1.4.1.318.1.1.1.1.1.1.0)
   0.031249	nut_snmp_walk: max. iteration = 1
   0.055859	load_mib2nut: testOID provided and matches MIB 'apcc'!
   0.055888	load_mib2nut: using apcc mib
   0.055891	su_find_info: "ups.model" found
   0.055892	Entering nut_snmp_get_str()
   0.055910	nut_snmp_get(.1.3.6.1.4.1.318.1.1.1.1.1.1.0)
   0.055911	nut_snmp_walk(.1.3.6.1.4.1.318.1.1.1.1.1.1.0)
   0.055914	nut_snmp_walk: max. iteration = 1
   0.075492	Detected SMART-UPS 1400 on host 192.5.37.191 (mib: apcc 1.2)
   0.075503	su_find_info: unknown info type (load.off.delay)
   0.075505	su_find_info: unknown info type (load.on.delay)
   0.075508	su_find_info: unknown info type (load.off.delay)
   0.075510	Initiating UPS shutdown
   0.075511	upsdrv_shutdown...
   0.075515	Unknown template type: shutdown.return
   0.075518	entering su_instcmd(shutdown.return, (null))
   0.075521	su_find_info: "shutdown.return" found
   0.075523	entering nut_snmp_set(.1.3.6.1.4.1.318.1.1.1.6.1.1.0, i, 2)
   6.083811	[nutdev1] nut_snmp_set: can't set .1.3.6.1.4.1.318.1.1.1.6.1.1.0: Timeout
   6.083825	su_instcmd: cannot set value for shutdown.return
   6.083827	Unknown template type: shutdown.reboot
   6.083828	entering su_instcmd(shutdown.reboot, (null))
   6.083833	su_find_info: unknown info type (shutdown.reboot)
   6.083834	su_instcmd: shutdown.reboot unavailable
   6.083836	Unknown template type: load.off.delay
   6.083837	entering su_instcmd(load.off.delay, (null))
   6.083840	su_find_info: unknown info type (load.off.delay)
   6.083841	su_instcmd: load.off.delay unavailable
   6.083843	Shutdown failed!
]0;lvd at chscc-pc-052:~: || lvd at chscc-pc-052 ~ [938] ; exit

Script done on 2020-05-04 09:20:46-07:00
-------------- next part --------------
# with UPS still connected to wall power, issuing the command: snmpset -v 3 -a MD5 -A NutScan at Password43LongerWord -l authPriv -u nut -x DES -X NutScan at Password43LongerWord apcups SNMPv2-SMI::enterprises.318.1.1.1.6.1.1.0 i 2

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eno1, link-type EN10MB (Ethernet), capture size 262144 bytes
12:21:32.420097 IP chscc-pc-052.castle.org.53821 > apcups.castle.org.snmp:  F=r U="" E= C="" GetRequest(14) 
12:21:32.435927 IP apcups.castle.org.snmp > chscc-pc-052.castle.org.53821:  F= U="" E=_80_00_01_3e_03_00_c0_b7_67_10_1e C="" Report(35)  S:snmpUsmMIB.usmMIBObjects.usmStats.usmStatsUnknownEngineIDs.0=26
12:21:32.436050 IP chscc-pc-052.castle.org.53821 > apcups.castle.org.snmp:  F=apr U="nut" [!scoped PDU]bc_f2_48_52_3b_2d_6f_4e_e6_c1_57_93_1d_09_e8_58_f4_a0_f5_16_c9_84_9a_93_e2_4a_ff_3c_23_9e_e4_91_af_60_f4_ce_73_3b_f6_d3_8f_af_d9_0c_66_f4_57_63_2d_05_34_31_34_d5_9d_85
12:21:32.733629 IP apcups.castle.org.snmp > chscc-pc-052.castle.org.53821:  F=ap U="nut" [!scoped PDU]06_5f_ae_5d_53_38_3b_ac_42_cf_b9_b9_d9_c7_5f_53_28_ff_b6_8b_bd_30_b4_83_84_32_b6_79_99_e1_82_25_9e_02_0e_4f_9f_e0_22_2d_35_e6_f2_b9_5d_84_35_67_6b_a4_41_67_84_db_ef_96_e6_c5_42_dc_fd_a3_03_72


# With UPS *disconnected* from wall power, issuing the command: please snmp-ups -DDDD -a nutdev1 -x secLevel=authPriv -x secName=nut -x authProtocol=MD5 -x privProtocol=DES -x authPassword=NutScan at Password43LongerWord -x privPassword=NutScan at Password43LongerWord  -k

12:23:40.638679 IP chscc-pc-052.castle.org.59949 > apcups.castle.org.snmp:  GetRequest(28)  system.sysObjectID.0
12:23:40.661202 IP apcups.castle.org.snmp > chscc-pc-052.castle.org.59949:  GetResponse(43)  system.sysObjectID.0=E:318.1.3.2.10
12:23:40.661575 IP chscc-pc-052.castle.org.59949 > apcups.castle.org.snmp:  GetRequest(34)  E:318.1.1.1.1.1.1.0
12:23:40.683485 IP apcups.castle.org.snmp > chscc-pc-052.castle.org.59949:  GetResponse(52)  E:318.1.1.1.1.1.1.0="SMART-UPS 1400"
12:23:40.683647 IP chscc-pc-052.castle.org.59949 > apcups.castle.org.snmp:  GetRequest(34)  E:318.1.1.1.1.1.1.0
12:23:40.705778 IP apcups.castle.org.snmp > chscc-pc-052.castle.org.59949:  GetResponse(52)  E:318.1.1.1.1.1.1.0="SMART-UPS 1400"
12:23:40.705986 IP chscc-pc-052.castle.org.59949 > apcups.castle.org.snmp:  SetRequest(35)  E:318.1.1.1.6.1.1.0=2
12:23:41.707388 IP chscc-pc-052.castle.org.59949 > apcups.castle.org.snmp:  SetRequest(35)  E:318.1.1.1.6.1.1.0=2
12:23:42.708797 IP chscc-pc-052.castle.org.59949 > apcups.castle.org.snmp:  SetRequest(35)  E:318.1.1.1.6.1.1.0=2
12:23:43.710204 IP chscc-pc-052.castle.org.59949 > apcups.castle.org.snmp:  SetRequest(35)  E:318.1.1.1.6.1.1.0=2
12:23:44.711606 IP chscc-pc-052.castle.org.59949 > apcups.castle.org.snmp:  SetRequest(35)  E:318.1.1.1.6.1.1.0=2
12:23:45.712889 IP chscc-pc-052.castle.org.59949 > apcups.castle.org.snmp:  SetRequest(35)  E:318.1.1.1.6.1.1.0=2


# With UPS disconnected from wall power, issuing the command: snmpset -v 3 -a MD5 -A NutScan at Password43LongerWord -l authPriv -u nut -x DES -X NutScan at Password43LongerWord apcups SNMPv2-SMI::enterprises.318.1.1.1.6.1.1.0 i 2

12:23:55.247839 IP chscc-pc-052.castle.org.36736 > apcups.castle.org.snmp:  F=r U="" E= C="" GetRequest(14) 
12:23:55.263781 IP apcups.castle.org.snmp > chscc-pc-052.castle.org.36736:  F= U="" E=_80_00_01_3e_03_00_c0_b7_67_10_1e C="" Report(35)  S:snmpUsmMIB.usmMIBObjects.usmStats.usmStatsUnknownEngineIDs.0=27
12:23:55.263970 IP chscc-pc-052.castle.org.36736 > apcups.castle.org.snmp:  F=apr U="nut" [!scoped PDU]fa_ff_1a_bd_cb_c6_71_44_15_87_01_2c_5e_82_86_51_81_cb_02_83_61_a2_a1_6e_84_57_6e_a7_da_00_45_4e_64_49_58_11_8c_63_c5_fc_fd_b6_0a_b3_18_b4_ef_10_e7_05_44_5b_71_5c_0b_95
12:23:56.265382 IP chscc-pc-052.castle.org.36736 > apcups.castle.org.snmp:  F=apr U="nut" [!scoped PDU]0f_43_59_dd_d4_4a_01_07_02_fd_f1_d6_9f_71_bb_08_71_77_9e_9a_40_09_31_2b_c4_ab_94_13_22_2d_8f_7b_5d_60_aa_1a_3f_ea_46_6f_dc_8d_12_8f_57_0c_f4_52_90_b7_4a_d2_89_c4_50_f6
12:23:56.385768 IP apcups.castle.org.snmp > chscc-pc-052.castle.org.36736:  F=ap U="nut" [!scoped PDU]6a_b9_56_e3_85_4c_8a_d3_9d_0a_e8_47_b8_3a_65_30_3f_8a_25_1a_2b_2c_7d_cb_da_47_50_31_15_45_0a_5d_ac_fc_ec_90_71_f1_20_6e_67_24_1e_1a_40_19_36_74_0e_77_9a_54_ed_32_83_dd_f0_23_76_8e_71_f3_67_75
12:23:56.908740 IP apcups.castle.org.snmp > chscc-pc-052.castle.org.36736:  F=ap U="nut" [!scoped PDU]21_dc_53_75_43_1d_e0_bb_96_40_fb_fd_87_be_b9_8a_81_31_a3_47_ae_27_02_c7_63_3d_20_2d_c0_10_c3_6e_68_a1_3e_0b_5f_8c_81_d3_64_e5_31_4e_dc_38_26_a1_f2_bd_ef_34_a3_a0_77_4b_c4_5d_e7_31_48_e5_90_98



More information about the Nut-upsuser mailing list