[jcifs] Re: HTTP Authentication failing

Scrumpy Jak paul.pree at bmssolutions.com
Tue Jun 7 09:37:20 GMT 2005

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

> Paul,
> When something is working fine and then suddenly stops working it is NOT a 
> good idea to simply start changing parameters, containers, lib versions, etc. 
> You should have isolated the source of failure when the problem first 
> appeared.
> Use jcifs-1.1.11.jar and set jcifs.http.domainController and
> jcifs.smb.client.{domain,username,password} to a known acct in that domain. 
> Set NOTHING else.
> Restart the container and try it again.
> We get about 1500 downloads a month and most people are using the filter so I 
> think there's something fundamentally wrong with your setup (firewall?).
> Trying different versions of jcifs isn't going to help.
> Mike
Thanks for your input Mike. I gave the Readers Digest version earlier - we spent
quite a bit of time trying to pinpoint the root cause to no avail. The manager
of the AD and Webserver insists no system change were made, so we were stuck
with that.

We were running Tomcat 4.1.24 and jCIFS 1.1.0. The problem had previously 
occurred about 6 months ago, and the fix applied at the time was upgrading from 
jcifs 0.7.3 to 1.1.0.

After trying to isolate the issue we chose to install a more current version of
Tomcat - 4.1.30 and jCIFS - 1.1.11 (Which we plan to stick with). We felt that
these version improved our chance of getting it working.

I have tried as you suggested - removing jcifs 1.2.0 and putting 1.1.11 back. 

I set (within the http filter section of web.xml) the following:

>   <filter>
>     <filter-name>NtlmHttpFilter</filter-name>
>     <filter-class>jcifs.http.NtlmHttpFilter</filter-class>
>     <init-param>
>         <param-name>jcifs.http.domainController</param-name>
>         <param-value></param-value>
>     </init-param>
>     <init-param>
>         <param-name>jcifs.smb.client.domain</param-name>
>         <param-value>mydomain</param-value>
>     </init-param>
>     <init-param>
>         <param-name>jcifs.smb.client.username</param-name>
>         <param-value>validusername</param-value>
>     </init-param>
>     <init-param>
>         <param-name>jcifs.smb.client.password</param-name>
>         <param-value>validpassword</param-value>
>     </init-param>
>   </filter>
>   <filter-mapping>
>     <filter-name>NtlmHttpFilter</filter-name>
>     <url-pattern>/*</url-pattern>
>   </filter-mapping>

The browser then comes back with
jcifs.smb.SmbException: Failed to negotiate
jcifs.smb.SmbException: Timeout trying to open socket
java.net.ConnectException: Connection Refused: connect
   at java.net.PlainSocketImpl.socketConnect(Native Method)

Note: This fails for all users (Not just the first)

I agree that there is something screwy with our environment - We just can't
pinpoint it! As you can also guess, my knowledge in this area is limited!

Thanks for your patience!

More information about the jcifs mailing list