Logic Machine Forum
snmpv3 authPriv issue - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: snmpv3 authPriv issue (/showthread.php?tid=2631)



snmpv3 authPriv issue - spapantoniou85 - 06.05.2020

Hello to all,

I have been working in the last period to integrate a series of UPS of APC using the snmp protocol.

The version required is v3. 

I have used this site: http://luasnmp.luaforge.net/objects.html to get information for the parameters of snmp.

Code:
ups1, err = snmp.open{
    version = snmp.SNMPv3,
  community = "public",
  port = 161,
  peer = "IP address",
  user = "Sotirios",
  authPassphrase = "Papantoniou1",
  privPassphrase  = "Papantoniou2",
  authType = "MD5",
  privType = "AES",
  timeout = 2,
  securityLevel = "authNoPriv",--"noAuthNoPriv",
  }
assert(ups1, err)
log(ups1)
log(err)

local OID_NAS3 = {
    {'Varname',"1.3.6.1.4.1.935.1.1.1.1.1.1.0"},--NEW
}

  for _, item in ipairs(OID_NAS3) do
    vbind, err = ups1:get(item[2])
    if vbind then
    log(vbind.value)
    else
      log('error reading from snmp: ' .. tostring(err))
      --grp.checkwrite('EL_UPS_communication_KO',true)
     
    end
  end

On security level when I am using noAuthNoPriv or authNoPriv everything is working correctly. When I use authPriv adding all the parameters correctly (cross-checked with other 3rd party software) I have problem with the communication. 

The log message I got was:


Code:
error reading from snmp: snmp: internal error - synch request id is 0

This error arrives even when the parameters I have inserted are wrong. Google searching:"synch request id is 0"  I have found the error on the source code but no explanation why this is happening.https://github.com/hleuwer/luasnmp/blob/master/src/nm_snmp.c

Has anybody else found a similar problem? How can I solve this issue?

Thank you

Sotiris


RE: snmpv3 authPriv issue - admin - 07.05.2020

Current version of SNMP library does not have encryption support. We'll try to update it for the next FW release.


RE: snmpv3 authPriv issue - spapantoniou85 - 07.05.2020

(07.05.2020, 07:46)admin Wrote: Current version of SNMP library does not have encryption support. We'll try to update it for the next FW release.

Hello admin,

thank you for the answer. Do you have an estimation on when the next FW release will be? 

Thank you

Sotiris