[jcifs] SmbFile.listFiles() on own server takes a long time
kid_kalanon at hotmail.com
Mon Sep 30 11:31:46 EST 2002
> > the output looks like (the actual names have been removed to protect the
> > innocent):
> > smb://host1 listFiles() took 0 milliseconds
>Wow, that's pretty fast. Urr, a little too fast actually.
Yeah, I forgot to mention that all these listFiles calls would have caused
SmbAuthException because I didn't set and login stuff. But the point I
wanted to make was name lookup failure.
> > smb://host2 listFiles() took 47 milliseconds
> > smb://host3 listFiles() took 0 milliseconds
> > smb://host4 listFiles() took 6000 milliseconds
>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.
> > smb://host5 listFiles() took 0 milliseconds
> > smb://host6 listFiles() took 15 milliseconds
> > I am on a LAN with usually 5 to 6 computers running either Windows 2000
> > Windows NT and all on the same workgroup. There are no Linux or Unix
> > on the LAN. As you can see, host4 is the culprit and that's the
> > just run the above code on.
>This sounds related to the WINs resolution problem just discussed. In
>this case however I think you should be able to broadcast a name service
>lookup to yourself. Weird. Can you send me a -Dlog=ALL trace of that?
Yes, I just read that after I sent that out :) like the host doesn't know
it's own IP, etc. But I don't think I have a WINS (server or service)
running anywhere on the network.
The log was slightly long for the last bit of code. I've attached the log
for the following code:
public static void main(String argv) throws Exception
SmbFile workgroup = new SmbFile("smb://p4-2000");
SmbFile servers = workgroup.listFiles();
My host name is actually p4-2000. I hope the attachment gets through ok,
would plain text be better?
Join the worlds largest e-mail service with MSN Hotmail.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 15558 bytes
Desc: not available
Url : http://lists.samba.org/archive/jcifs/attachments/20020930/adf7c7a4/smb.obj
More information about the jcifs