[jcifs] 1.2.4 NameQueryRequest fails in OC4J on AIX (0.8.3 works)

Oliver Schoett os at sdm.de
Fri Sep 23 15:21:51 GMT 2005


I cannot upgrade the NtlmHttpFilter from jCIFS 0.8.3 to jCIFS 1.2.4 in
OC4J 9.0.4 on AIX, because the NameQueryRequest fails.  Here is the
error log of 1.2.4 (IP addresses and domain names modified):

    NameQueryRequest[nameTrnId=1,isResponse=false,opCode=QUERY,isAuthAnswer=false,isTruncated=false,isRecurAvailable=false,isRecurDesired=true,isBroadcast=false,resultCode=0,questionCount=1,answerCount=0,authorityCount=0,additionalCount=0,questionName=KVMADS<1C>,questionType=0x0020,questionClass=IN,recordName=null,recordType=0x0000,recordClass=0x0000,ttl=0,rDataLength=0]
    00000: 00 01 01 00 00 01 00 00 00 00 00 00 20 45 43 46  |............ ECF|
    00010: 47 45 4C 45 42 45 45 46 44 43 41 43 41 43 41 43  |GELEBEEFDCACACAC|
    00020: 41 43 41 43 41 43 41 43 41 43 41 42 4D 00 00 20  |ACACACACACABM.. |
    00030: 00 01                                            |..              |

    NetBIOS: new data read from socket
    NameQueryResponse[nameTrnId=1,isResponse=true,opCode=QUERY,isAuthAnswer=true,isTruncated=false,isRecurAvailable=true,isRecurDesired=true,isBroadcast=false,resultCode=3,questionCount=0,answerCount=0,authorityCount=0,additionalCount=0,questionName=null,questionType=0x0000,questionClass=IN,recordName=KVMADS<1C>,recordType=NULL,recordClass=IN,ttl=0,rDataLength=0,addrEntry=[Ljcifs.netbios.NbtAddress;@66f5745a]
    00000: 00 01 85 83 00 00 00 00 00 00 00 00 20 45 43 46  |............ ECF|
    00010: 47 45 4C 45 42 45 45 46 44 43 41 43 41 43 41 43  |GELEBEEFDCACACAC|
    00020: 41 43 41 43 41 43 41 43 41 43 41 42 4D 00 00 0A  |ACACACACACABM...|
    00030: 00 01 00 00 00 00 00 00                          |........        |

    java.net.SocketTimeoutException: Receive timed out
            at java.net.PlainDatagramSocketImpl.receive(Native Method)
            at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:129)
            at java.net.DatagramSocket.receive(DatagramSocket.java:701)
            at jcifs.netbios.NameServiceClient.run(NameServiceClient.java:184)
            at java.lang.Thread.run(Thread.java:568)

In contrast, the NameQueryRequest of 0.8.3 works (and we use it
successfully for NTLM HTTP auth):

    Sep 22 18:28:11.799 - name service address cache
     JCIFS180_65_B1<00> JCIFS180_65_B1<00>/183.112.180.65
     0.0.0.0<00> 0.0.0.0<00>/0.0.0.0

    Sep 22 18:28:11.820 - nbt name service packet sent
    NameQueryRequest[nameTrnId=1,isResponse=false,opCode=QUERY,isAuthAnswer=false,isTruncated=false,isRecurAvailable=false,isRecurDesired=true,isBroadcast=true,resultCode=0,questionCount=1,answerCount=0,authorityCount=0,additionalCount=0,questionName=KVMADS<1C>,questionType=0x0020,questionClass=IN,recordName=null,recordType=0x0000,recordClass=0x0000,ttl=0,rDataLength=0]
    Sep 22 18:28:11.825 - nbt name service debugging
     new data read from socket
    Sep 22 18:28:11.826 - datagram packet sent to: 183.112.183.255
    00000: 00 01 01 10 00 01 00 00 00 00 00 00 20 45 43 46  |............ ECF|
    00010: 47 45 4C 45 42 45 45 46 44 43 41 43 41 43 41 43  |GELEBEEFDCACACAC|
    00020: 41 43 41 43 41 43 41 43 41 43 41 42 4D 00 00 20  |ACACACACACABM.. |
    00030: 00 01                                            |..              |

    Sep 22 18:28:11.827 - nbt name service packet receviced
    NameQueryResponse[nameTrnId=1,isResponse=true,opCode=QUERY,isAuthAnswer=true,isTruncated=false,isRecurAvailable=false,isRecurDesired=true,isBroadcast=false,resultCode=0,questionCount=0,answerCount=1,authorityCount=0,additionalCount=0,questionName=null,questionType=0x0000,questionClass=IN,recordName=KVMADS<1C>,recordType=0x0020,recordClass=IN,ttl=300000,rDataLength=6,addrEntry=KVMADS<1C>/183.112.182.2]
    Sep 22 18:28:11.827 - datagram packet received from: 183.112.182.2
    00000: 00 01 85 00 00 00 00 01 00 00 00 00 20 45 43 46  |............ ECF|
    00010: 47 45 4C 45 42 45 45 46 44 43 41 43 41 43 41 43  |GELEBEEFDCACACAC|
    00020: 41 43 41 43 41 43 41 43 41 43 41 42 4D 00 00 20  |ACACACACACABM.. |
    00030: 00 01 00 04 93 E0 00 06 80 00 C1 66 B6 02        |.....à....Áf¶.  |

    Sep 22 18:28:11.828 - name service address cache
     JCIFS180_65_B1<00> JCIFS180_65_B1<00>/183.112.180.65
     KVMADS<1C> KVMADS<1C>/183.112.182.2
     0.0.0.0<00> 0.0.0.0<00>/0.0.0.0

The only difference I can see in the query packets ist that the
non-working packet has isBroadcast=false, whereas the working packet
has isBroadcast=true.  Could this be the cause of the different
responses received?

Regards,

Oliver Schoett



Further info about the environment:

    AIX 5L 64bit running on Power architecture
    J2RE 1.4.1 IBM AIX build ca1411-20030930 (JIT enabled: jitc)

The configuration:

    <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>KVMADS</param-value>
        </init-param>
        <init-param>
            <param-name>jcifs.netbios.wins</param-name>
            <param-value>183.112.180.203,183.112.180.205</param-value>
        </init-param>
        <init-param>
            <param-name>jcifs.netbios.baddr</param-name>
            <param-value>183.112.183.255</param-value>
        </init-param>
    </filter>

(yes, our local netmask is 10 bit wide).



More information about the jcifs mailing list