[jcifs] jcifs.smb.SmbException: The network name cannot be found -- if a Windows 2003 domain controller was picked
Michael B Allen
ioplex at gmail.com
Thu May 8 02:11:27 MDT 2014
On Tue, Mar 11, 2014 at 3:29 PM, Allen Han <allen.han at perficient.com> wrote:
> Hello all
> I have encountered a very strange problem when Windows 2003 server DC was
> picked, SMB access would fail. When Windows 2008 DC was used, it would be
> OK. Here is the log (jcifs.util.loglevel=4).
> The JCIFS lib used was 1.3.17. Domain name based root was configured for
> Have anyone seen this kind of issues before?
> Any workaround or fix to it?
> network name cannot be
> Addr = 220.127.116.11
> ServerWithDfs hostName = mydomain.mycorp.com
> doConnect() tree.share = CENTRAL
> **** 78 DCs *****
> jcifs.smb.SmbException: The network name cannot be found.
> at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:563)
> at jcifs.smb.SmbTransport.send(SmbTransport.java:663)
> at jcifs.smb.SmbSession.send(SmbSession.java:263)
> at jcifs.smb.SmbTree.treeConnect(SmbTree.java:176)
> at jcifs.smb.SmbFile.doConnect(SmbFile.java:979)
> at jcifs.smb.SmbFile.connect(SmbFile.java:1022)
I'm not sure what the problem is in this case.
I can tell you that the "network name cannot be found" error is
referring to the share not being present. It's not that JCIFS can't
find the host.
One thing that JCIFS doesn't do quite right is to search DFS hosts for
the target share. As soon as it finds a server that is suppose to host
the DFS target, it just tries that one server and if it fails it quits
probably with the exception above. Meaning, you could have a DFS
target that is supposed to be backed by some share but it's missing.
The correct behavior would be to catch the above exception and then
try the next host that is supposed to have the a share backing the DFS
target. So you might fix the problem by finding the missing share and
ask your network admin to set it up correctly and replicate it and so
Michael B Allen
Java Active Directory Integration
More information about the jCIFS