[SNMP4J] how to run the TestAgent.java?

Tong Kwok Kei Kei.tong at globale.com.hk
Thu Aug 20 05:20:26 CEST 2009


1) Still have exception
Caused by: java.net.BindException: Cannot assign requested address: Cannot
bind

	at java.net.PlainDatagramSocketImpl.bind0(Native Method)

	at java.net.PlainDatagramSocketImpl.bind(Unknown Source)

	at java.net.DatagramSocket.bind(Unknown Source)

	at java.net.DatagramSocket.<init>(Unknown Source)

	at java.net.DatagramSocket.<init>(Unknown Source)

	at
org.snmp4j.transport.DefaultUdpTransportMapping.<init>(DefaultUdpTransportMa
pping.java:99)

	... 8 more

Our system use windows network, not Unix network, and we have checked that
no application using port 161.
2)In TestAgent.java, the error prompt when testAgent1.init(); which is
before 
testAgent1.sendColdStartNotification();
is it abnormal?
3) under normal circumstances, is it just assign 192.168.20.72/161 to
TestAgent.java without any modification and the program should run
successfully? What is the message sent to manager? If I want to send the CPU
or Memory utilization to manager, what should I change in the
TestAgent.java? 

-----Original Message-----
From: snmp4j-bounces at agentpp.org [mailto:snmp4j-bounces at agentpp.org] On
Behalf Of Frank Fock
Sent: Thursday, August 20, 2009 2:34 AM
To: Tong Kwok Kei
Cc: snmp4j at agentpp.org
Subject: Re: [SNMP4J] how to run the TestAgent.java?

Please read the SNMP4J FAQs at:

http://wiki.oosnmp.net/confluence/pages/viewpage.action?pageId=884741

and

http://wiki.oosnmp.net/confluence/pages/viewpage.action?pageId=884739

Best regards,
Frank

Tong Kwok Kei wrote:
> In TestAgent.java, public static void main, there is statement
> 
> TestAgent testAgent1 = new TestAgent(new File("SNMP4JTestAgentBC.cfg"),
> 
>                                            new
> File("SNMP4JTestAgentConfig.cfg"));
> 
> but I can't found these two files in the downloaded source, where is it? 
> 
> Also, if I want to write an example to simulate an agent using
> TestAgent.java and the manager ip is 192.168.20.72/162, then is it just
pass
> 192.168.20.72/162 in the main method of TestAgent.java is enough? But I
> encounter the exception as follow:
> 
> Caused by: java.net.BindException: Cannot assign requested address: Cannot
> bind 
> 
> What is the problem?
> 
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.snmp4j.com
http://www.mibexplorer.com
http://www.mibdesigner.com

_______________________________________________
SNMP4J mailing list
SNMP4J at agentpp.org
http://lists.agentpp.org/mailman/listinfo/snmp4j





More information about the SNMP4J mailing list