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

Michael B Allen ioplex at gmail.com
Tue Aug 17 23:02:50 MDT 2010


On Mon, Aug 16, 2010 at 7:54 PM, Marasim <marasim at gmail.com> wrote:
> 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.

Hi Marasim,

If you have a retry loop, why do you care if JCIFS has to reopen the pipe?

If a connection is idle for longer than jcifs.smb.client.soTimeout
milliseconds, it will be closed to conserve resources. This is by
design.

Mike

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


More information about the jCIFS mailing list