[SNMP4J] Bind Exception (cannot assign)

Tony Horst rbs2002 at freenet.de
Mon Jul 27 19:13:18 CEST 2009


hmmm, a switch ip - what can i do to catch traps? (V1 and V2c, V3 is
unimportant) and if i want to set a variable value, is it the same?

Thanks

Frank Fock schrieb:
> Is 172.17.240.10 the IP of your local system
> or the IP of the switch?
> 
> Since you cannot bind an address of a external
> system, ...
> 
> Frank
> 
> rbs2002 at freenet.de wrote:
>> Thank you, but it did not work :( Maybe i'am to stupid, but
>> I have change this    listenAddress = new
>> UdpAddress("172.17.240.10/8000");
>> to this:
>>     listenAddress = new
>> UdpAddress(InetAddress.getByName("172.17.240.10"), 162);
>> But everytime the same s***....
>>
>> ----- original Nachricht --------
>>
>> Betreff: Re: [SNMP4J] Bind Exception (cannot assign)
>> Gesendet: Mo 27 Jul 2009 13:57:39 CEST
>> Von: "lalit patel"
>>
>> Hi rbs2002,
>>
>> I think you should use other constructor of UdpAddress class. Also
>> since you are listening of traps from a standard device, you should
>> use port number 162.
>>
>> good luck
>>
>> with kind regards
>>
>> lalit patel
>>
>>
>> On Mon, Jul 27, 2009 at 2:39 PM, <rbs2002 at freenet.de> wrote:
>> Hello,
>> i use snmp4j and want to catch traps from a cisco 3550 switch. I can
>> ping the switch, i can use telnet - everything no problem. But i can't
>> connect this switch. I used the example from the package, many
>> different ports but it did not work too )only if i use the ip 0.0.0.0
>> - but this is useless for my project, i think).
>> Here my code:
>>    threadPool = ThreadPool.ception: Cannot assign requested address:
>> Cannot bind
>>        at java.net.PlainDatagramSocketImpl.bind0(Native Method)
>>        at
>> java.net.PlainDatagramSocketImpl.bind(PlainDatagramSocketImpl.java:82)
>>        at java.net.DatagramSocket.bind(DatagramSocket.java:368)
>>        at java.net.DatagramSocket.(DatagramSocket.java:210)
>>        at java.net.DatagramSocket.(DatagramSocket.java:261)
>>        at org.snmp4j.transport.DefaultUdpTransportMapping.(Unknown
>> Source)
>>        at
>> Server_Client.MultiThreadedTrapReceiver.init(MultiThreadedTrapReceiver.java:60)
>>
>>        at
>> Server_Client.MultiThreadedTrapReceiver.run(MultiThreadedTrapReceiver.java:74)
>>
>>        at
>> Server_Client.MultiThreadedTrapReceiver.main(MultiThreadedTrapReceiver.java:85)
>>
>>
>> I hope you can help me ;)
>>
>>
>> _______________________________________________
>> SNMP4J mailing list
>> SNMP4J at agentpp.org
>> http://lists.agentpp.org/mailman/listinfo/snmp4j
>>
>>
>>
>> --- original Nachricht Ende ----
>>
>>
>> _______________________________________________
>> SNMP4J mailing list
>> SNMP4J at agentpp.org
>> http://lists.agentpp.org/mailman/listinfo/snmp4j
> 




More information about the SNMP4J mailing list