[jcifs] Re: SocketException: Connection reset
Michael B Allen
mba2000 at ioplex.com
Fri Dec 19 22:54:02 GMT 2003
> Hello Michael,
>
> I'm about "java.net.SocketException: Connection reset"
>
First, how frequently is this message printed in the log?
Second, thanks. I was hoping someone would get a capture of this. It would be nice
if you could get the HTTP port used by IE clients and run your capture on the web
server but your capture was very informative non-the-less.
What I see (intermingled with a lot of other irrelivant traffic) is the domain
controller periodically emitting a NetBIOS session service message containing one
0 byte. This appears to be some kind of "heartbeat". Fortunately the capture also
caught these heartbeat messages with three clients in total. The behavior of all
clients is the same; they do nothing other than send an ACK. Assuming not all
clients are jCIFS then it appears that jCIFS is doing the right thing to deal with
the heartbeat (it ignores it).
The RST that is causing this "Connection reset" message is immediately followed by
one of these hearbeat messages which suggests to me that the domain controller is
just doing some benign connection/resource management.
The problem of course is that there is a message being written into the log. I
have modified jCIFS to supress this particular message. I have upload a
jcifs-0.7.17t.jar with this change. Please try it. I will upload the new
jcifs-0.7.17 packages within a day or so.
Otherwise the change is in jcifs/smb/SmbTransport.java:
432 // it's a request(break oplock)
433 }
434 }
435 } catch( InterruptedIOException iioe ) {
436 if( responseTable.size() == 0 ) {
437 tryClose( false );
438 } else {
439 Log.println( Log.WARNINGS, "smb warning",
440 " soTimeout has occured but there are " +
441 responseTable.size() + " pending requests" );
442 }
443 } catch( IOException ioe ) {
444 synchronized( this ) {
445 tryClose( true );
446 }
447 if( ioe.getMessage().startsWith( "Connection reset" ) == false ) {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
448 Log.printStackTrace( "exception reading from socket input: " +
addressioe );
449 }
450 }
I just added the clause above.
Again, how frequently does this message appear in the log? Can you calculate the
frequency in seconds? Is it consistent?
Mike
--
A program should be written to model the concepts of the task it
performs rather than the physical world or a process because this
maximizes the potential for it to be applied to tasks that are
conceptually similar and, more important, to tasks that have not
yet been conceived.
More information about the jcifs
mailing list