[jcifs] SmbException -- Broken Pipe

Eric Glass eric.glass at gmail.com
Thu Nov 30 21:22:22 GMT 2006


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 snippet:
>
> try {
> 	UniAddress mydomaincontroller = UniAddress.getByName(domainController);
> 	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 jrockit.io.NativeIO.write(Ljava/io/FileDescriptor;II)I(Unknown
> Source)
> 	at java.net.AbstractSocketImpl$2.write(II)V(Optimized Method)
> 	at jrockit.io.NativeIOOutputStream.write([BII)V(Optimized Method)
> 	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
>
>
>


More information about the jcifs mailing list