[jcifs] JCIFS 1.2.1 java.net.UnknownHostException: Failed to negotiate with a suitable domain controller - PROBLEM SOLVED

Krueger Ken J IT312 ken.krueger at siemens.com
Fri Aug 12 15:53:18 GMT 2005


We were able to identify the cause of and two solutions to this problem:

Both machines have multiple network interfaces installed as Mike suspected, including wireless network adapters.  On mine (machine #1), jcifs could correctly identify when to use the appropriate network adapter.  On the other (machine #2), jcifs could not, and it would struggle to use the wireless network adapter when it could just go to the LAN -- eventually timing out or throwing a "Failed to negotiate with a suitable domain controller for ..." exception.

We identified two solutions for machine #2.  1) Disable the wireless network.  2)  Keep the wireless network turned on but specifiy the local ip address of the network adapter we wanted to use.  In our case:


Both work.  Since we want our solution to work everywhere, we're just going to disable the wireless network on #2 until we can figure out a more elegant solution.

If anyone knows of a more elegant solution, we'd love to hear about it!  Thanks to all for your responses.


-----Original Message-----
From: Michael B Allen [mailto:mba2000 at ioplex.com]
Sent: Tuesday, August 09, 2005 2:26 AM
To: Krueger Ken J IT312
Cc: jcifs at lists.samba.org
Subject: Re: [jcifs] JCIFS 1.2.1 java.net.UnknownHostException: Failed
to negotiate with a suitable domain controller

On Mon, 8 Aug 2005 17:28:56 -0400
"Krueger Ken J  IT312" <ken.krueger at siemens.com> wrote:

> I hope this is the correct place to post this question, if not please excuse me.
> I'm having trouble using JCIFS 1.2.1 (and 1.2.0) on one machine, but not another.  My co-worker and I are both running a web application on Eclipse 3.1, jdk 1.4.2, Tomcat 4.1.31 and we're both taking our source from CVS so I'm fairly confident that our configurations are identical.  On my machine, JCIFS runs like a champ, here are my settings from web.xml:
> 	<filter>
> 		<filter-name>NTLM HTTP Authentication Filter</filter-name>
> 		<filter-class>jcifs.http.NtlmHttpFilter</filter-class>
> 		<init-param>
> 			<param-name>jcifs.smb.client.domain</param-name>
> 			<param-value>WW007</param-value>
> 		</init-param>
> 		<init-param>
> 			<param-name>jcifs.netbios.wins</param-name>
> 			<param-value>,</param-value>
> 		</init-param>
> 		<init-param>
> 			<param-name>jcifs.util.log</param-name>
> 			<param-value>ALL</param-value>

Wow, you must be an "old school" JCIFS user. The jcifs.util.log property
is no longer used. See jcifs.util.loglevel. Also you might want to review
the latest docs. Some things have changed over the years.

> 		</init-param>
> 		<init-param>
> 			<param-name>jcifs.http.enableBasic</param-name>
> 			<param-value>true</param-value>
> 		</init-param>
> 	</filter>
> 	...
> 	<filter-mapping>
> 		<filter-name>NTLM HTTP Authentication Filter</filter-name>
> 		<servlet-name>action</servlet-name>
> 	</filter-mapping>
> However, my co-worker runs with these same settings and Jar file and gets this error:
> java.net.UnknownHostException: Failed to negotiate with a suitable domain controller for WW007
> 	at jcifs.smb.SmbSession.getChallengeForDomain(SmbSession.java:124)
> 	at jcifs.http.NtlmHttpFilter.negotiate(NtlmHttpFilter.java:150)
> 	at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:114)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:166)
> 	...
> We can both ping the IP addresses I've listed for jcifs.netbios.wins, so I'm not sure that that could be the problem.  

Are there multiple network interfaces are on the machine? If so you
might need to set the laddr property so that jcifs is communicating on
the right one.

> I've tried setting the jcifs.http.domainController property to ORLA1DXA. Works on mine, not on his.

Technically jcifs.http.domainController should be an IP.

> Obviously, something is different between our two machines.  My problem is I'm not sure how to debug this kind of problem.  Any thoughts on how to troubleshoot this / things to try?

Look at the networking setup on the machines. I bet it has something to
do with that.


More information about the jcifs mailing list