[jcifs] Named pipes timeout errors

Michael B.Allen mballen at erols.com
Fri Mar 29 07:22:46 EST 2002

On Thu, 28 Mar 2002 16:23:14 -0000
Simon Wilcox <SWilcox at categoric.com> wrote:

> Hi,
> I am trying to get the named pipes sample to run on Windows 2000 and am
> having some problems with timeouts.
> The named pipe is being created fine from the C app but when the java sample
> tries to write to the pipe I get the following exception:
> writing 65535 bytes
> Mar 28 11:59:15.280 - exception reading from socket input
> java.net.SocketException: Socket closed
>         at java.net.SocketInputStream.read(SocketInputStream.java:96)
>         at
> jcifs.netbios.SessionServicePacket.readPacketType(SessionServicePacket.java:
> 68)
>         at jcifs.netbios.SocketInputStream.read(SocketInputStream.java:73)
>         at jcifs.netbios.SocketInputStream.read(SocketInputStream.java:39)
>         at java.io.FilterInputStream.read(FilterInputStream.java:69)
>         at java.io.PushbackInputStream.read(PushbackInputStream.java:123)
>         at jcifs.smb.SmbTransport.run(SmbTransport.java:303)
>         at java.lang.Thread.run(Thread.java:484)
> jcifs.smb.SmbException: Timeout waiting for response from server.
> simonw/
>         at jcifs.smb.SmbTransport.sendTransaction(SmbTransport.java:616)
>         at jcifs.smb.SmbSession.sendTransaction(SmbSession.java:117)
>         at jcifs.smb.SmbTree.sendTransaction(SmbTree.java:65)
>         at jcifs.smb.SmbFile.sendTransaction(SmbFile.java:470)
>         at
> jcifs.smb.TransactNamedPipeOutputStream.write(TransactNamedPipeOutputStream.
> java:53)
>         at CallNamedPipe.main(CallNamedPipe.java:44)
> Exception in thread "main"
> Any ideas?

I don't recall ever receiving confirmation that the named pipes code works
with Win2K but MS is pretty good about maintaining backward compatibility
so I'd be pretty surprised if it didn't work. And we have not had any
reports to the contrary (yet). You are following the instructions in
the following document right?


In particular, for the CallNamedPipe example you're using the /P 0x6
flag with createnp.exe right? Also make sure networking is "on" on the
machine. I have heard that the CIFS server doesn't run unless theres a
cable in the jack. That may have just be laptops though.


May The Source be with you.

More information about the jcifs mailing list