On Mar 4, 2004, at 10:10 AM, [EMAIL PROTECTED] wrote:

I have several classes that use AdvnetNet SNMP packages. One of them sends snmpSet() to several remote devices. If I run the class from a console Java application, it works ok (running on the save host where Tomcat is residing). But If I call it from a JSP page, the snmpSet() returns a "timeout trying to communicate with IP w.x.y.z" error. I tried a workaround : instead of using the Adventnet class, I used a Runtime.getRuntime().exec() call to execute a command line "/usr/bin/snmpset" command. Again, if I run the snmpset command from a shell prompt, it works ok. But if I run it from a JSP page, I get a communication timeout (cannot reach the remote IP). I wrote a small Perl CGI script that runs the same snmpset command, and it works just fine on the same host.

I'm not familiar with AdvnetNet in particular, so this is just a guess, but is it possible there's something missing in the environment when run under tomcat that the library needs? Maybe an environment variable that points to a MIB directory or something? Maybe it gets the community string from the environment? An incorrect community string would result in a timeout.


Do you have an ethernet sniffer (tcpdump, etherial, snoop, etc)? Watch port 161. Do you see any request packets go out?

What happens when you try doing a get instead of a set?


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to