[jcifs] Problems with Wins Resolution
Christopher R. Hertel
crh at ubiqx.mn.org
Wed Sep 25 02:52:24 EST 2002
On Tue, Sep 24, 2002 at 06:08:45PM +0200, andrea.lanza at frameweb.it wrote:
> Hi, I am new to jcifs...(pls. don't be too severe with me !)
>
> I succeded in developing a servlet to browse my network via browser.
>
> My problem is this: if I query for an host or a domain name or a group name
> registered in Wins server , everything is OK
Okay...
> But if I just query for smb:// in order to obtain the list of workgroups
> from the master browser, I only get a:
>
> java.net.UnknownHostException: ..__MSBROWSE__.<01>
That means that there is no Local Master Browser--for any
workgroup/NT-Domain--on the subnet on which the webserver is located.
> In my WINS Server I see the rigth entry, registered with the correct 16th
> character of the NetBIOS name.
Which right entry? Which suffix?
You may see the \01\02__MSBROWSE__\02<01> name listed in the WINS
database, but it will have an IP address of 255.255.255.255.
If you use the SMB:// URL string, the client (jCIFS in this case) is
given no default workgroup/NT-Domain to query. The only thing it can do
is to query the local LAN and the only name it knows to look for is
\01\02__MSBROWSE__\02<01>. If there are no Local Master Browers on the
local LAN, then it won't find any node to ask and it will return the
exeption you saw.
> Moreover, If I query a workgroup name or a domain name or an host name, I
> see the statistics increasing in my wins server (number of total query,
> number of resolved query, ...)
>
> But if I query the master browser nothing happens, there is no increase,
> and I assume that no queries are sent to and/or received from the wins
> server.
Sending a query to the WINS server for the \01\02__MSBROWSE__\02<01> name
is pointless, since it is a group name and WINS (incorrectly, but
consistently) will return 255.255.255.255. Mike may have built in a
short-cut to prevent jCIFS from wasting time querying for this name.
Likewise, the workgroup<1D> name is a "special case". WINS never answers
query for the Local Master Browser name. It's a kludge, but it's what
WINS does. Samba does it to, just to be WINS compatible. Again, Mike may
have added a short-cut to prevent queries to WINS for the <1D> name, since
they always return Name Not Found.
[Mike: Just a note... If the client is operating in P mode, then it
*cannot* find the LMB. A node in P mode will never be able to
resolve "SMB://" unless there is a default workgroup defined
somewhere outside of the URL string itself, in which case the
client can query the DMB.]
You might be able to solve the problem by setting the
jcifs.smb.client.domain property to point to a PDC (any PDC) in your
network.
Mike: correct me if I'm wrong, but by setting this property I *think* that
jCIFS will be able to contact the DMB for the given NT-Domain. If
my guess is right (remembering some now-ancient e'mails on the
list), if the NT-Domain is set jCIFS will try querying the Domain
Master Browser (the <1B> name) for the browse list.
> I try to configure the wins property in two ways:
> 1st way) setting -Dwins=192.168.69.6 argument in my java servlet engine
> (I am using IBM WebSphere 3.5.6)
> 2nd way) using jcifs.Config.setProperty("jcifs.netbios.wins",
> "192.168.69.6") BEFORE using any other jcifs class
>
> no matter the way, the result is the same.
The problem isn't in your WINS setup. It's the broken design of CIFS
browsing system that is tripping you up.
Chris -)-----
--
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/ -)----- crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/ -)----- crh at ubiqx.org
More information about the jcifs
mailing list