Socket Timeout Problem

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Socket Timeout Problem

Merlin Beedell
Socket Timeout Problem

I seem to be able to authenticate, but then I get a socket error [java.net.SocketTimeoutException: Read timed out].
 I don't know why or if there is a configuration option to fix it, or how to research the issue.
 I guess that I will need to use a packet sniffer to see what socket is being timed out, but any tips would be welcome.

The system is running on Linux SuSE 10, JVM 1.5.0_06, Tomcat 5.0. See below for jcifs logged config.


SmbComSessionSetupAndXResponse[command=SMB_COM_SESSION_SETUP_ANDX,received=false,errorCode=0,flags=0x0098,flags2=0xC007,signSeq=1,tid=6151,pid=4

6845,uid=49154,mid=6,wordCount=3,byteCount=154,andxCommand=0x75,andxOffset=195,isLoggedInAsGuest=false,nativeOs=Windows Server 2003 3790 Service

 Pack 1,nativeLanMan=Windows Server 2003 5.2,primaryDomain=CICRYOSERVER]
00000: FF 53 4D 42 73 00 00 00 00 98 07 C0 00 00 FA 46  |ÿSMBs......Ã..úF|
00010: 3D F2 BE 7A 8A 6E 00 00 07 18 FD B6 02 C0 06 00  |=ò¾z.n....ý¶.Ã..|
00020: 03 75 00 C3 00 00 00 9A 00 89 57 00 69 00 6E 00  |.u.Ã......W.i.n.|
00030: 64 00 6F 00 77 00 73 00 20 00 53 00 65 00 72 00  |d.o.w.s. .S.e.r.|
00040: 76 00 65 00 72 00 20 00 32 00 30 00 30 00 33 00  |v.e.r. .2.0.0.3.|
00050: 20 00 33 00 37 00 39 00 30 00 20 00 53 00 65 00  | .3.7.9.0. .S.e.|
00060: 72 00 76 00 69 00 63 00 65 00 20 00 50 00 61 00  |r.v.i.c.e. .P.a.|
00070: 63 00 6B 00 20 00 31 00 00 00 57 00 69 00 6E 00  |c.k. .1...W.i.n.|
00080: 64 00 6F 00 77 00 73 00 20 00 53 00 65 00 72 00  |d.o.w.s. .S.e.r.|
00090: 76 00 65 00 72 00 20 00 32 00 30 00 30 00 33 00  |v.e.r. .2.0.0.3.|
000A0: 20 00 35 00 2E 00 32 00 00 00 43 00 49 00 43 00  | .5...2...C.I.C.|
000B0: 52 00 59 00 4F 00 53 00 45 00 52 00 56 00 45 00  |R.Y.O.S.E.R.V.E.|
000C0: 52 00 00 03 FF 00 D2 00 01 00 06 00 49 50 43 00  |R...ÿ.Ã.....IPC.|
000D0: 00 00                                            |..              |

NtlmHttpFilter: 10.10.10.123\mbeedell successfully authenticated against 0.0.0.0<00>/10.10.10.10
NtlmHttpFilter: 10.10.10.123\mbeedell successfully authenticated against 0.0.0.0<00>/10.10.10.10
java.net.SocketTimeoutException: Read timed out
        at java.net.SocketInputStream.socketRead0(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:129)
        at jcifs.util.transport.Transport.readn(Transport.java:29)
        at jcifs.smb.SmbTransport.peekKey(SmbTransport.java:351)
        at jcifs.util.transport.Transport.loop(Transport.java:100)
        at jcifs.util.transport.Transport.run(Transport.java:248)
        at java.lang.Thread.run(Thread.java:595)
update: 0 0:40
00000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
00010: 9A 09 27 35 69 0A 6D A0 6F CE 40 16 11 FB 78 B2  |..'5i.m oÃ@..ûx²|
00020: 18 D8 9C 7A 97 0A AA 95                          |.Ã.z..ª.        |



Here are the logged properties, if they help


#JCIFS PROPERTIES
#Mon Jul 17 14:58:27 BST 2006
java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition
sun.boot.library.path=/opt/java/jdk1.5.0_06/jre/lib/i386
java.vm.version=1.5.0_06-b05
shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
java.vm.vendor=Sun Microsystems Inc.
java.vendor.url=http\://java.sun.com/
path.separator=\:
jcifs.netbios.cachePolicy=1200
java.vm.name=Java HotSpot(TM) Client VM
file.encoding.pkg=sun.io
user.country=GB
sun.os.patch.level=unknown
java.vm.specification.name=Java Virtual Machine Specification
user.dir=/opt/v141/Tomcat5.0/logs
java.runtime.version=1.5.0_06-b05
java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
java.endorsed.dirs=/opt/v141/Tomcat5.0/common/endorsed
os.arch=i386
java.io.tmpdir=/opt/v141/Tomcat5.0/temp
line.separator=\n
java.vm.specification.vendor=Sun Microsystems Inc.
java.naming.factory.url.pkgs=org.apache.naming
os.name=Linux
sun.jnu.encoding=UTF-8
java.library.path=/opt/java/jdk1.5.0_06/jre/lib/i386/client\:/opt/java/jdk1.5.0_06/jre/lib/i386\:/opt/java/jdk1.5.0_06/jre/../lib/i386

