[jcifs] "DCERPC pipe is no longer open" in DcerpcPipeHandle.doSendFragment()

Marasim marasim at gmail.com
Mon Aug 16 17:54:36 MDT 2010


Michael B Allen <ioplex <at> gmail.com> writes:

> 
> Hi Marasim,
> 
> That error means pretty much what it says. The connection to the
> server has closed since it was last used. If you're doing custom
> DCERPC calls, you'll need a retry loop to handle this condition.
> 
> Mike
> 
> On Mon, Aug 16, 2010 at 2:39 PM, Marasim <marasim <at> gmail.com> wrote:
> > I am getting a lot of these messages and somehow cannot make sense of it. 
Can
> > anybody please point me to the documentation or the reason so that I can
> > understand and avoid getting into this?
> >
> > Thanks a lot for your help!
> >
> > Marasim
> >
> > --
> >
> > protected void doSendFragment(byte[] buf,
> >                    int off,
> >                    int length,
> >                    boolean isDirect) throws IOException {
> >        if (out != null && out.isOpen() == false)
> >            throw new IOException("DCERPC pipe is no longer open");
> >
> >        if (in == null)
> >            in = (SmbFileInputStream)pipe.getNamedPipeInputStream();
> >        if (out == null)
> >            out = (SmbFileOutputStream)pipe.getNamedPipeOutputStream();
> >        if (isDirect) {
> >            out.writeDirect( buf, off, length, 1 );
> >            return;
> >        }
> >        out.write(buf, off, length);
> >    }

Hi Mike,

Thanks a lot as always for your time to respond!

I do have a retry loop, but what I see is that there are a lot of these 
exceptions when I have connections to a large number of hosts, that doesn't 
happen for a small number of hosts though.

I would really appreciate if you could point me to the right code path that 
causes this to happen ONLY when there are a large number of hosts involved.

I tend to believe this has something to do with the network latency or 
bandwidth, but knowing my network and latency values, that looks unlikely.

Regards,
Marasim

P.S. top-posting is discouraged, sorry if it confuses some people.



More information about the jCIFS mailing list