UnknownHostException for wins server

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

UnknownHostException for wins server

rafal-5
Hi,
We use jcifs 1.1.11 for NTLM authentication. When we set one wins server in
jcifs.netbios.wins property (e.g jcifs.netbios.wins = 10.174.8.101) everything  
works correctly - there are no problems with authentication. But if we set
additional wins server (e.g jcifs.netbios.wins = 10.174.8.101,10.174.8.102)
we've got this error:

Mar 17 14:29:07 2006: 10.174.8.101\

Mar 17 14:29:07 2006: java.net.UnknownHostException: 10.174.8.101\: 10.174.8.101
\

Mar 17 14:29:07 2006: at java.net.InetAddress.getAllByName0
(InetAddress.java:1011)

Mar 17 14:29:07 2006: at java.net.InetAddress.getAllByName0
(InetAddress.java:981)

Mar 17 14:29:07 2006: at java.net.InetAddress.getAllByName
(InetAddress.java:975)

Mar 17 14:29:07 2006: at java.net.InetAddress.getByName(InetAddress.java:889)

Mar 17 14:29:07 2006: at jcifs.Config.getInetAddressArray(Config.java:304)

Mar 17 14:29:07 2006: at jcifs.netbios.NbtAddress.<clinit>
(NbtAddress.java:133)

Mar 17 14:29:07 2006: at jcifs.smb.SmbSession.getChallengeForDomain
(SmbSession.java:95)

Mar 17 14:29:07 2006: at jcifs.http.NtlmHttpFilter.doFilter
(NtlmHttpFilter.java:123)

Mar 17 14:29:07 2006: at com.sybase.jaguar.servlet.JagFilterChain.doFilter
(JagFilterChain.java:107)

Mar 17 14:29:07 2006: at com.sybase.jaguar.servlet.ServletEngine._service
(ServletEngine.java:866)

Mar 17 14:29:07 2006: at com.sybase.jaguar.servlet.ServletEngine.service
(ServletEngine.java:365)

Mar 17 14:29:07 2006: at
com.sybase.jaguar.servlet.ServletServiceImpl.doService
(ServletServiceImpl.java:58)

Mar 17 14:29:07 2006: at
com.sybase.jaguar.servlet._sk_JaguarServlet_ServletService.remoteInvoke
(_sk_JaguarServlet_ServletService.java:589)

Mar 17 14:29:07 2006: at
com.sybase.jaguar.servlet._sk_JaguarServlet_ServletService.invoke
(_sk_JaguarServlet_ServletService.java:125)

Mar 17 14:29:07 2006:


NameQueryRequest
[nameTrnId=1,isResponse=false,opCode=QUERY,isAuthAnswer=false,isTruncated=false,
isRecurAvailable=false,isRecurDesired=true,isBroadcast=true,resultCode=0,questio
nCount=1,answerCount=0,authorityCount=0,additionalCount=0,questionName=SEAMW2K<1
C>,questionType=0x0020,questionClass=IN,recordName=null,recordType=0x0000,record
Class=0x0000,ttl=0,rDataLength=0]

Can anybody help me?

Thanks,
Rafal

Reply | Threaded
Open this post in threaded view
|

Re: UnknownHostException for wins server

Michael B Allen-4
I think the multiple WINS servers thing was added in 1.2.

Mike

On Mon, 20 Mar 2006 11:38:25 +0000 (UTC)
Rafal <[hidden email]> wrote:

> Hi,
> We use jcifs 1.1.11 for NTLM authentication. When we set one wins server in
> jcifs.netbios.wins property (e.g jcifs.netbios.wins = 10.174.8.101) everything  
> works correctly - there are no problems with authentication. But if we set
> additional wins server (e.g jcifs.netbios.wins = 10.174.8.101,10.174.8.102)
> we've got this error:
>
> Mar 17 14:29:07 2006: 10.174.8.101\
>
> Mar 17 14:29:07 2006: java.net.UnknownHostException: 10.174.8.101\: 10.174.8.101
Reply | Threaded
Open this post in threaded view
|

Re: UnknownHostException for wins server

rafal-5
Michael B Allen <mba2000 <at> ioplex.com> writes:

>
> I think the multiple WINS servers thing was added in 1.2.
>

As far as I know multiple wins support was added in version 0.9. I tested
it also with version 1.2.7 and got the same error.
I debugged jcifs.Config.getInetAddressArray function and found that wins IP
address is retrieved from token with backslash at the end:
for example:

String addr = tok.nextToken();

returns address below:

10.174.8.101\

Then function:

arr[i] = InetAddress.getByName( addr );

is called with IP address with backslash as an argument and returns:
java.net.UnknownHostException: 10.174.8.101\: 10.174.8.101\

I modified jcifs.Config.getInetAddressArray function and made it remove
backslash from IP address and it works.
But still I don’t know why IP address is retrieved with backslash at the end.
My jcifs.netbios.wins property is set to 10.174.8.101,10.174.8.102. But
according to log files from application server:

jcifs.netbios.wins=10.174.8.101\\,10.174.8.102
and
file.separator=\\

So I think that application server modifies Wins IP address before it is sent
to jcifs.

Do you have any other ideas how to handle with this problem?