This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

snmpv3 authPriv issue
#1
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/.../nm_snmp.c

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

Thank you

Sotiris
Reply


Messages In This Thread
snmpv3 authPriv issue - by spapantoniou85 - 06.05.2020, 14:46
RE: snmpv3 authPriv issue - by admin - 07.05.2020, 07:46
RE: snmpv3 authPriv issue - by spapantoniou85 - 07.05.2020, 08:20
RE: snmpv3 authPriv issue - by cekca - 31.10.2024, 08:48
RE: snmpv3 authPriv issue - by admin - 31.10.2024, 09:03
RE: snmpv3 authPriv issue - by cekca - 31.10.2024, 09:22
RE: snmpv3 authPriv issue - by cekca - 31.10.2024, 10:32
RE: snmpv3 authPriv issue - by admin - 31.10.2024, 10:53
RE: snmpv3 authPriv issue - by cekca - 31.10.2024, 11:31
RE: snmpv3 authPriv issue - by cekca - 31.10.2024, 13:21
RE: snmpv3 authPriv issue - by admin - 31.10.2024, 13:24

Forum Jump: