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

Michael B Allen mba2000 at ioplex.com
Tue Aug 9 06:25:36 GMT 2005

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