Socket problem observations

In my previous post I reported that I had problem with FitNesse to open a socket. I made further observations. This is no problem with FitNesse itself, it seems to be more general. I looked at the FitNesse sources and extracted this small test class reproducing my problem:

package playground;


public class SocketTest {
public static void main(String[] args) throws IOException {
Socket socket = new Socket();
SocketAddress localaddress = new
InetSocketAddress(InetAddress.getLocalHost(),8888) ;
System.out.println(“Socket established #1”);

socket = new Socket(, 8888);
System.out.println(“Socket established #2”);

Of course I expect that I get both System outs, but for some reason the first succeeds, the second rans into a timeout.

java -cp bin playground.SocketTest
Socket established #1
Exception in thread “main” Operation timed out

What I have recognized in the meanwhile is that it has something to do with my UMTS modem connection. When I am online I sometimes (!) run into this problem, but when I disconnect then it succeeds.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s