You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Roy Smith <ro...@panix.com> on 2004/03/04 18:24:37 UTC

Re: tomcat-user Digest 4 Mar 2004 15:10:03 -0000 Issue 4116

On Mar 4, 2004, at 10:10 AM, tomcat-user-digest-help@jakarta.apache.org 
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org