[jcifs] NTLM login failure

Alexander Podoplelov alepod7 at yahoo.se
Tue Jun 6 13:18:16 GMT 2006


Dear JCIFS experts!

Maybe somebody met already the problem which I face now. Please, share any ideas you may have!

I successfully configured jcifs NTLM for tomcat. I even manage to login automatically. The problem is that the number of successful logins is restricted to the magic number of 6. The 7th, 8th, etc tries give the error in the IE browser:
HTTP Status 500 - 
--------------------------------------------------------------------------------
type Exception report
message 
description The server encountered an internal error () that prevented it from fulfilling this request.
exception 

jcifs.smb.SmbException: 0xC00000D0
    jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:510)
    jcifs.smb.SmbTransport.send(SmbTransport.java:610)
    jcifs.smb.SmbSession.sessionSetup(SmbSession.java:269)
    jcifs.smb.SmbSession.send(SmbSession.java:225)
    jcifs.smb.SmbTree.treeConnect(SmbTree.java:147)
    jcifs.smb.SmbSession.logon(SmbSession.java:161)
    jcifs.smb.SmbSession.logon(SmbSession.java:154)
    jcifs.http.NtlmHttpFilter.negotiate(NtlmHttpFilter.java:182)
    jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:114)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.16 logs.
--------------------------------------------------------------------------------
Apache Tomcat/5.5.16

Error log of tomcat does not say much:

java.net.SocketTimeoutException: Receive timed out
        at java.net.PlainDatagramSocketImpl.receive0(Native Method)
        at java.net.PlainDatagramSocketImpl.receive(Unknown Source)
        at java.net.DatagramSocket.receive(Unknown Source)
        at jcifs.netbios.NameServiceClient.run(NameServiceClient.java:184)
        at java.lang.Thread.run(Unknown Source)

treeConnect: unc=\\MS-D60405-80\IPC$,service=?????
sessionSetup: accountName=gooduser,primaryDomain=THE_DOMAIN
SmbComSessionSetupAndX[command=SMB_COM_SESSION_SETUP_ANDX,received=false,errorCode=0,flags=0x0018,flags2=0xC003,signSeq=0,tid=0,pid=16648,uid=0,mid=12,wordCount=13,byteCount=113,andxCommand=0x75,andxOffset=174,snd_buf_size=4356,maxMpxCount=10,VC_NUMBER=1,sessionKey=0,passwordLength=24,unicodePasswordLength=0,capabilities=84,accountName=gooduser,primaryDomain=THE_DOMAIN,NATIVE_OS=Windows XP,NATIVE_LANMAN=jCIFS]
SmbComTreeConnectAndX[command=SMB_COM_TREE_CONNECT_ANDX,received=false,errorCode=0,flags=0x0018,flags2=0x0000,signSeq=0,tid=0,pid=16648,uid=0,mid=0,wordCount=4,byteCount=47,andxCommand=0xFF,andxOffset=0,disconnectTid=false,passwordLength=1,password=,path=\\MS-D60405-80\IPC$,service=?????]
New data read: Transport1[MS-D60405-80<00>/192.168.124.13:0]
00000: FF 53 4D 42 73 D0 00 00 C0 98 03 C0 00 00 00 00  |?SMBs?..?..?....|
00010: 00 00 00 00 00 00 00 00 00 00 08 41 00 00 0C 00  |...........A....|

SmbComSessionSetupAndXResponse[command=SMB_COM_SESSION_SETUP_ANDX,received=false,errorCode=0xC00000D0,flags=0x0098,flags2=0xC003,signSeq=0,tid=0,pid=16648,uid=0,mid=12,wordCount=0,byteCount=0,andxCommand=0xFF,andxOffset=0,isLoggedInAsGuest=false,nativeOs=,nativeLanMan=,primaryDomain=]
log4j:WARN No appenders could be found for logger (org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/vmp_dev].[jsp]).
log4j:WARN Please initialize the log4j system properly.


As you see I run Tomcat 5.5.16 with jdk1.5.0_06. JCIFS is of version 1.2.9.

The web.xml of my application is:
<filter>
    <filter-name>ntlm</filter-name>
    <filter-class>jcifs.http.NtlmHttpFilter</filter-class>

    <init-param>
        <param-name>jcifs.http.domainController</param-name>
        <param-value>IP.OF.MY.LOCALHOST</param-value>
    </init-param>

    <init-param>
        <param-name>http.auth.ntlm.domain</param-name>
        <param-value>THE_DOMAIN</param-value>
    </init-param>
    
    <init-param>
        <param-name>jcifs.smb.lmCompatibility</param-name>
        <param-value>3</param-value>
    </init-param>

    <init-param>
        <param-name>jcifs.util.loglevel</param-name>
        <param-value>5</param-value>
    </init-param>
</filter>

<filter-mapping>
   <url-pattern>/*</url-pattern>
   <filter-name>ntlm</filter-name>
</filter-mapping>

Why it is possible to login only six times after tomcat starting? Where can one configure this number of logins? Please, help.

//Alexander

-------------- next part --------------
HTML attachment scrubbed and removed


More information about the jcifs mailing list