I have a problem with receiving SNMPv3 authPriv traps on my own Java trap receiver.
When using snmptrap command on the Linux terminal with authPriv option then the trap is never received on my Java trap receiver regardless of which authentication is used: MD5, SHA or SHA-256. Only if there is noAuthNoPriv used then the trap is received.
In my Java trap receiver the snmp4j library is used. An important note is that my Java traps receiver receives authPriv traps, regardless of which authentication is used, only when the trap is sent from my own Java trap sender with snmp4j (for all authentication protocols). Also snmptrapd daemon receives authPriv traps which are sent from own Java application with snmp4j and from terminal (with snmptrap).
I think it’s not a problem with engine ID because when the noAuthNoPriv SNMPv3 trap from terminal is sent then the engine ID is also used and when I set incorrect engine ID then the noAuthNoPriv trap is not received.
I’m using Net-SNMP 5.9 on Linux Mint and „snmp4j-2.7.0”.
Could someone help me in receiving the authPriv traps on Java application with snmp4j?