You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Jørgen Nørgaard <jn...@anneli.dk> on 2003/01/30 08:41:23 UTC

commons-net: TelnetClient on Solaris - timeout problem

Hello,

[repost as I didn't realise the first time that the list was for all 
of commons]

we have a small application that uses the commons-net package, 
specifically telnet to retrieve information from other hosts. It 
works fine.

However, the timeout for connections to hosts not responding for some 
reason is a bit problematic.
On Linux and Windows, using jdk 1.3.x and 1.4.x setting 
DefaultTimeout this works as expected.

On Solaris however all connections using commons-net timeout after 
around 4 mins.

The only way I see to do something on Solaris is to use jdk1.4.x 
which has a more elaborate api for Sockets. The program "sock" 
illustrates this.



Any ideas how to make this work nicely on Solaris also?



Attrached:
LOG contains measurements on Solaris first and then on Linux to see difference.
tel.java, connection using TelnetClient
sock.java, connection using only Socket


As it turns out, the message linux jdk produces, 
java.net.NoRouteToHostException: No route to host, may not be 
entirely correct. At least that is what one network expert told me. 
The target address is on the same subnet as my machines, so no 
routing is involved?


Regards,
-- 
/jørgen nørgaard                               ... For privacy ...
e-mail: jnp@anneli.dk | Phone: +45 2627 3769
http://anneli.dk/~jnp/                            ... PGP! ...
                                         |\      _,,,---,,_
                                         /,`.-'`'    -.  ;-;;,_ 
                                         |,4-  ) )-,_. ,\ (  `'-'
                                        '---''(_/--'  `-'\_)