[jcifs] SmbException

Michael B Allen mba2000 at ioplex.com
Sun Aug 14 19:03:10 GMT 2005


This is happening because your hostname is resolving to 127.0.0.1. This
is a known bug and we have a fix on The List and should be resolved in
the next release. For now, please set jcifs.smb.client.laddr to the ip
address of your local network interface.

Mike

On Sun, 14 Aug 2005 16:48:15 +0100
Rich Midwinter <rich.midwinter at gmail.com> wrote:

> Hi all
> 
> I'm trying to get started with using jcifs. Unfortunately I'm yet to
> get past the exception listed below. I presume it's something to do
> with me incorrectly formatting the URL. I've reached this exception
> various ways, one example being to use the provided List.java and
> smb://192.168.0.53 as the URL. Where obviously that is the IP address
> of the machine on the LAN  I'm trying to connect to (an XP machine).
> 
> My machine runs Linux, I can browse to the Windows machine in nautilus
> and I've just discovered using smb://127.0.0.1 successfully connects
> to my samba server - unfortunately not very useful, but a sign that
> I'm doing something right!
> 
> I'd be grateful if you could make sure my address is added to the
> reply list as I'm not subscribed to the jcifs list.
> 
> Many thanks
> 
> Rich
> 
> jcifs.smb.SmbException: 
> jcifs.util.transport.TransportException
> java.net.SocketException: Invalid argument or cannot assign requested address
>         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.negotiate(SmbTransport.java:228)
>         at jcifs.smb.SmbTransport.doConnect(SmbTransport.java:266)
>         at jcifs.util.transport.Transport.run(Transport.java:204)
>         at java.lang.Thread.run(Thread.java:595)
> 
>         at jcifs.util.transport.Transport.run(Transport.java:220)
>         at java.lang.Thread.run(Thread.java:595)
> 
>         at jcifs.smb.SmbTransport.connect(SmbTransport.java:256)
>         at jcifs.smb.SmbTree.treeConnect(SmbTree.java:122)
>         at jcifs.smb.SmbFile.connect(SmbFile.java:791)
>         at jcifs.smb.SmbFile.connect0(SmbFile.java:761)
>         at jcifs.smb.SmbFile.send(SmbFile.java:660)
>         at jcifs.smb.SmbFile.doNetEnum(SmbFile.java:1619)
>         at jcifs.smb.SmbFile.list(SmbFile.java:1542)
>         at jcifs.smb.SmbFile.list(SmbFile.java:1436)
>         at databackup.SMBTest.<init>(SMBTest.java:27)
>         at databackup.SMBTest.main(SMBTest.java:42)
> 


More information about the jcifs mailing list