Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
I can't see the problem. "Connection timed out". The server is not responding in time. –  mailq Oct 17 '11 at 11:27

1 Answer 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.

share|improve this answer
    
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. –  user98063 Oct 17 '11 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. –  orien Oct 18 '11 at 8:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.