[jcifs] SmbFile: BindException problem while browsing workgro ups

Allen, Michael B (RSCH) Michael_B_Allen at ml.com
Thu Nov 8 10:44:58 EST 2001


So you run your program once, it works, but if you run it again within a short period of time it fails to bind that address? If so, it sounds like the OS is not releasing the socket from the last run.
Are you setting any properties like laddr or baddr? Try setting baddr to your broadcast address. Post a -Dlog=ALL if you still haven't figured it out.

> -----Original Message-----
> From:	Hoppe, Jan 3203 PPW-1 [SMTP:Jan.Hoppe at de.heidelberg.com]
> Sent:	Wednesday, November 07, 2001 9:52 AM
> To:	'jcifs at lists.samba.org'
> Subject:	[jcifs] SmbFile: BindException problem while browsing workgroups
> 
> I'm not able to list the workgroups in my network twice (empty smb-URL in
> SmbFile constructor: SmbFile smbFile = new SmbFile("smb://"))  
> But after creating a new smbFile with a workgroup name in it's constructor
> it works fine! I'm really confused.
> 
> jCIFS dir List: Beginning @ smb://
> Nov 7 15:29:47.376 - SmbFile exception
> java.net.BindException: Cannot assign requested address: no further
> information
> 	at java.net.PlainSocketImpl.socketConnect(Native Method)
> 	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:312)
> 	at
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125)
> 	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112)
> 	at java.net.Socket.<init>(Socket.java:273)
> 	at java.net.Socket.<init>(Socket.java:177)
> 	at jcifs.netbios.NbtSocket.<init>(NbtSocket.java:54)
> 	at jcifs.netbios.NbtSocket.<init>(NbtSocket.java:50)
> 	at jcifs.smb.SmbTransport.ensureOpen(SmbTransport.java:215)
> 	at jcifs.smb.SmbTransport.send(SmbTransport.java:401)
> 	at jcifs.smb.SmbTransport.negotiate(SmbTransport.java:526)
> 	at jcifs.smb.SmbTree.domainEnum(SmbTree.java:319)
> 	at jcifs.smb.SmbFile.list(SmbFile.java:705)
> 	at BrowseNet.list(BrowseNet.java:26)
> 	at BrowseNet.main(BrowseNet.java:72)
> java.lang.NullPointerException: 
> 	at BrowseNet.list(BrowseNet.java:27)
> 	at BrowseNet.main(BrowseNet.java:72)
> 
> I'm working on a W2K-PC with Java(TM) 2 SDK, Standard Edition Version 1.3.0
> 
> Greetings,
> ----------------------------------------------------------------------------
> -------------------------------------------------
> Dipl. Ing. Jan Hoppe
> 
> Heidelberg Digital			Company info:	www.heidelberg.com
> Research & Development
> Dr.-Hell-Str.			            E-Mail:
> mailto:Jan.Hoppe at de.heidelberg.com
> 24107 Kiel				Phone:		+49-431-386-3203
> Germany				Fax:		+49-431-386-3287
> ----------------------------------------------------------------------------
> -------------------------------------------------
> 
> 
> 





More information about the jcifs mailing list