Hi,
I have a similar problem in 1.1.10, when using more that 4 threads to
access a remote share I got time-out Exceptions. I have tried from 2
different plattforms: solaris and HP-Ux (Pa) and the problem occurrs on
both.
I have also tried with 1.1.9 and trans, but the result is the same. I
have already reported a similar issue with 1.1.9.
I tried shares on different win OS, and the problem was always
reproducable. The share I use for my test is based on Windows 2003. It
contains 21,5 Gb in 46512 files and 17700 folders. The test is
basically the T2Crawlwer, crawling all folders and fetching the ".doc"
files. There are only a few word documents.
The exception was:
--------------------- start exception ---------------------------------
jcifs.smb.SmbException: Timeout waiting for response from server:
eukan/10.51.81.2
at jcifs.smb.SmbTransport.send(SmbTransport.java:671)
at jcifs.smb.SmbSession.send(SmbSession.java:234)
at jcifs.smb.SmbTree.send(SmbTree.java:103)
at jcifs.smb.SmbFile.send(SmbFile.java:725)
at jcifs.smb.SmbFile.open0(SmbFile.java:863)
at jcifs.smb.SmbFile.open(SmbFile.java:881)
at jcifs.smb.SmbFileInputStream.<init>
(SmbFileInputStream.java:68)
at jcifs.smb.SmbFileInputStream.<init>
(SmbFileInputStream.java:62)
at T2Crawler$CrawlerThread.run(T2Crawler.java:93)
Socket closed: eukan/10.51.81.2
java.net.SocketException: Socket closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:134)
at jcifs.netbios.SessionServicePacket.readn
(SessionServicePacket.java:70)
at jcifs.netbios.SessionServicePacket.readPacketType
(SessionServicePacket.java:84)
at jcifs.netbios.SocketInputStream.read
(SocketInputStream.java:74)
at jcifs.netbios.SocketInputStream.read
(SocketInputStream.java:40)
at java.io.FilterInputStream.read(FilterInputStream.java:66)
at java.io.PushbackInputStream.read
(PushbackInputStream.java:120)
at jcifs.smb.SmbTransport.run(SmbTransport.java:388)
--------------------------- end of exception -----------------------
The thing is that if I try the same using 0.8.3, I do not get all these
errors.
I attach the source code.
Regards,
Michael
----- Mensaje Original -----
De: tim_wiffen@xxxxxxxxxxxx
Fecha: Viernes, Abril 15, 2005 3:17 pm
Asunto: Re: [jcifs] Multiple Threads Causes Server Timeout
>
Thanks for your input Mike.
>
>
I have tried again with 1.1.9trans JAR and get different
>
exceptions. I
>
think the output is a bit mixed up as the different threads report
>
their
>
exceptions. I have tried this with other servers and don't seem to
>
get the
>
same kind of errors, so it seems to be a problem with this
>
particular
>
server (a Win2k box) but exactly what is difficult to say. I've
>
included
>
the errors below in case your interested.
>
>
I have also met the concurrency error in my testing (possibly more
>
likely
>
on my dual Xeon Hyper Threaded setup) and this may be related but
>
it
>
something about this server seems more likely.
>
>
In trying 1.1.9trans I met some errors that do not occur in 1.19
>
which I
>
have included below. I get these errors even on servers other than
>
the
>
problem one on our network.
>
>
I would like to use SmbFile.copyTo() but I couldn't see how to
>
make it
>
copy to a java.io.File which I need to do to create it on the
>
local file
>
system.
>
>
Regards
>
>
Tim Wiffen
>
>
==============================
>
>
jcifs.smb.SmbException:
>
jcifs.util.transport.TransportException: Transport1 timedout
>
waiting for
>
response to
>
SmbComClose[command=SMB_COM_CLOSE,received=false,errorCode=The
>
operation completed
>
successfully.,flags=0x0018,flags2=0xC003,signSeq=0,tid=2051,pid=45147,ui
d=2051,mid=32771,wordCount=3,byteCount=0,fid=32774,lastWriteTime=0]
>
at jcifs.util.transport.Transport.sendrecv(Transport.java:74)
>
at jcifs.smb.SmbTransport.send(SmbTransport.java:454)
>
at jcifs.smb.SmbSession.send(SmbSession.java:261)
>
at jcifs.smb.SmbTree.send(SmbTree.java:91)
>
at jcifs.smb.SmbFile.send(SmbFile.java:687)
>
at jcifs.smb.SmbFile.close(SmbFile.java:859)
>
at jcifs.smb.SmbFile.close(SmbFile.java:865)
>
at jcifs.smb.SmbFile.close(SmbFile.java:869)
>
at
>
jcifs.smb.SmbFileInputStream.close(SmbFileInputStream.java:80)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement.jcifsCopy
(TestFileManagement.java:242)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement.access$000
(TestFileManagement.java:27)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement$2CopyThread.run
(TestFileManagement.java:187)
>
at java.lang.Thread.run(Thread.java:595)
>
>
at jcifs.smb.SmbTransport.send(SmbTransport.java:459)
>
at jcifs.smb.SmbSession.send(SmbSession.java:261)
>
at jcifs.smb.SmbTree.send(SmbTree.java:91)
>
at jcifs.smb.SmbFile.send(SmbFile.java:687)
>
at jcifs.smb.SmbFile.close(SmbFile.java:859)
>
at jcifs.smb.SmbFile.close(SmbFile.java:865)
>
at jcifs.smb.SmbFile.close(SmbFile.java:869)
>
at
>
jcifs.smb.SmbFileInputStream.close(SmbFileInputStream.java:80)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement.jcifsCopy
(TestFileManagement.java:242)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement.access$000
(TestFileManagement.java:27)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement$2CopyThread.run
(TestFileManagement.java:187)
>
at java.lang.Thread.run(Thread.java:595)
>
jcifs.smb.SmbException:
>
jcifs.util.transport.TransportException: Transport1 timedout
>
waiting for
>
response to
>
SmbComClose[command=SMB_COM_CLOSE,received=false,errorCode=The
>
operation completed
>
successfully.,flags=0x0018,flags2=0xC003,signSeq=0,tid=2051,pid=45147,ui
d=2051,mid=32772,wordCount=3,byteCount=0,fid=49161,lastWriteTime=0]
>
at jcifs.util.transport.Transport.sendrecv(Transport.java:74)
>
at jcifs.smb.SmbTransport.send(SmbTransport.java:454)
>
at jcifs.smb.SmbSession.send(SmbSession.java:261)
>
at jcifs.smb.SmbTree.send(SmbTree.java:91)
>
at jcifs.smb.SmbFile.send(SmbFile.java:687)
>
at jcifs.smb.SmbFile.close(SmbFile.java:859)
>
at jcifs.smb.SmbFile.close(SmbFile.java:865)
>
at jcifs.smb.SmbFile.close(SmbFile.java:869)
>
at
>
jcifs.smb.SmbFileInputStream.close(SmbFileInputStream.java:80)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement.jcifsCopy
(TestFileManagement.java:242)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement.access$000
(TestFileManagement.java:27)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement$2CopyThread.run
(TestFileManagement.java:187)
>
at java.lang.Thread.run(Thread.java:595)
>
>
at jcifs.smb.SmbTransport.send(SmbTransport.java:459)
>
at jcifs.smb.SmbSession.send(SmbSession.java:261)
>
2005-04-15 09:33:22,682 INFO [Worker0] util.TestFileManagement
>
(TestFileManagement.java:226) -- Fetching
>
smb://USERNAME:PASSWORD@xxxxxxxxxxxxxxxxxxxxxxxxx/Extract/Current/f318af
300_Lon
>
at jcifs.smb.SmbTree.send(SmbTree.java:91)
>
at jcifs.smb.SmbFile.send(SmbFile.java:687)
>
at jcifs.smb.SmbFile.close(SmbFile.java:859)
>
at jcifs.smb.SmbFile.close(SmbFile.java:865)
>
at jcifs.smb.SmbFile.close(SmbFile.java:869)
>
at
>
jcifs.smb.SmbFileInputStream.close(SmbFileInputStream.java:80)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement.jcifsCopy
(TestFileManagement.java:242)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement.access$000
(TestFileManagement.java:27)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement$2CopyThread.run
(TestFileManagement.java:187)
>
at java.lang.Thread.run(Thread.java:595)
>
jcifs.smb.SmbException:
>
2005-04-15 09:33:22,698 INFO [Worker2] util.TestFileManagement
>
(TestFileManagement.java:226) -- Fetching
>
smb://USERNAME:PASSWORD@xxxxxxxxxxxxxxxxxxxxxx/Extract/Current/f318af300
_Sin
>
jcifs.util.transport.TransportException: Transport1 timedout
>
waiting for
>
response to
>
SmbComClose[command=SMB_COM_CLOSE,received=false,errorCode=The
>
operation completed
>
successfully.,flags=0x0018,flags2=0xC003,signSeq=0,tid=2051,pid=45147,ui
d=2051,mid=32773,wordCount=3,byteCount=0,fid=49160,lastWriteTime=0]
>
at jcifs.util.transport.Transport.sendrecv(Transport.java:74)
>
at jcifs.smb.SmbTransport.send(SmbTransport.java:454)
>
at jcifs.smb.SmbSession.send(SmbSession.java:261)
>
at jcifs.smb.SmbTree.send(SmbTree.java:91)
>
at jcifs.smb.SmbFile.send(SmbFile.java:687)
>
at jcifs.smb.SmbFile.close(SmbFile.java:859)
>
at jcifs.smb.SmbFile.close(SmbFile.java:865)
>
at jcifs.smb.SmbFile.close(SmbFile.java:869)
>
at
>
jcifs.smb.SmbFileInputStream.close(SmbFileInputStream.java:80)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement.jcifsCopy
(TestFileManagement.java:242)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement.access$000
(TestFileManagement.java:27)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement$2CopyThread.run
(TestFileManagement.java:187)
>
at java.lang.Thread.run(Thread.java:595)
>
>
at jcifs.smb.SmbTransport.send(SmbTransport.java:459)
>
at jcifs.smb.SmbSession.send(SmbSession.java:261)
>
at jcifs.smb.SmbTree.send(SmbTree.java:91)
>
at jcifs.smb.SmbFile.send(SmbFile.java:687)
>
at jcifs.smb.SmbFile.close(SmbFile.java:859)
>
at jcifs.smb.SmbFile.close(SmbFile.java:865)
>
at jcifs.smb.SmbFile.close(SmbFile.java:869)
>
at
>
jcifs.smb.SmbFileInputStream.close(SmbFileInputStream.java:80)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement.jcifsCopy
(TestFileManagement.java:242)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement.access$000
(TestFileManagement.java:27)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement$2CopyThread.run
(TestFileManagement.java:187)
>
at java.lang.Thread.run(Thread.java:595)
>
2005-04-15 09:33:22,698 INFO [Worker1] util.TestFileManagement
>
(TestFileManagement.java:226) -- Fetching
>
smb://USERNAME:PASSWORD@xxxxxxxxxxxxxxxxxxxxxx/Extract/Current/f318fd1.e
xt.1
>
Exception in thread "Worker0" java.lang.NullPointerException
>
at
>
com.westlb.GOScheduler.util.TestFileManagement.jcifsCopy
(TestFileManagement.java:241)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement.access$000
(TestFileManagement.java:27)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement$2CopyThread.run
(TestFileManagement.java:187)
>
at java.lang.Thread.run(Thread.java:595)
>
Exception in thread "Worker2" java.lang.NullPointerException
>
at
>
com.westlb.GOScheduler.util.TestFileManagement.jcifsCopy
(TestFileManagement.java:241)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement.access$000
(TestFileManagement.java:27)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement$2CopyThread.run
(TestFileManagement.java:187)
>
at java.lang.Thread.run(Thread.java:595)
>
Exception in thread "Worker1" java.lang.NullPointerException
>
at
>
com.westlb.GOScheduler.util.TestFileManagement.jcifsCopy
(TestFileManagement.java:241)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement.access$000
(TestFileManagement.java:27)
>
at
>
com.westlb.GOScheduler.util.TestFileManagement$2CopyThread.run
(TestFileManagement.java:187)
>
at java.lang.Thread.run(Thread.java:595)
>
>
As an aside I tried connecting to a different server with the
>
1.1.9trans
>
jar and got this error which I don't get with 1.1.9:
>
>
jcifs.smb.SmbException:
>
jcifs.util.transport.TransportException
>
java.net.ConnectException: Connection refused: connect
>
at java.net.PlainSocketImpl.socketConnect(Native Method)
>
at
>
java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>
at
>
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
>
at java.net.Socket.connect(Socket.java:507)
>
at java.net.Socket.connect(Socket.java:457)
>
at java.net.Socket.<init>(Socket.java:365)
>
at java.net.Socket.<init>(Socket.java:238)
>
at jcifs.smb.SmbTransport.doConnect(SmbTransport.java:200)
>
at jcifs.util.transport.Transport.run(Transport.java:194)
>
at java.lang.Thread.run(Thread.java:595)
>
>
at jcifs.util.transport.Transport.run(Transport.java:210)
>
at java.lang.Thread.run(Thread.java:595)
>
>
at jcifs.smb.SmbTransport.connect(SmbTransport.java:196)
>
at jcifs.smb.SmbTree.treeConnect(SmbTree.java:118)
>
at jcifs.smb.SmbFile.connect(SmbFile.java:790)
>
at jcifs.smb.SmbFile.connect0(SmbFile.java:760)
>
at jcifs.smb.SmbFile.send(SmbFile.java:659)
>
at jcifs.smb.SmbFile.doFindFirstNext(SmbFile.java:1677)
>
at jcifs.smb.SmbFile.listFiles(SmbFile.java:1568)
>
at jcifs.smb.SmbFile.listFiles(SmbFile.java:1476)
>
>
>
>
>
>
>
"Michael B Allen" <mba2000@xxxxxxxxxx>
>
>
>
>
15/04/2005 00:41
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
To: tim_wiffen@xxxxxxxxxxxx
>
cc: jcifs@xxxxxxxxxxxxxxx
>
Subject: Re: [jcifs] Multiple Threads Causes Server Timeout
>
>
>
tim_wiffen@xxxxxxxxxxxx said:
>
> jcifs version: 1.1.9
>
>
>
> I have some code that runs a pool of 3 threads that pick file
>
requests
>
off
>
> a list and fetch them. As a unit test I am using this to copy
>
300 files
>
> (total size of files 500MB) in a directory on a remote server.
>
However> after copying about 50 files I start to get SmbExceptions
>
but other
>
files
>
> are copied successfully after these errors:
>
>
>
> jcifs.smb.SmbException: Timeout waiting for response from server:
>
> someserver.myserver.net/123.45.67.89
>
> at jcifs.smb.SmbTransport.send(SmbTransport.java:671)
>
>
I can't reproduce this. Your example runs ok for me. I had to
>
change the
>
path a little to point to a directory with files.
>
>
I have to wonder if maybe your network has a problem. For example, one
>
thing that could cause this kind of trouble is if your NIC is set to
>
half-duplex but the router wants full-duplex. Or visa-versa. Check
>
it out.
>
>
Otherwise I ran your example several times on a large directory of
>
filesand it worked 100%. I ran it with 20 threads a couple times
>
and it worked
>
fine.
>
>
Note there is a known concurrency error that someone reported but
>
at this
>
point I do not think your problem is related. Also, note the
>
jcifs-1.1.9trans.jar I pointed you to *does* fail your test in a very
>
similar way (timeout) but for entirely different reasons (bad mid
>
rollover).
>
>
Try your test on a different network.
>
>
Also, note your Iterator is not synchronized. I don't think that's a
>
problem but thought I would mention it.
>
>
Mike
>
>
PS: I realize you're just testing but for a variety of reasons any
>
filecopying you do should always be done using SmbFile.copyTo().
>
>
>
>
>
This message is confidential and may be privileged. It is
>
intended solely for the named addressee. If you are not the
>
intended recipient please inform us. Any unauthorised
>
dissemination, distribution or copying hereof is prohibited.
>
As we cannot guarantee the genuineness or completeness of
>
the information contained in this message, the statements
>
set forth above are not legally binding. In connection
>
therewith, we also refer to the governing regulations of
>
WestLB concerning signatory authority published in the
>
standard bank signature lists with regard to the legally
>
binding effect of statements made with the intent to
>
obligate WestLB.
>
>
Diese Nachricht ist vertraulich. Sie ist ausschliesslich fuer
>
den im Adressfeld ausgewiesenen Adressaten bestimmt.
>
Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten
>
wir um eine kurze Nachricht. Jede unbefugte Weiterleitung
>
oder Fertigung einer Kopie ist unzulaessig. Da wir nicht die
>
Echtheit oder Vollstaendigkeit der in dieser Nachricht
>
enthaltenen Informationen garantieren koennen, schliessen wir
>
die rechtliche Verbindlichkeit der vorstehenden Erklaerungen
>
und Aeusserungen aus. Wir verweisen in diesem Zusammenhang
>
auch auf die fuer die Bank geltenden Regelungen ueber die
>
Verbindlichkeit von Willenserklaerungen mit verpflichtendem
>
Inhalt, die in den bankueblichen Unterschriftenverzeichnissen
>
bekannt gemacht werden.
>
>
T2Crawler.java
Description: Binary data
Thread at a glance:
Previous Message by Date:
click to view message preview
jcifs-1.1.10 released / DC Lookup Rewrite
The getChallengeForDomain code has been rewritten. It has been considerably
simplified. It will now rotate through the first
jcifs.netbios.lookupRespLimit domain controllers rather than try to grow
and shrink the list depending on load. The lookupRespLimit property default
has been reduced to 3. The timeout value for rebuilting the DC list has
been increased from 20 minutes to 10 hours. This is calculated by
multiplying jcifs.netvios.cachePolicy by 60 but the default in the
SmbSession class is 60 * 10 meaning 10 minutes so 10 * 60 is 10 hours.
Finally the NtlmChallenge class is now Serializeable for servers that are
pedantic about what can be stored in a session.
--
IRC - where men are men, women are men, and the boys are FBI agents.
Next Message by Date:
click to view message preview
Re: Multiple Threads Causes Server Timeout
madlg3@xxxxxxxxxxx said:
> Hi,
>
> I have a similar problem in 1.1.10, when using more that 4 threads to
> access a remote share I got time-out Exceptions. I have tried from 2
> different plattforms: solaris and HP-Ux (Pa) and the problem occurrs on
> both.
>
> I have also tried with 1.1.9 and trans, but the result is the same. I
> have already reported a similar issue with 1.1.9.
>
> I tried shares on different win OS, and the problem was always
> reproducable. The share I use for my test is based on Windows 2003. It
> contains 21,5 Gb in 46512 files and 17700 folders. The test is
> basically the T2Crawlwer, crawling all folders and fetching the ".doc"
> files. There are only a few word documents.
>
> The exception was:
>
> --------------------- start exception ---------------------------------
> jcifs.smb.SmbException: Timeout waiting for response from server:
> eukan/10.51.81.2
> at jcifs.smb.SmbTransport.send(SmbTransport.java:671)
> at jcifs.smb.SmbSession.send(SmbSession.java:234)
> at jcifs.smb.SmbTree.send(SmbTree.java:103)
<snip>
> The thing is that if I try the same using 0.8.3, I do not get all these
> errors.
>
> I attach the source code.
I still can't reproduce this. I ran your example without the endsWith()
restriction on 30 gigs of files no problem. Your version is a little odd
because it creates a new thread for every directory but the semaphore only
permits one to run per T2Crawler instance. So it creates 100's of threads
that crawl one directory and then exit. Combined with allocating 8192
bytes per file it's kind of a memory hog. But still, I don't think that
should be a problem.
I know there's a concurrency bug in jCIFS but I'm starting to have doubts
that your actually tripping it up with this code. Are you sure your not
accidentally running with an old jar file? Try remove the jar and running
the program again. How long does it take to get errors? Is your network
fast? Is it 100 full-duplex or Gigabit or what? Are you still using
-Xmx512?
I think the problem must be a different bug alltogether. Or your setting
some properties you should not be. Or there's something environmental
going on.
Stumped,
Mike
Previous Message by Thread:
click to view message preview
Re: Multiple Threads Causes Server Timeout
Thanks for your input Mike.
I have tried again with 1.1.9trans JAR and get different exceptions. I think the output is a bit mixed up as the different threads report their exceptions. I have tried this with other servers and don't seem to get the same kind of errors, so it seems to be a problem with this particular server (a Win2k box) but exactly what is difficult to say. I've included the errors below in case your interested.
I have also met the concurrency error in my testing (possibly more likely on my dual Xeon Hyper Threaded setup) and this may be related but it something about this server seems more likely.
In trying 1.1.9trans I met some errors that do not occur in 1.19 which I have included below. I get these errors even on servers other than the problem one on our network.
I would like to use SmbFile.copyTo() but I couldn't see how to make it copy to a java.io.File which I need to do to create it on the local file system.
Regards
Tim Wiffen
==============================
jcifs.smb.SmbException:
jcifs.util.transport.TransportException: Transport1 timedout waiting for response to SmbComClose[command=SMB_COM_CLOSE,received=false,errorCode=The operation completed successfully.,flags=0x0018,flags2=0xC003,signSeq=0,tid=2051,pid=45147,uid=2051,mid=32771,wordCount=3,byteCount=0,fid=32774,lastWriteTime=0]
at jcifs.util.transport.Transport.sendrecv(Transport.java:74)
at jcifs.smb.SmbTransport.send(SmbTransport.java:454)
at jcifs.smb.SmbSession.send(SmbSession.java:261)
at jcifs.smb.SmbTree.send(SmbTree.java:91)
at jcifs.smb.SmbFile.send(SmbFile.java:687)
at jcifs.smb.SmbFile.close(SmbFile.java:859)
at jcifs.smb.SmbFile.close(SmbFile.java:865)
at jcifs.smb.SmbFile.close(SmbFile.java:869)
at jcifs.smb.SmbFileInputStream.close(SmbFileInputStream.java:80)
at com.westlb.GOScheduler.util.TestFileManagement.jcifsCopy(TestFileManagement.java:242)
at com.westlb.GOScheduler.util.TestFileManagement.access$000(TestFileManagement.java:27)
at com.westlb.GOScheduler.util.TestFileManagement$2CopyThread.run(TestFileManagement.java:187)
at java.lang.Thread.run(Thread.java:595)
at jcifs.smb.SmbTransport.send(SmbTransport.java:459)
at jcifs.smb.SmbSession.send(SmbSession.java:261)
at jcifs.smb.SmbTree.send(SmbTree.java:91)
at jcifs.smb.SmbFile.send(SmbFile.java:687)
at jcifs.smb.SmbFile.close(SmbFile.java:859)
at jcifs.smb.SmbFile.close(SmbFile.java:865)
at jcifs.smb.SmbFile.close(SmbFile.java:869)
at jcifs.smb.SmbFileInputStream.close(SmbFileInputStream.java:80)
at com.westlb.GOScheduler.util.TestFileManagement.jcifsCopy(TestFileManagement.java:242)
at com.westlb.GOScheduler.util.TestFileManagement.access$000(TestFileManagement.java:27)
at com.westlb.GOScheduler.util.TestFileManagement$2CopyThread.run(TestFileManagement.java:187)
at java.lang.Thread.run(Thread.java:595)
jcifs.smb.SmbException:
jcifs.util.transport.TransportException: Transport1 timedout waiting for response to SmbComClose[command=SMB_COM_CLOSE,received=false,errorCode=The operation completed successfully.,flags=0x0018,flags2=0xC003,signSeq=0,tid=2051,pid=45147,uid=2051,mid=32772,wordCount=3,byteCount=0,fid=49161,lastWriteTime=0]
at jcifs.util.transport.Transport.sendrecv(Transport.java:74)
at jcifs.smb.SmbTransport.send(SmbTransport.java:454)
at jcifs.smb.SmbSession.send(SmbSession.java:261)
at jcifs.smb.SmbTree.send(SmbTree.java:91)
at jcifs.smb.SmbFile.send(SmbFile.java:687)
at jcifs.smb.SmbFile.close(SmbFile.java:859)
at jcifs.smb.SmbFile.close(SmbFile.java:865)
at jcifs.smb.SmbFile.close(SmbFile.java:869)
at jcifs.smb.SmbFileInputStream.close(SmbFileInputStream.java:80)
at com.westlb.GOScheduler.util.TestFileManagement.jcifsCopy(TestFileManagement.java:242)
at com.westlb.GOScheduler.util.TestFileManagement.access$000(TestFileManagement.java:27)
at com.westlb.GOScheduler.util.TestFileManagement$2CopyThread.run(TestFileManagement.java:187)
at java.lang.Thread.run(Thread.java:595)
at jcifs.smb.SmbTransport.send(SmbTransport.java:459)
at jcifs.smb.SmbSession.send(SmbSession.java:261)
2005-04-15 09:33:22,682 INFO [Worker0] util.TestFileManagement (TestFileManagement.java:226) -- Fetching smb://USERNAME:PASSWORD@xxxxxxxxxxxxxxxxxxxxxxxxx/Extract/Current/f318af300_Lon
at jcifs.smb.SmbTree.send(SmbTree.java:91)
at jcifs.smb.SmbFile.send(SmbFile.java:687)
at jcifs.smb.SmbFile.close(SmbFile.java:859)
at jcifs.smb.SmbFile.close(SmbFile.java:865)
at jcifs.smb.SmbFile.close(SmbFile.java:869)
at jcifs.smb.SmbFileInputStream.close(SmbFileInputStream.java:80)
at com.westlb.GOScheduler.util.TestFileManagement.jcifsCopy(TestFileManagement.java:242)
at com.westlb.GOScheduler.util.TestFileManagement.access$000(TestFileManagement.java:27)
at com.westlb.GOScheduler.util.TestFileManagement$2CopyThread.run(TestFileManagement.java:187)
at java.lang.Thread.run(Thread.java:595)
jcifs.smb.SmbException:
2005-04-15 09:33:22,698 INFO [Worker2] util.TestFileManagement (TestFileManagement.java:226) -- Fetching smb://USERNAME:PASSWORD@xxxxxxxxxxxxxxxxxxxxxx/Extract/Current/f318af300_Sin
jcifs.util.transport.TransportException: Transport1 timedout waiting for response to SmbComClose[command=SMB_COM_CLOSE,received=false,errorCode=The operation completed successfully.,flags=0x0018,flags2=0xC003,signSeq=0,tid=2051,pid=45147,uid=2051,mid=32773,wordCount=3,byteCount=0,fid=49160,lastWriteTime=0]
at jcifs.util.transport.Transport.sendrecv(Transport.java:74)
at jcifs.smb.SmbTransport.send(SmbTransport.java:454)
at jcifs.smb.SmbSession.send(SmbSession.java:261)
at jcifs.smb.SmbTree.send(SmbTree.java:91)
at jcifs.smb.SmbFile.send(SmbFile.java:687)
at jcifs.smb.SmbFile.close(SmbFile.java:859)
at jcifs.smb.SmbFile.close(SmbFile.java:865)
at jcifs.smb.SmbFile.close(SmbFile.java:869)
at jcifs.smb.SmbFileInputStream.close(SmbFileInputStream.java:80)
at com.westlb.GOScheduler.util.TestFileManagement.jcifsCopy(TestFileManagement.java:242)
at com.westlb.GOScheduler.util.TestFileManagement.access$000(TestFileManagement.java:27)
at com.westlb.GOScheduler.util.TestFileManagement$2CopyThread.run(TestFileManagement.java:187)
at java.lang.Thread.run(Thread.java:595)
at jcifs.smb.SmbTransport.send(SmbTransport.java:459)
at jcifs.smb.SmbSession.send(SmbSession.java:261)
at jcifs.smb.SmbTree.send(SmbTree.java:91)
at jcifs.smb.SmbFile.send(SmbFile.java:687)
at jcifs.smb.SmbFile.close(SmbFile.java:859)
at jcifs.smb.SmbFile.close(SmbFile.java:865)
at jcifs.smb.SmbFile.close(SmbFile.java:869)
at jcifs.smb.SmbFileInputStream.close(SmbFileInputStream.java:80)
at com.westlb.GOScheduler.util.TestFileManagement.jcifsCopy(TestFileManagement.java:242)
at com.westlb.GOScheduler.util.TestFileManagement.access$000(TestFileManagement.java:27)
at com.westlb.GOScheduler.util.TestFileManagement$2CopyThread.run(TestFileManagement.java:187)
at java.lang.Thread.run(Thread.java:595)
2005-04-15 09:33:22,698 INFO [Worker1] util.TestFileManagement (TestFileManagement.java:226) -- Fetching smb://USERNAME:PASSWORD@xxxxxxxxxxxxxxxxxxxxxx/Extract/Current/f318fd1.ext.1
Exception in thread "Worker0" java.lang.NullPointerException
at com.westlb.GOScheduler.util.TestFileManagement.jcifsCopy(TestFileManagement.java:241)
at com.westlb.GOScheduler.util.TestFileManagement.access$000(TestFileManagement.java:27)
at com.westlb.GOScheduler.util.TestFileManagement$2CopyThread.run(TestFileManagement.java:187)
at java.lang.Thread.run(Thread.java:595)
Exception in thread "Worker2" java.lang.NullPointerException
at com.westlb.GOScheduler.util.TestFileManagement.jcifsCopy(TestFileManagement.java:241)
at com.westlb.GOScheduler.util.TestFileManagement.access$000(TestFileManagement.java:27)
at com.westlb.GOScheduler.util.TestFileManagement$2CopyThread.run(TestFileManagement.java:187)
at java.lang.Thread.run(Thread.java:595)
Exception in thread "Worker1" java.lang.NullPointerException
at com.westlb.GOScheduler.util.TestFileManagement.jcifsCopy(TestFileManagement.java:241)
at com.westlb.GOScheduler.util.TestFileManagement.access$000(TestFileManagement.java:27)
at com.westlb.GOScheduler.util.TestFileManagement$2CopyThread.run(TestFileManagement.java:187)
at java.lang.Thread.run(Thread.java:595)
As an aside I tried connecting to a different server with the 1.1.9trans jar and got this error which I don't get with 1.1.9:
jcifs.smb.SmbException:
jcifs.util.transport.TransportException
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at java.net.Socket.<init>(Socket.java:365)
at java.net.Socket.<init>(Socket.java:238)
at jcifs.smb.SmbTransport.doConnect(SmbTransport.java:200)
at jcifs.util.transport.Transport.run(Transport.java:194)
at java.lang.Thread.run(Thread.java:595)
at jcifs.util.transport.Transport.run(Transport.java:210)
at java.lang.Thread.run(Thread.java:595)
at jcifs.smb.SmbTransport.connect(SmbTransport.java:196)
at jcifs.smb.SmbTree.treeConnect(SmbTree.java:118)
at jcifs.smb.SmbFile.connect(SmbFile.java:790)
at jcifs.smb.SmbFile.connect0(SmbFile.java:760)
at jcifs.smb.SmbFile.send(SmbFile.java:659)
at jcifs.smb.SmbFile.doFindFirstNext(SmbFile.java:1677)
at jcifs.smb.SmbFile.listFiles(SmbFile.java:1568)
at jcifs.smb.SmbFile.listFiles(SmbFile.java:1476)
"Michael B Allen" <mba2000@xxxxxxxxxx>
15/04/2005 00:41
To: tim_wiffen@xxxxxxxxxxxx
cc: jcifs@xxxxxxxxxxxxxxx
Subject: Re: [jcifs] Multiple Threads Causes Server Timeout
tim_wiffen@xxxxxxxxxxxx said:
> jcifs version: 1.1.9
>
> I have some code that runs a pool of 3 threads that pick file requests off
> a list and fetch them. As a unit test I am using this to copy 300 files
> (total size of files 500MB) in a directory on a remote server. However
> after copying about 50 files I start to get SmbExceptions but other files
> are copied successfully after these errors:
>
> jcifs.smb.SmbException: Timeout waiting for response from server:
> someserver.myserver.net/123.45.67.89
> at jcifs.smb.SmbTransport.send(SmbTransport.java:671)
I can't reproduce this. Your example runs ok for me. I had to change the
path a little to point to a directory with files.
I have to wonder if maybe your network has a problem. For example, one
thing that could cause this kind of trouble is if your NIC is set to
half-duplex but the router wants full-duplex. Or visa-versa. Check it out.
Otherwise I ran your example several times on a large directory of files
and it worked 100%. I ran it with 20 threads a couple times and it worked
fine.
Note there is a known concurrency error that someone reported but at this
point I do not think your problem is related. Also, note the
jcifs-1.1.9trans.jar I pointed you to *does* fail your test in a very
similar way (timeout) but for entirely different reasons (bad mid
rollover).
Try your test on a different network.
Also, note your Iterator is not synchronized. I don't think that's a
problem but thought I would mention it.
Mike
PS: I realize you're just testing but for a variety of reasons any file
copying you do should always be done using SmbFile.copyTo().
This message is confidential and may be privileged. It is
intended solely for the named addressee. If you are not the
intended recipient please inform us. Any unauthorised
dissemination, distribution or copying hereof is prohibited.
As we cannot guarantee the genuineness or completeness of
the information contained in this message, the statements
set forth above are not legally binding. In connection
therewith, we also refer to the governing regulations of
WestLB concerning signatory authority published in the
standard bank signature lists with regard to the legally
binding effect of statements made with the intent to
obligate WestLB.
Diese Nachricht ist vertraulich. Sie ist ausschliesslich fuer
den im Adressfeld ausgewiesenen Adressaten bestimmt.
Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten
wir um eine kurze Nachricht. Jede unbefugte Weiterleitung
oder Fertigung einer Kopie ist unzulaessig. Da wir nicht die
Echtheit oder Vollstaendigkeit der in dieser Nachricht
enthaltenen Informationen garantieren koennen, schliessen wir
die rechtliche Verbindlichkeit der vorstehenden Erklaerungen
und Aeusserungen aus. Wir verweisen in diesem Zusammenhang
auch auf die fuer die Bank geltenden Regelungen ueber die
Verbindlichkeit von Willenserklaerungen mit verpflichtendem
Inhalt, die in den bankueblichen Unterschriftenverzeichnissen
bekannt gemacht werden.
Next Message by Thread:
click to view message preview
Re: Multiple Threads Causes Server Timeout
madlg3@xxxxxxxxxxx said:
> Hi,
>
> I have a similar problem in 1.1.10, when using more that 4 threads to
> access a remote share I got time-out Exceptions. I have tried from 2
> different plattforms: solaris and HP-Ux (Pa) and the problem occurrs on
> both.
>
> I have also tried with 1.1.9 and trans, but the result is the same. I
> have already reported a similar issue with 1.1.9.
>
> I tried shares on different win OS, and the problem was always
> reproducable. The share I use for my test is based on Windows 2003. It
> contains 21,5 Gb in 46512 files and 17700 folders. The test is
> basically the T2Crawlwer, crawling all folders and fetching the ".doc"
> files. There are only a few word documents.
>
> The exception was:
>
> --------------------- start exception ---------------------------------
> jcifs.smb.SmbException: Timeout waiting for response from server:
> eukan/10.51.81.2
> at jcifs.smb.SmbTransport.send(SmbTransport.java:671)
> at jcifs.smb.SmbSession.send(SmbSession.java:234)
> at jcifs.smb.SmbTree.send(SmbTree.java:103)
<snip>
> The thing is that if I try the same using 0.8.3, I do not get all these
> errors.
>
> I attach the source code.
I still can't reproduce this. I ran your example without the endsWith()
restriction on 30 gigs of files no problem. Your version is a little odd
because it creates a new thread for every directory but the semaphore only
permits one to run per T2Crawler instance. So it creates 100's of threads
that crawl one directory and then exit. Combined with allocating 8192
bytes per file it's kind of a memory hog. But still, I don't think that
should be a problem.
I know there's a concurrency bug in jCIFS but I'm starting to have doubts
that your actually tripping it up with this code. Are you sure your not
accidentally running with an old jar file? Try remove the jar and running
the program again. How long does it take to get errors? Is your network
fast? Is it 100 full-duplex or Gigabit or what? Are you still using
-Xmx512?
I think the problem must be a different bug alltogether. Or your setting
some properties you should not be. Or there's something environmental
going on.
Stumped,
Mike