[jcifs] Timeout waiting for response from server

Allen, Michael B (RSCH) Michael_B_Allen at ml.com
Tue Apr 16 09:56:24 EST 2002

> -----Original Message-----
> From:	holger.doerl at web.de [SMTP:holger.doerl at web.de]
> Sent:	Monday, April 15, 2002 7:29 PM
> To:	Allen, Michael B (RSCH)
> Subject:	Re: RE: [jcifs] Timeout waiting for response from server
> Hi,
> I use the newest version, I think.
> CLASSPATH=/home/holger/spider::/home/holger/spider/jcifs-0.6.2.jar:/home/holger/spider/jdbc7.0-1.2.jar:/home/holger/jswat/jswat-20020216.jar:/usr/lib/java/lib/tools.jar
	That 'operation interrupted' thing is characteristic of an older flawed version of jCIFS. Are you
	running within some kind of app server? If so and the app server is interrupting threads it may
	seriously break the jCIFS client depending on what version of the JRE you're using.

> I tried another workstation with suse 7.3 (I've suse 7.2) and there is the problem too.
> What can I do ??

	Crawling CIFS intranets is a pretty intense operation. The jCIFS client really only just makes
	it even practical. The libsmbclient library doesn't multiplex io AFAIK so the only real
	alternative would be to write a Win32 crawler. In general you will have to have significant
	knowledge of the protocol to develop a truly good SMB Crawler (try log=ALL to see what's
	happening under the hood and what commands are timing out). I have tried (and largely
	failed) to come up with a good algorithm that utilises threads well, doesn't collect stale data,
	and doesn't get hung up on uncooperative hosts. The closest I have come is the T2Crawler
	but it doesn't respect the depth parameter.

	You might try a few properties though:

	Not sure about the cachePolicy but anything that increases name resolution time or freeing
	resources quickly will help a lot. You might also try and jack-up the attrExpirationPeriod but
	at some point your data will become invalid if you cache it too long (especially depending on
	the algorithm your using).

	After having said that I think you might want to look at your name resolution setups like the
	hosts file and DNS. It is strange that the code would work differently on one machine and
	not the other. Are you binding the right interface? If not look at the laddr properties. Look at
	the difference in JREs/JDKs on the machines.


More information about the jcifs mailing list