W3C home > Mailing lists > Public > www-jigsaw@w3.org > September to October 1997

Re: Socket problem with Jigsaw

From: Yves Lafon <ylafon@w3.org>
Date: Wed, 3 Sep 1997 11:23:42 +0200 (MET DST)
To: Frederic Crozat ISIMA <crozat@opgc16.univ-bpclermont.fr>
cc: www-jigsaw@w3.org
Message-ID: <Pine.SOL.3.91.970903105720.2479A-100000@tarantula.inria.fr>
On Tue, 2 Sep 1997, Frederic Crozat ISIMA wrote:

> I still have some problems with beta1 (I think those problems were
> present in alpha5) concerning socket :
> I encounter very often "socket Exception" like this one in the errlog
> client-10(socket-clients:10): caught ClientException:
> [w3c.jigsaw.http.ClientException] Socket closed
> and with beta 1, it occurs at 
> java.net.SocketException: Socket closed
>        at java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:169)
>        at java.net.Socket.setTcpNoDelay(Socket.java:311)
>        at w3c.jigsaw.http.httpd.run(httpd.java)
>        at java.lang.Thread.run(Thread.java)
> I've tried to comment the setTcpDelay but the errlog entry appears
> sometimes. I was thinking it could be related to Netscape 3.0 but it
> also have this problem with a java application wich uses Jigsaw client
> side API (and also with Jigadm). When this error is encountered, the
> socket is supposed to be closed but if I check with netstat, it's still
> open !

I have never seen this error before. It seems that Jigsaw hasn't been 
notified of the socket close. In fact you said that a netstat was showing 
the socket as still active, so it looks like a jdk bug more than a Jigsaw 
Anyway, we will inquire on this one!

> Another big problem is that when some clients are still connected to
> Jigsaw (in a keepalive idleconnection), when I try to stop the server,
> it closes its server socket but it doesn't stop itself. I've used the
> debug feature of SocketClientFactory to trace the problem and it seems 
> that Jigsaw make a join() on each client socket after killing them but 
> it wait on join on client sockets still open (by a keepalive client,
> they still appear as open in netstat). 
> It seems that Jigsaw is waiting for the socket to close themselves 
> but they don't !

The sockets have a timeout, 2 timeouts in fact. But the shutdown of the 
server FORCES the shutwodn of the all the clients (first step, close the 
idling clients, second step after a small wait, kill everything).
You can see w3c/jigsaw/http/socket/SocketClientFactory.java  killClients
There souldn't be any open socket at the end of this method call. Another 
jdk bug? (It works well on solaris and NT using Sun's jdk 1.1.3).

      /\          - Yves Lafon - World Wide Web Consortium - 
  /\ /  \                Architecture Domain - Jigsaw
 /  \    \/\    
/    \   /  \   http://www.w3.org/People/Lafon - ylafon@w3.org    
Received on Wednesday, 3 September 1997 05:23:48 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:31 UTC