[jcifs] Failed to negotiate with a suitable domain controller

Jabran Niaz jabran1219 at yahoo.com
Fri Aug 17 11:01:49 MDT 2012


Time to time we are getting following exception in our JVM and once we get this 
exception it reoccur and we have to restart the JVM to resolve this issue.

[Servlet Error]-[action]: java.net.UnknownHostException: Failed to negotiate 
with a suitable domain controller for amrs
	at jcifs.smb.SmbSession.getChallengeForDomain(SmbSession.java:126)
	at jcifs.http.NtlmHttpFilter.negotiate(NtlmHttpFilter.java:150)
	at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:114)

We are using "jcifs-1.2.7.jar"

In web.xml 
	<!--Here same WINS server is repeated 5 times because it will resolve to 
different IP each time -->

Usage in code for user login

UniAddress mydomaincontroller = UniAddress.getByName("amrs.win.ml.com");

NtlmPasswordAuthentication mycreds = new NtlmPasswordAuthentication(".ml.com", 
"username", "password");

SmbSession.logon(mydomaincontroller, mycreds);

This causing outages in our production system. Any help in matter is highly 

Thanks in advance

More information about the jCIFS mailing list