[jcifs] java.net.SocketException: Broken pipe

Michael B Allen ioplex at gmail.com
Tue Jul 14 12:31:12 MDT 2009


On Tue, Jul 14, 2009 at 1:04 PM, Yogesh Shukla<yshukla at lexmark.com> wrote:
> Did anyone using jcifs ever see SocketException with broken pipe? I am getting
> this randomly. This seems to happen very rarely but once it does my app fails to
> connect to the network share, unless I reboot the machine. And then again it
> would work fine until I see this error and then it would stop working again.
>
> java.net.SocketException: Broken pipe
>        at java.net.SocketImpl.sendStreamImpl(Native Method)
>        at java.net.SocketImpl.write(Unknown Source)
>        at java.net.SocketOutputStream.write(Unknown Source)
>        at jcifs.smb.SmbTransport.doSend(Unknown Source)
>        at jcifs.util.transport.Transport.sendrecv(Unknown Source)
>        at jcifs.smb.SmbTransport.send(Unknown Source)
>        at jcifs.smb.SmbSession.sessionSetup(Unknown Source)
>        at jcifs.smb.SmbSession.send(Unknown Source)
>        at jcifs.smb.SmbTree.treeConnect(Unknown Source)
>        at jcifs.smb.SmbFile.connect(Unknown Source)
>        at jcifs.smb.SmbFile.connect0(Unknown Source)
>        at jcifs.smb.SmbFile.queryPath(Unknown Source)
>        at jcifs.smb.SmbFile.exists(Unknown Source)

This error is not unusual in itself. It simply means the socket
connection was lost.

However, JCIFS should immediately recover. You should not need to
reboot the machine.

The next time it happens, try just restarting the application and not
rebooting the machine. If restarting the JVM fixes the problem, then
it is not a problem with the server in which case I will have to
investigate further. Although it is a little difficult to simulate
socket failures so I need some conclusive information before I add
this to the TODO list.

Mike

-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/


More information about the jcifs mailing list