I am trying to run the sampleAgent that is shipped with Agent API. I am starting the process “-c udp:10.89.234.198/8000” as parameters. i am able to start the process but i see the following exception are coming when it tries sending a notification.
from the logs and code i see that it is trying to send the notification to “127.0.0.1/162”. i dont have any application runnign on that port and i dont see any configuration to customize this so thta i can send notifications to my custom ip addres. please help
exception is:
Sending message to 127.0.0.1/162 with length 71: 30:45:02:01:01:04:06:70:75:62:6c:69:63:a6:38:02:04:50:16:ab:c0:02:01:00:02:01:00:30:2a:30:0f:06:08:2b:06:01:02:01:01:03:00:43:03:00:9e:40:30:17:06:0a:2b:06:01:06:03:01:01:04:01:00:06:09:2b:06:01:06:03:01:01:05:05
java.net.BindException: Cannot assign requested address: Datagram send failed
VACM access requested for context=, securityName=public, securityModel=2, securityLevel=1, viewType=0, OID=1.3.6.1.6.3.1.1.5.5
Found group name ‘v1v2cgroup’ for secName ‘public’ and secModel 2
Got views [DefaultMOMutableRow2PC[index=10.118.49.118.50.99.103.114.111.117.112.0.1.1,values=[1, unrestrictedReadView, unrestrictedWriteView, unrestrictedNotifyView, 3, 1], DefaultMOMutableRow2PC[index=10.118.49.118.50.99.103.114.111.117.112.0.2.1,values=[1, unrestrictedReadView, unrestrictedWriteView, unrestrictedNotifyView, 3, 1]] for group name ‘v1v2cgroup’
Matching against access entry DefaultMOMutableRow2PC[index=10.118.49.118.50.99.103.114.111.117.112.0.1.1,values=[1, unrestrictedReadView, unrestrictedWriteView, unrestrictedNotifyView, 3, 1] with exactContextMatch=true, prefixMatch=false, matchSecModel=false and matchSecLevel=true
Matching against access entry DefaultMOMutableRow2PC[index=10.118.49.118.50.99.103.114.111.117.112.0.2.1,values=[1, unrestrictedReadView, unrestrictedWriteView, unrestrictedNotifyView, 3, 1] with exactContextMatch=true, prefixMatch=false, matchSecModel=true and matchSecLevel=true
Matching view found for group name ‘v1v2cgroup’ is ‘unrestrictedNotifyView’
Access allowed for view ‘unrestrictedNotifyView’ by subtree 1.3.6 for OID 1.3.6.1.6.3.1.1.5.5
Sending message to 127.0.0.1/162 with length 71: 30:45:02:01:01:04:06:70:75:62:6c:69:63:a7:38:02:04:50:16:ab:c1:02:01:00:02:01:00:30:2a:30:0f:06:08:2b:06:01:02:01:01:03:00:43:03:00:9e:41:30:17:06:0a:2b:06:01:06:03:01:01:04:01:00:06:09:2b:06:01:06:03:01:01:05:05
VACM access requested for context=, securityName=SHA256DES, securityModel=3, securityLevel=3, viewType=0, OID=1.3.6.1.6.3.1.1.5.5
Found group name ‘v3group’ for secName ‘SHA256DES’ and secModel 3
at java.net.DualStackPlainDatagramSocketImpl.socketSend(Native Method)
at java.net.DualStackPlainDatagramSocketImpl.send(Unknown Source)
at java.net.DatagramSocket.send(Unknown Source)
at org.snmp4j.transport.DefaultUdpTransportMapping.sendMessage(DefaultUdpTransportMapping.java:117)
at org.snmp4j.transport.UdpTransportMapping.sendMessage(UdpTransportMapping.java:1)
at org.snmp4j.MessageDispatcherImpl.sendMessage(MessageDispatcherImpl.java:203)
at org.snmp4j.MessageDispatcherImpl.sendPdu(MessageDispatcherImpl.java:522)
at org.snmp4j.Snmp.sendMessage(Snmp.java:1088)
at org.snmp4j.Snmp.send(Snmp.java:981)
at org.snmp4j.Snmp.send(Snmp.java:961)
at org.snmp4j.Snmp.send(Snmp.java:926)
at org.snmp4j.agent.mo.snmp.NotificationOriginatorImpl.sendNotification(NotificationOriginatorImpl.java:270)
at org.snmp4j.agent.mo.snmp.NotificationOriginatorImpl.notify(NotificationOriginatorImpl.java:376)
at org.snmp4j.agent.mo.snmp.NotificationOriginatorImpl.notify(NotificationOriginatorImpl.java:140)
at org.snmp4j.agent.NotificationTask.run(NotificationTask.java:68)
at org.snmp4j.util.ThreadPool$TaskManager.run(ThreadPool.java:312)
Failed to send notification: Cannot assign requested address: Datagram send failed