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

Michael B Allen mba2000 at ioplex.com
Fri Sep 23 16:36:50 GMT 2005


On Fri, 23 Sep 2005 17:21:51 +0200
Oliver Schoett <os at sdm.de> wrote:

> 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):
<snip>
>     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)

This exception is normal. It's just shutting down the client thread to
conserve resources.

> In contrast, the NameQueryRequest of 0.8.3 works (and we use it
> successfully for NTLM HTTP auth):
<snip>
>     Sep 22 18:28:11.826 - datagram packet sent to: 183.112.183.255
<snip>
> 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?

Another difference is that the resultCode=3 which means FMT_ERR (format
error).

Unfortunately the 1.2.x debugging info doesn't show the "datagram packet
sent to" message so I can't see that the packet isn't being sent to WINS
as opposed to broadcasting. If it's sent to WINS then isBroadcast *should*
be false.

>         <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>

This is strange. If you specify jcifs.netbios.wins then the requests
should be sent directly to WINS and not broadcasted. Are you showing me
a legitimate config here or was it contrived at the last minute?

First, I would just take out baddr because you really don't want to be
broadcasting for domain controllers. Then I would get a packet capture
with Ethereal and check that JCIFS is sending isBroadcast=false packets
directly to WINS. If it does not or it getting any kind of error along
the way you are closer to discovering the source of your problem.

Oh, and you don't have to fire up the Filter to check all this stuff.
Just run the CheckAllDC.java example.

Mike


More information about the jcifs mailing list