[jcifs] RE: ÄjcifsÜ Timeouts when not connected to the network
Allen, Michael B (RSCH)
Michael_B_Allen at ml.com
Tue Oct 16 08:27:32 EST 2001
> -----Original Message-----
> From: Kammerloher Josef [SMTP:Josef.Kammerloher at softlab.de]
> I think my problems could be solved if I am able to fill the
> name service address cache through the API and to suppress
> the QUERY request. Is there a way to do it ?
You can put it in an lmhosts file and set jcifs.netbios.lmhosts=lmhosts but that's not going to do anything. I can see in the trace that it's got the ip for that name:
> PC3491<20> PC3491<20>/126.96.36.199
> PC3491_JENA<00> PC3491_JENA<00>/188.8.131.52
> PC3491<00> PC3491<00>/184.108.40.206
> MLI3CB91C4EBRAD<42> MLI3CB91C4EBRAD<42>/220.127.116.11
> KAL<03> KAL<03>/18.104.22.168
> Oct 15 09:05:17.910 - smb open warning
> Oct 15 09:05:17.960 - smb negotiation warning
> requesting negotiation with PC3491<20>/22.214.171.124
> Oct 15 09:05:17.990 - session service warning
> session established ok with PC3491<20>/126.96.36.199
And it's nogotiating ok. It creates the netbios session. What is the command that you are issuing (read, list, .. etc)? What are the deatils of this "Virtual NT Drive"? Is it written using
provided API functions? Do you have a Win32 client that works? I think if you really want to figure this out you have to make two traces with netmon or ethereal; one of working operation and one of
jCIFS. If you send those to me I will very carefully compare them.
> > -----Original Message-----
> > From: Allen, Michael B (RSCH) [SMTP:Michael_B_Allen at ml.com]
> > Sent: Friday, October 12, 2001 2:05 AM
> > To: 'Kammerloher Josef'; 'jcifs§lists.samba.org'
> > Subject: RE: ÄjcifsÜ Problems when not connected to the network
> > > -----Original Message-----
> > > From: Kammerloher Josef [SMTP:Josef.Kammerloher at softlab.de]
> > >
> > > But when I use jCifs at home without network connection,
> > > I have two major problems:
> > >
> > > 1) the QUERY request always times out ( 2 times 15 seconds).
> > >
> > Hmm, weird. This should be 2 time 3 seconds = 6 seconds.
> > > I only want to use local NT drives. Is there a way to make QUERY faster
> > ?
> > > I changed already some retryCounts and Timeout values, the behaviour
> > > changed,
> > > but I had no success. Can I fill the query information through the API ?
> > >
> > What hostname are you using to connect to the local machine? If you
> > use 'localhost' with the default resolveOrder=LMHOSTS,BCAST,DNS jCIFS will
> > broadcast for the name LOCALHOST which is not a
> > NetBIOS name and therefore it will fail and timeout. The name 'localhost'
> > is technically a DNS thing so the BCAST times out after 6 seconds and
> > try's DNS which works. You have a couple of options. The
> > _right_ way would be to use the real name of the local machine. Another
> > would be to switch to resolveOrder=LMHOSTS,DNS,BCAST so that DNS is
> > _before_ BCAST. You can also use the hostname that jCIFS
> > uses as the local hostname. This is normally dynamically generated like
> > JCIFS34_159_A6 but you can set it with the jcifs.netbios.hostname
> > property. I think the second option is probably what you want
> > but it depends on whether or not you're also connecting to hosts other
> > than the local host.
> > See http://auditorymodels.org/jcifs/src/docs/resolver.html for
> > details on name resolution.
> > > 2) On NT: When I'm not connected to PDC, I can logon as a domain user
> > > (only a warning comes up).
> > >
> > A warning? This is a normal operation so warning should not be
> > generated unless something is not quite right (e.g. bad password).
> > > When I now use jCifs to access a local share (as domain user), I always
> > > get timeout (obviously the 'logon without PDC' information is not used).
> > > Is there a way to use jCifs without connection to the PDC ?
> > >
> > jCIFS doesn't connect to the PDC. The server connects to the PDC on
> > behalf of jCIFS and does third party authentication.
> > If the target machine (localhost in this case) does not use the PDC
> > for client authentication, then a domain should simply not be specified.
> > If the target machine does use a PDC for auth then
> > a correct domain must be specified. Just because the Java VM is running on
> > the local machine does not mean it is not subject to the same security
> > restrictions as other clients. I realize you may want
> > your product to work regardless of various settings that may be different
> > but if the target requires a domain, one will have to be provided. There's
> > no way around that.
> > > Thanks a lot,
> > >
> > You're welcome.
> > Mike
More information about the jcifs