[jcifs] SmbFile.listFiles() on own server takes a long time

Kid Kalanon kid_kalanon at hotmail.com
Mon Sep 30 19:12:06 EST 2002


> > >
> > >This is a name service lookup timeout. If you ex.printStackTrace()
> > >you'll see that it's failing to lookup host4.
> > >
> >
> > Yes, it did time out but it wouldn't have thrown an exception.  It would 
>go
> > on to the next thing in the resolve order - the default was RESOLVER_DNS 
>and
> > the call to InetAddress.getByName was successful.  So the call to 
>listFiles
> > was actually successful but it took a long time.
>
>Then    it    would    have    returned   right   away.   You   must   have
>resolveOrder=BCAST,DNS  at  least  because  it's  trying  (and  failing) to
>resolve the name using BCAST first.
>

Ok, I tried the setting "-Djcifs.resolveOrder=DNS,BCAST" and now it's much 
faster!  I've just found the documentation for this, which I probably should 
have read earlier.

>
>This  is  timing out on the broadcast lookup and they getting Access denied
>trying  to  list  shares.  Relax  your permissions or use an account on the
>machine.  You  could use the jcifs.netbios.lmhosts option to get around the
>broadcast  failure  (although it is strange that it's failing to respond to
>that).
>

Setting lmhosts is not appropriate for me bacause it is expected to run on 
networks without the lmhosts setup.

Yes, the last example I sent did fail with authentication error.  I seemd to 
have oversimplified it so the log won't be so long but it also produced a 
different result.  Before the authentication error though, there was a name 
lookup that did time out.

... but my problem is solved now, and I'm happy! Thanks.

Kid.

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx




More information about the jcifs mailing list