[jcifs] [PATCH] DC restart => DC List empty
Eric Glass
eric.glass at gmail.com
Thu Oct 26 02:47:55 GMT 2006
Is The List available for perusal somewhere?
On 10/25/06, Michael B Allen <mba2000 at ioplex.com> wrote:
> Ok, I'll add this to The List for further exploration later.
>
> Thanks,
> Mike
>
> On Wed, 25 Oct 2006 16:48:41 +0200
> "Waldheim, Frank" <F.Waldheim at ing-diba.de> wrote:
>
> > hi there,
> > we found a problem with the logic in SMBSession which selects the DC to
> > be queried.
> > in a situation where all configured DCs are rebooted one after another
> > the dc-list
> > would end up empty and will not be refreshed until expired.
> > we set a loop around the lookup which will do an immediate expire in
> > case no
> > suitable DC was found. to prevent a infinite loop the fail-over retries
> > are
> > limited to two - this could be adjusted to any more usefull value.
> > we hope that is a good idea.
> > -fw
> >
> >
> > --- jcifs_1.2.9/src/jcifs/smb/SmbSession.java 2006-04-05
> > 20:45:18.000000000 +0200
> > +++ jcifs-1.2.9-rm/src/jcifs/smb/SmbSession.java 2006-10-24
> > 14:20:59.000000000 +0200
> > @@ -89,6 +89,10 @@
> > throw new SmbException( "A domain was not specified" );
> > }
> > synchronized (DOMAIN) {
> > +
> > //-----------------------------------------------------------------
> > + // START: Bugfix DC restart: 2 loops to reload dc list if
> > necessary
> > + for(int loop=0; loop<2; loop++ ) {
> > +
> > //-----------------------------------------------------------------
> > long now = System.currentTimeMillis();
> > if (dc_list_expiration < now) {
> > dc_list_expiration = now + CACHE_POLICY * 1000L;
> > @@ -121,6 +125,14 @@
> > }
> >
> > dc_list_expiration = now + 1000 * 60 * 15; /* 15 min */
> > +
> > //-----------------------------------------------------------------
> > + // CONTINUE: Bugfix DC restart
> > + if( SmbTransport.log.level > 1 )
> > + SmbTransport.log.println( "Failed to negotiate with a
> > suitable domain controller, loop: " + loop );
> > + dc_list_expiration = 0L ; // dc_list should expire
> > immediately !!!
> > + // END: Bugfix DC restart: loop
> > + }
> > +
> > //-----------------------------------------------------------------
> > }
> >
> > throw new UnknownHostException(
> >
> >
> > Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte
> > Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
> > E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den
> > Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie
> > die unbefugte Weitergabe dieser Mail ist nicht gestattet.
> >
> > This e-mail may contain confidential and/or privileged information.
> > If you are not the intended recipient (or have received this e-mail
> > in error) please notify the sender immediately and destroy this e-mail.
> > Any unauthorized copying, disclosure or distribution of the material in
> > this e-mail is strictly forbidden.
>
>
> --
> Michael B Allen
> PHP Active Directory SSO
> http://www.ioplex.com/
>
More information about the jcifs
mailing list