[jcifs] java.net.SocketTimeoutException: Receive timed out
Michael B Allen
mba2000 at ioplex.com
Mon Aug 8 16:42:04 GMT 2005
On Mon, 8 Aug 2005 13:08:28 +0200 (CEST)
moons at netjunk.be wrote:
> Just a question; We use jcifs to authenticate people into our intranet portals. Although the login works, if I put Logging level to 3, I see lots of the error below in the logs. My config just specifies the top domain with jcifs.http.domainController=domain.com in order for the server to choose the best DC. Is there some setting I could use to prevent these errors ?
Log level 3 is going to give you a lot of information that are not
necessarily "errors". Sometimes harmless exceptions occur internally
under normal conditions.
> java.net.SocketTimeoutException: Receive timed out
> at java.net.PlainDatagramSocketImpl.receive(Native Method)
> at java.net.DatagramSocket.receive(DatagramSocket.java:728)
> at jcifs.netbios.NameServiceClient.run(NameServiceClient.java:184)
> at java.lang.Thread.run(Thread.java:534)
This is harmless. The NetBIOS name service client is configured to
timeout and close after being idle to release unused resources after
jcifs.netbios.soTimeout which is by default 5000 milliseconds. When
another name needs to be resolved it starts the client which then times
out again and so on.
> treeConnect: unc=\xx.xxx.xxx.xxx\IPC$,service=?????
> davies successfully authenticated against domain.com/xxx.x.xx.xxx
> What do the messages below mean ? I can't find it in the documentation ...
> no handler for mid=1102, purging session message: xxx.com/xx.xxx.xx.xxx
> no handler for mid=1103, purging session message: xxx.com/xx.xxx.xx.xxx
> no handler for mid=1104, purging session message: xxx.com/xx.xxx.xx.xxx
> no handler for mid=1105, purging session message: xxx.com/xx.xxx.xx.xxx
> no handler for mid=1106, purging session message: xxx.com/xx.xxx.xx.xxx
> no handler for mid=1107, purging session message: xxx.com/xx.xxx.xx.xxx
> no handler for mid=1108, purging session message: xxx.com/xx.xxx.xx.xxx
> no handler for mid=1109, purging session message: xxx.com/xx.xxx.xx.xxx
This means that a response was recieved for a request that the client
is no longer waiting for. This could happen if no such request was sent
or if the response in the response table was removed because the request
timedout or was satisfied in some other way.
I *think* this is harmless but I'm not sure but your
jcifs.http.domainController value is unusual so I cannot be certain. The
documentation recommends that an IP address be used here. If you use
a DNS domain I not sure what will happen. First, if you're really not
using NetBIOS to resolve names then you should just disable that
resolution method by setting:
so that the NetBIOS name service client is never even started. Now check
the logs to see if the messages go away (the SocketTimeoutExceptions
definitely will but I don't know about the "no handler" ones).
If that does not eliminate the log messages try setting
jcifs.http.domainController to the IP address of your DC. That is a known
configuration. If that eliminates the errors then you know that the DNS
domain name is related. You could then try the FQDN of the DC as well. But
of course none of this is consistent with the recommended configuration.
There is detailed documentation here that explains how to setup the
http://jcifs.samba.org/src/docs/api/ (scroll down)
More information about the jcifs