[jcifs] WINS failover?

Abraham Lin abraham.lin at post.harvard.edu
Thu Jul 12 15:50:02 MDT 2012


Hi,

I've run into some trouble while trying to configure jCIFS to fail over on
a WINS error. The configuration I'm using looks something like this:

  Config.setProperty( "jcifs.smb.client.domain", "DOMAIN" );
  Config.setProperty( "jcifs.netbios.wins",
"123.123.123.123,234.234.234.234" );
  Config.setProperty( "jcifs.netbios.retryTimeout", "5000" );

The first WINS server isn't behaving correctly and is sending back a
response type of 0x0A with error code 0x03. However, the second server does
work properly and responds appropriately to a Name Query.

What I'm seeing is that NameServiceClient contacts the first WINS server
multiple times (until the timeout expires), but never actually contacts the
second. The problem is with the handling of the "timeout" parameter in
"send:" on line 252 (version 1.3.17), the parameter value is overwritten,
which prevents subsequent requests to other WINS servers when the first one
fails (due to the guard on line 240). When I save the original parameter
value and restore the value of "timeout" for each iteration of the outer
while loop, the second server is contacted as expected.

Is this expected behavior? If it is, what would be the best way of handling
this situation?

Thanks in advance!

-Abraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/jcifs/attachments/20120712/8c839a0c/attachment.html>


More information about the jCIFS mailing list