I am using SNMPAdaptorServer for sending trap.
snmpAdaptor.snmpV1Trap(...)
For some reason it throwing IOException:
java.io.IOException: Invalid argument
at java.net.PlainDatagramSocketImpl.send(Native Method)
at java.net.DatagramSocket.send(DatagramSocket.java:625)
at com.sun.management.comm.SnmpAdaptorServer.sendTrapMessage(SnmpAdaptorServer.java:2266)
at com.sun.management.comm.SnmpAdaptorServer.sendTrapPdu(SnmpAdaptorServer.java:2237)
at com.sun.management.comm.SnmpAdaptorServer.snmpV1Trap(SnmpAdaptorServer.java:1791)
at com.sun.management.comm.SnmpAdaptorServer.snmpV1Trap(SnmpAdaptorServer.java:1704)
i think IP is not reachable in snmp peer so generating IOException. but issue is that one thread named CommunicatorServer is running infinite time. Some IO resouce is not released by this.
i have called SNMPAdaptorServer.stop(). it should release all resource.
how to fix this?