AW: [jcifs] multiple DC via DNS

Dirk Becker dbecker at pironet-ndh.com
Fri Apr 22 08:12:42 GMT 2005


Hi,

i made DNS the only one: jcifs.resolveOrder=DNS
My point is, i have one hostname with 2 IP adresses! 

Frode is right: it only makes sense, when the Sun's Java DNS cache policy
is configured not to hold lookup results forever.

Dirk

-----Ursprüngliche Nachricht-----
Von: Michael B Allen [mailto:mba2000 at ioplex.com]
Gesendet: Freitag, 22. April 2005 09:39
An: Frode E. Moe
Cc: Dirk Becker; jcifs at lists.samba.org
Betreff: Re: [jcifs] multiple DC via DNS


On Fri, 22 Apr 2005 09:08:49 +0200
"Frode E. Moe" <frode at CoreTrek.no> wrote:

> On Fri, Apr 22, 2005 at 08:50:48 +0200, Dirk Becker wrote:
> > Hi,
> > 
> > i tried to get a list of DC's via DNS rather than using WINS. I have a
> > DNS entry like this:
> > 
> > dcs.example.com.   10008   IN      A       10.11.11.41
> > dcs.example.com.   10008   IN      A       10.11.0.44
> > 
> > I set the jcifs loglevel to 10. Only the first DC (that is returned by
> > InetAddress.getByName()) was used, so my question is: Is fetching a
> > DC-list that way supported? 
> 
> Sun's Java in general has a pretty aggressive DNS cache built-in, which
> keeps resolved hosts around forever. You can try to disable the cache,
> see for example: 
> http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html#nct
> and the "InetAddress Caching" paragraph here:
> http://java.sun.com/j2se/1.4.2/docs/api/java/net/InetAddress.html

And make sure you make DNS first in jcifs.resolveOrder:

http://jcifs.samba.org/src/docs/resolver.html

Mike

-- 
IRC - where men are men, women are men, and the boys are FBI agents.


More information about the jcifs mailing list