[jcifs] Re: Davenport - Copy Operation Uses Many Ports?

eglass1 at comcast.net eglass1 at comcast.net
Wed Jun 9 17:32:52 GMT 2004




> Basically, I have a very simple problem.  If I attempt to copy a 'Deep' or
> 'Wide' directory structure via Davenport, it appears to keep opening
> multiple ports for the copy operations.  For example, I attempted to copy a
> default Jetty install (jetty.mortbay.org) across the network and noticed
> 800+ connections between my client and the Davenport server.  I am curious
> if there is a setting somewhere to instruct Davenport to open only x number
> of connections, or to reuse open connections?  Is there something else I
> may have missed?

Is this HTTP traffic between the client and Davenport?  Or CIFS between
Davenport and the SMB server?  The latter should be happening over ~1
connection.  The former would depend on the sequence of WebDAV operations
the client chooses to make, and the manner in which it makes them.

Ideally, the client would keep the HTTP connection alive to the Davenport
server, and run all the calls over that pipe.  If NTLM authentication is being
used, and the client isn't sending the session cookie with the request, then
the NTLM handshake will have to be performed with every operation; this
would involve a teardown of the HTTP connection (which might account for the
huge number of connections you're seeing).

Technically, I don't know that there's any reason the connection needs to be
closed by the server before the handshake (with the initial
"WWW-Authenticate: NTLM").  IIS does this, and it may be required for
some/all versions of IE, so we do it too.  IIS/IE use the physical connection to
track the authenticated session, so that's why they do this; but we don't have
that dependency (we use the session cookie instead).  If you want to
experiment, you can see what happens if you remove all the:

    response.setHeader("Connection", "close");

Another option would be to disable NTLM in Davenport and enable Basic
authentication; you could see if that affects anything.


Eric


More information about the jcifs mailing list