0

I'm trying to diagnose why a Java-based app runs for a while as a client making SOAP webservice calls, and then starts hitting an exception whereby it cannot open a socket. The OS is Windows 2003 server SP1.

The netstat -an output shows some connections in CLOSE_WAIT or TIME_WAIT, but not enough to suggest that the OS itself is out of sockets.

I suspect that there's an error in the way that the client-side API is being used (Axis2 v1.4), such that it fails to recycle some internal resource. Once we hit the condition of not being able to open a socket, we have to restart the Java app. (Somewhat strangely, though, we can still make a call out using simple java.net.URL).

I'm wondering if we can use Wireshark/Ethereal or similar to help diagnose the problem from an OS/network standpoint?

In case it is useful, our Java stack trace is:

Caused by: java.net.ConnectException: Connection timed out: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:516) at java.net.Socket.connect(Socket.java:466) at java.net.Socket.(Socket.java:366) at java.net.Socket.(Socket.java:239)

Many thanks for any insight. Dan Haywood

1
  • I can't see the problem. "Connection timed out". The server is not responding in time. Commented Oct 17, 2011 at 11:27

1 Answer 1

1

The first line in the Java stack trace says java.net.ConnectException: Connection timed out. This indicates that the client side successfully created its client socket and attempted to contact the server, however no response came back. Your problem is not in the client. My advice is to investigate whether the remote server is up. Next ensure there is no networking issue preventing the client from contacting the server.

2
  • Thanks for this; that's useful info in its own right. However, some diagnostic code was added to call the test web service when the prod web service failed, and that also timed out. It seems odd that it would take down a different server also. In any event, would Wireshark/ethereal show me outbound packets in this situation. Commented Oct 17, 2011 at 12:36
  • Wireshark would help determine what's going on. If you can see outbound packets without response, you know it's something external causing the problem. Commented Oct 18, 2011 at 8:30

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.