[jcifs] WINS failover?

Christopher R. Hertel crh at ubiqx.mn.org
Thu Jul 12 22:17:36 MDT 2012


On 07/12/2012 08:20 PM, Abraham Lin wrote:
> Hi Christopher,
> 
> First off, thanks for the reply.

Welcome.  :)

>     What do you mean by a "response type of 0x0A"?
> 
> Sorry, I meant "record type." The response (as logged by jCIFS) looks like this:
> 
> NameQueryResponse[nameTrnId=1,
                    isResponse=true,
                    opCode=QUERY,
                    isAuthAnswer=true,
                    isTruncated=false,
                    isRecurAvailable=true,
                    isRecurDesired=true,
                    isBroadcast=false,
                    resultCode=3,
                    questionCount=0,
                    answerCount=0,
                    authorityCount=0,
                    additionalCount=0,
                    questionName=null,
                    questionType=0x0000,
                    questionClass=IN,
                    recordName=DOMAIN<1C>,
                    recordType=NULL,
                    recordClass=IN,
                    ttl=0,
                    rDataLength=0,
                    addrEntry=[Ljcifs.netbios.NbtAddress;@5d56ead7]
> 
> Inspecting the object in a debugger gives the numerical value of 0x0A.

You will get better information from a sniffer, such as Wireshark or NetMon.

>     I believe that the error code you are listing is:
> 
>     NAM_ERR (0x3):          Name Error
>     The requested name does not exist in the selected name table(s).

That's backed up by my read of the log line you've provided.  You are
getting a correct response from the NBNS, but it's telling you that the name
is not registered.

> Hmm, that's odd. As you may be able to tell from the log entry above, I'm
> performing a name query for domain controllers, so I'm not sure why the WINS
> server wouldn't have any matching entries.

Is it configured to replicate with the other NBNS?  If it's not configured
to replicate, and if the clients (the Domain Controllers) are registering
with the second NBNS, then the first one simply won't have any knowledge of
the registered 0x1C names.

> Any ideas as to how to best handle this? I don't have access to the WINS
> servers themselves, so I've been looking into whether it'd be possible to
> fail over to another (working) server instead.

Only if they are configured to replicate.  If there is no replication
between the two, then they will represent two completely separate namespaces.

> The logic in
> NameServiceClient suggests that it's trying to support some kind of
> failover, though I'm not sure whether my situation is meant to be supported.

It's meant to support failover between replicated servers.  If the "WINS"
servers you are using are not synchronized, then they represent different
namespaces and a name registered in one will not be registered in the other.

Hope that helps.

Chris -)-----

-- 
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
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