[jcifs] SmbFile: BindException problem while browsingworkgro ups

Allen, Michael B (RSCH) Michael_B_Allen at ml.com
Thu Nov 8 17:14:57 EST 2001

> -----Original Message-----
> From:	Christopher R. Hertel [SMTP:crh at ubiqx.mn.org]
> Hmmm... The problem *sounds* like a case of SO_REUSEADDR not being used, but
> I think SO_REUSEADDR only applies to TCP connections.  Hmmm...
Yes, I'm familiar with this and the nature of the Exception made me think of it immediately. However it suggests the client is trying to reuse the same local port which could only be provoked by the
jcifs.smb.client.lport property which admittedly I have never used and I doubt Jan is either.

> This would only be a problem if:
>   1) We're talking about a TCP connection. (Mike: does initial, top-level
>      browse list lookup use TCP?  There are some odd gaps in my knowledge,
>      yes.)
	Yes, it opens a TCP connection to IPC$ of the LMB.

>   2) The same port is being requested for the outgoing connection.
	It shouldn't. The client opens the socket on port 0 by default which means any available port.

>   3) The JVM you are using doesn't set SO_REUSEADDR.
	I doubt it but I don't really know. I would think it would. I think the only issue with not using this socket option is a minor degradation in performace. I would think they would use it to
avoid the confusion it would cause.

>   4) There is an SO_REUSEADDR flag, or equivalent, on your OS.
	I think most OS's that support Java at this point use BSD style sockets. Maybe MAC < 10 is different. Donno.

> That's all pretty much a longshot but it sure sounds like symptoms I've
> seen when SO_REUSEADDR isn't set.
	True. But I don't think it's the problem because unless he's using the lport property. A -Dlog=ALL trace would really narrow it down.


More information about the jcifs mailing list