[jcifs] no name with type 0x20

Clint Heyer clint at thestaticvoid.net
Wed Sep 26 19:23:42 EST 2001

  I'm getting the following error when I try to do a SmbFile.list on a 
particular machine ('W'), using its IP address. It does the same thing for 
the NetBIOS name, or hostname and with or without specifying a user (user 
used was guest):

Sep 26 19:02:08.690 - SmbFile exception java.net.UnknownHostException: no 
name with type 0x20 with no scope for host    at 
jcifs.netbios.NbtAddress.getAllByAddress(NbtAddress.java:622)        at 
jcifs.netbios.NbtAddress.checkData(NbtAddress.java:286)      at 
jcifs.netbios.NbtSocket.connect(NbtSocket.java:100)  at 
jcifs.netbios.NbtSocket.<init>(NbtSocket.java:62)    at 
jcifs.netbios.NbtSocket.<init>(NbtSocket.java:50)    at 
jcifs.smb.SmbTransport.ensureOpen(SmbTransport.java:215)     at 
jcifs.smb.SmbTransport.send(SmbTransport.java:400)   at 
jcifs.smb.SmbTransport.negotiate(SmbTransport.java:525)      at 
jcifs.smb.SmbTransport.send(SmbTransport.java:362)   at 
jcifs.smb.SmbSession.sessionSetup(SmbSession.java:154)       at 
jcifs.smb.SmbSession.send(SmbSession.java:128)       at 
jcifs.smb.SmbTree.treeConnect(SmbTree.java:84)       at 
jcifs.smb.SmbTree.sendTransaction(SmbTree.java:49)   at 
jcifs.smb.SmbTree.netShareEnum(SmbTree.java:289)     at 
jcifs.smb.SmbFile.list(SmbFile.java:710)     at List.main(List.java:45)

This machine, (netbios name 'w', domain name: 'w.blah.com', ip: 
''), is on the same subnet as myself. In Windows Explorer, 
\\W (or \\ or \\w.blah.com) will show its shares. On a Linux 
machine, also on the same subnet, doing 'smbclient -L -U 
guest' and with an empty password will list all the shares. It gives the 
following before the share listing:

added interface ip= bcast= nmask=
session request to failed (Called name not present)
session request to 192 failed (Called name not present)

I'm not quite sure why the normal list() method fails for this particular 
machine (and a few others), yet I can still get to it via Explorer and 
smbclient. It kind of throws a spanner in the works. If anyone can shed any 
light on this behaviour, and how to get around it, it would be much 
appreciated! BTW: It's a Windows 2000 Pro machine, and I can get to other 
machines fine. jCIFS is setup to use DNS,WINS,BCAST,LMHOSTS as the resolve 
order, and a WINS server is set.


More information about the jcifs mailing list