java.specification.name=Java Platform API Specification
java.class.version=49.0
sun.management.compiler=HotSpot Client Compiler
os.version=2.6.13-15-smp
user.home=/root
user.timezone=GB
catalina.useNaming=true
java.awt.printerjob=sun.print.PSPrinterJob
jcifs.smb.client.soTimeout=35000
file.encoding=UTF-8
java.specification.version=1.5
jcifs.util.loglevel=6
catalina.home=/opt/v141/Tomcat5.0
user.name=root
java.class.path=/opt/java/j2sdk/lib/tools.jar\:/opt/v141/Tomcat5.0/bin/bootstrap.jar\:/opt/v141/Tomcat5.0/bin/commons-logging-api.jar

java.naming.factory.initial=org.apache.naming.java.javaURLContextFactory
package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
java.vm.specification.version=1.0
jcifs.http.domainController=10.10.10.10
sun.arch.data.model=32
java.home=/opt/java/jdk1.5.0_06/jre
java.specification.vendor=Sun Microsystems Inc.
user.language=en
jcifs.netbios.baddr=10.10.10.255
java.vm.info=mixed mode
java.version=1.5.0_06
java.ext.dirs=/opt/java/jdk1.5.0_06/jre/lib/ext
sun.boot.class.path=/opt/v141/Tomcat5.0/common/endorsed/xercesImpl.jar\:/opt/v141/Tomcat5.0/common/endorsed/xmlParserAPIs.jar\:/opt/java/jdk1.5.

0_06/jre/lib/rt.jar\:/opt/java/jdk1.5.0_06/jre/lib/i18n.jar\:/opt/java/jdk1.5.0_06/jre/lib/sunrsasign.jar\:/opt/java/jdk1.5.0_06/jre/lib/jsse.ja

r\:/opt/java/jdk1.5.0_06/jre/lib/jce.jar\:/opt/java/jdk1.5.0_06/jre/lib/charsets.jar\:/opt/java/jdk1.5.0_06/jre/classes
java.vendor=Sun Microsystems Inc.
server.loader=${catalina.home}/server/classes,${catalina.home}/server/lib/*.jar
catalina.base=/opt/v141/Tomcat5.0
file.separator=/
jcifs.smb.client.domain=CICRYOSERVER
java.vendor.url.bug=http\://java.sun.com/cgi-bin/bugreport.cgi
common.loader=${catalina.home}/common/classes,${catalina.home}/common/endorsed/*.jar,${catalina.home}/common/lib/*.jar
sun.cpu.endian=little
sun.io.unicode.encoding=UnicodeLittle
jcifs.smb.client.responseTimeout=30000
package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans.
sun.cpu.isalist=

Reply | Threaded
Open this post in threaded view
|

Re: Socket Timeout Problem

Michael B Allen-4
This is normal. The connection to the domain controller closes after
jcifs.smb.client.soTimeout milliseconds of idle time. You're only seeing
it because you have the log level set higher than the default.

Mike

On Mon, 17 Jul 2006 15:51:19 +0100
"Merlin Beedell" <[hidden email]> wrote:

> I seem to be able to authenticate, but then I get a socket error [java.net.SocketTimeoutException: Read timed out].
> NtlmHttpFilter: 10.10.10.123\mbeedell successfully authenticated against 0.0.0.0<00>/10.10.10.10
> java.net.SocketTimeoutException: Read timed out
>         at java.net.SocketInputStream.socketRead0(Native Method)
>         at java.net.SocketInputStream.read(SocketInputStream.java:129)
>         at jcifs.util.transport.Transport.readn(Transport.java:29)
>         at jcifs.smb.SmbTransport.peekKey(SmbTransport.java:351)
>         at jcifs.util.transport.Transport.loop(Transport.java:100)
>         at jcifs.util.transport.Transport.run(Transport.java:248)
>         at java.lang.Thread.run(Thread.java:595)

--
Michael B Allen
PHP Extension for SSO w/ Windows Group Authorization
http://www.ioplex.com/