[jcifs] SmbException -- Broken Pipe

Abrego, Renaud RAbrego at azdes.gov
Thu Nov 30 21:40:17 GMT 2006


We have multiple environments (development, QA, production).  The
development environment is the only environment that uses Sun's JVM.
The other two use BEA Jrockit because it is the only one supported by
RedHat on their Enterprise distribution (we use RHEL 3 I believe, but it
could be 2).

This problem only manifests itself in the production environment.
Although, the production environment has many more users than the other


-----Original Message-----
From: Eric Glass [mailto:eric.glass at gmail.com] 
Sent: Thursday, November 30, 2006 2:22 PM
To: Abrego, Renaud; jcifs at lists.samba.org
Subject: Re: [jcifs] SmbException -- Broken Pipe

You appear to be using the BEA jrockit JVM; does the same hapen with the
Sun JVM?

On 11/30/06, Reny Abrego <rabrego at azdes.gov> wrote:
> Hello,
> We have been experiencing a weird broken pipe issue with jcifs-1.2.10.
> Essentially, we perform arbitrary authentication against a windows 
> domain controller for a Java web application using the following code
> try {
> 	UniAddress mydomaincontroller =
> 	NtlmPasswordAuthentication mycreds =
> 		new NtlmPasswordAuthentication(
> 				defaultDomain,
> 				username,
> 				password );
> 	SmbSession.logon( mydomaincontroller, mycreds ); } catch( 
> SmbAuthException sae ) {
> 	logger.debug("SMBAuthException Occurred: ",sae);
> 	throw new AuthenticationFailureException(sae);
> } catch( SmbException se ) {
> 	logger.debug("SMBException Occurred: ",se);
> 	throw new AuthenticationFailureException(se);
> } catch (Exception e) {
> 	logger.debug("General Exception Occurred: ",e);
> 	throw new AuthenticationFailureException(e);
> }
> This works fine for a while, usually several hours, where many people 
> authenticate and can use the app.  However, after some seemingly 
> random interval of time, we begin to see "Broken Pipe" exceptions.  
> Once this occurs, authentication fails every time for everyone with 
> the same "Broken Pipe"
> exception until the application is restarted.
> Any help on this would be appreciated.  The following stacktrace is 
> representative of the exceptions we receive once authentication ceases

> to work.
> 2006-11-30 09:44:08,351 DEBUG [gov.azdes.LoginManager] SMBException
> Occurred:
> jcifs.smb.SmbException:
> java.net.SocketException: Broken pipe
> 	at jrockit.net.SocketNativeIO.write(IIIZ)I(Unknown Source)
> 	at jrockit.net.SocketNativeIO.write(III)I(Optimized Method)
> 	at
> Source)
> 	at java.net.AbstractSocketImpl$2.write(II)V(Optimized Method)
> 	at jrockit.io.NativeIOOutputStream.write([BII)V(Optimized
> 	at
> jcifs.smb.SmbTransport.doSend(Ljcifs/util/transport/Request;)V
> (SmbTransport.java:414)
> 	at jcifs.util.transport.Transport.sendrecv
> (Ljcifs/util/transport/Request;Ljcifs/util/transport/Response;J)V
> (Transport.java:70)
> 	at
> jcifs.smb.SmbTransport.send(Ljcifs/smb/ServerMessageBlock;
> Ljcifs/smb/ServerMessageBlock;)V(SmbTransport.java:603)
> 	at
> jcifs.smb.SmbSession.sessionSetup(Ljcifs/smb/ServerMessageBlock;
> Ljcifs/smb/ServerMessageBlock;)V(SmbSession.java:277)
> 	at
> jcifs.smb.SmbSession.send(Ljcifs/smb/ServerMessageBlock;
> Ljcifs/smb/ServerMessageBlock;)V(SmbSession.java:233)
> 	at
> jcifs.smb.SmbTree.treeConnect(Ljcifs/smb/ServerMessageBlock;
> Ljcifs/smb/ServerMessageBlock;)V(SmbTree.java:154)
> 	at
> jcifs.smb.SmbSession.logon(Ljcifs/UniAddress;I
> Ljcifs/smb/NtlmPasswordAuthentication;)V(SmbSession.java:169)
> 	at
> jcifs.smb.SmbSession.logon(Ljcifs/UniAddress;L
> jcifs/smb/NtlmPasswordAuthentication;)V(SmbSession.java:162)
> 	at
> gov.azdes.LoginManager.loadUserWithCredentials(Ljava/lang/String;
> Ljava/lang/String;)Lorg/acegisecurity/userdetails/UserDetails;
> (LoginManager.java:77)
> Many thanks in advance,
> -- Reny
NOTICE: This e-mail (and any attachments) may contain PRIVILEGED OR
CONFIDENTIAL information and is intended only for the use of the
specific individual(s) to whom it is addressed.  It may contain
information that is privileged and confidential under state and federal
law.  This information may be used or disclosed only in accordance with
law, and you may be subject to penalties under law for improper use or
further disclosure of the information in this e-mail and its
attachments. If you have received this e-mail in error, please
immediately notify the person named above by reply e-mail, and then
delete the original e-mail.  Thank you.

More information about the jcifs mailing list