[jcifs] How would I trouble shoot a java.net.UnknownHostException?

Michael B Allen mba2000 at ioplex.com
Wed Nov 1 03:02:26 GMT 2006


The jcifs.smb.client.domain refers to the nETBIOSName of the domain and
not the dnsRoot name.

At a command prompt type 'set USERDOMAIN' to see what the nETBIOSName
is (as opposed to 'set USERDNSDOMAIN' which shows the dnsRoot of the
Windows domain).

Note: if WINS isn't really working you'll need to use the 'Explicit
Domain Controller web.xml Example' from the docs.

Mike

On Mon, 30 Oct 2006 09:25:40 -0600
"Todd Patrick" <Todd.Patrick at dtn.com> wrote:

> I am trying to set-up JCIFS NTLM HTTP Authentication according to the
> instructions on http://jcifs.samba.org/src/docs/ntlmhttpauth.html.
> 
> The exception that I am returning is:
> 
> java.net.UnknownHostException: DTN.COM
> 	
> jcifs.netbios.NameServiceClient.getAllByName(NameServiceClient.java:292)
> 	jcifs.netbios.NbtAddress.getAllByName(NbtAddress.java:454)
> 	jcifs.smb.SmbSession.getChallengeForDomain(SmbSession.java:95)
> 	jcifs.http.NtlmHttpFilter.negotiate(NtlmHttpFilter.java:150)
> 	jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:114)
> 
> I ran a ipconfig /all and the information I returned is (I've masked out
> the values, but you should get the idea):
> 
> C:\>ipconfig /all
> 
> Windows IP Configuration
> 
>         Host Name . . . . . . . . . . . . : xxxxxxxxxx
>         Primary Dns Suffix  . . . . . . . : dtn.com
>         Node Type . . . . . . . . . . . . : xxxxxxxxxx
>         IP Routing Enabled. . . . . . . . : No
>         WINS Proxy Enabled. . . . . . . . : No
>         DNS Suffix Search List. . . . . . : dtn.com
> 
> 
> Ethernet adapter Local Area Connection:
> 
>         Connection-specific DNS Suffix  . : dtn.com
>         Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Network
> Connection
>         Physical Address. . . . . . . . . : 0000000000000000
>         Dhcp Enabled. . . . . . . . . . . : Yes
>         Autoconfiguration Enabled . . . . : Yes
>         IP Address. . . . . . . . . . . . : 10.0.0.0
>         Subnet Mask . . . . . . . . . . . : 255.255.255.0
>         Default Gateway . . . . . . . . . : 10.0.0.0
>         DHCP Server . . . . . . . . . . . : 10.0.0.0
>         DNS Servers . . . . . . . . . . . : 10.0.0.0
>                                             10.0.0.1
>         Primary WINS Server . . . . . . . : 10.0.0.0
>         Secondary WINS Server . . . . . . : 10.0.0.0
> 
> I would had thought that the Primary Dns Suffix would be the value used
> for jcifs.smb.client.domain in the following set-up:
> 
> <filter>
> <filter-name>NtlmHttpFilter</filter-name>
> <filter-class>jcifs.http.NtlmHttpFilter</filter-class>
> <init-param>
>     <param-name>jcifs.netbios.wins</param-name>
>     <param-value>10.0.0.0,10.0.0.1</param-value>
> </init-param>
> <init-param>
>     <param-name>jcifs.smb.client.domain</param-name>
>     <param-value>dtn.com</param-value>
> </init-param>
> <init-param>
>     <param-name>jcifs.smb.client.username</param-name>
>     <param-value>xxxxxx</param-value>
> </init-param>
> <init-param>
>     <param-name>jcifs.smb.client.password</param-name>
>     <param-value>xxxxxx</param-value>
> </init-param>
> </filter>
> 
> <filter-mapping>
> <filter-name>NtlmHttpFilter</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
> 
> I'd appreciate any suggestions or thoughts on how to solve this issue.
> 
> Thank you,
> 
> --Todd
> 
> -----------------------------------------
> NOTICE: This email message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged
> information. Any unauthorized use, disclosure or distribution is
> prohibited. If you are not the intended recipient, please contact
> the sender by reply email and destroy all copies of the original
> message.
> 
> 


-- 
Michael B Allen
PHP Active Directory SSO
http://www.ioplex.com/


More information about the jcifs mailing list