Discussion:
[jcifs] The network name cannot be found error
Pitre, Russell
2004-07-21 19:31:56 UTC
Permalink
Hello All-

We are using the jcifs filter for our intranet authentication. It's
been working great, but all of sudden this afternoon we started seeing
the error you see below. Nothing has change with the intranet code. We
are using 2000 Active Directory and Tomcat 5.0.24. I'm pretty sure the
error is coming the Domain Controller but I'm not entirely sure what to
look for. I went through the event logs but have not found anything
that stands out. Any ideas?

ERROR:

jcifs.smb.SmbException: The network name cannot be found.
jcifs.smb.SmbTransport.send(SmbTransport.java:670)
jcifs.smb.SmbSession.sessionSetup(SmbSession.java:179)
jcifs.smb.SmbSession.send(SmbSession.java:138)
jcifs.smb.SmbTree.treeConnect(SmbTree.java:134)
jcifs.smb.SmbSession.logon(SmbSession.java:75)
jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:129)


WEB.XML:

<filter>
<filter-name>NTLM HTTP Authentication Filter</filter-name>
<filter-class>jcifs.http.NtlmHttpFilter</filter-class>

<init-param>
<param-name>jcifs.http.domainController</param-name>
<param-value>172.20.95.14</param-value>
</init-param>
<init-param>
<param-name>jcifs.smb.client.domain</param-name>
<param-value>SHAWMUT</param-value>
</init-param>
<init-param>
<param-name>jcifs.netbios.wins</param-name>
<param-value>172.20.95.14</param-value>
</init-param>
<init-param>
<param-name>jcifs.netbios.baddr</param-name>
<param-value>255.255.255.255</param-value>
</init-param>
</filter>
Michael B Allen
2004-07-22 01:34:27 UTC
Permalink
Post by Pitre, Russell
Hello All-
We are using the jcifs filter for our intranet authentication. It's
been working great, but all of sudden this afternoon we started seeing
the error you see below. Nothing has change with the intranet code. We
are using 2000 Active Directory and Tomcat 5.0.24. I'm pretty sure the
error is coming the Domain Controller but I'm not entirely sure what to
look for. I went through the event logs but have not found anything
that stands out. Any ideas?
This means that share jCIFS is trying to access was not found. By default
jCIFS tries to connect to IPC$. If you view the domain controller in
Network Neighborhood what happends? Do you see IPC$ listed?
Post by Pitre, Russell
jcifs.smb.SmbException: The network name cannot be found.
<snip, snip>
Post by Pitre, Russell
<filter>
<filter-name>NTLM HTTP Authentication Filter</filter-name>
<filter-class>jcifs.http.NtlmHttpFilter</filter-class>
<init-param>
<param-name>jcifs.http.domainController</param-name>
<param-value>172.20.95.14</param-value>
</init-param>
<init-param>
<param-name>jcifs.smb.client.domain</param-name>
<param-value>SHAWMUT</param-value>
</init-param>
<init-param>
<param-name>jcifs.netbios.wins</param-name>
<param-value>172.20.95.14</param-value>
</init-param>
<init-param>
<param-name>jcifs.netbios.baddr</param-name>
<param-value>255.255.255.255</param-value>
</init-param>
This baddr property is useless as it is '255.255.255.255' by default.
Otherwise the web.xml looks good. If nothing else has changed on your side
I'd guess the domain controller has changed somehow.

Mike
Eric Glass
2004-07-22 08:45:16 UTC
Permalink
On Wed, 21 Jul 2004 21:34:27 -0400 (EDT), Michael B Allen
Post by Michael B Allen
Post by Pitre, Russell
Hello All-
We are using the jcifs filter for our intranet authentication. It's
been working great, but all of sudden this afternoon we started seeing
the error you see below. Nothing has change with the intranet code. We
are using 2000 Active Directory and Tomcat 5.0.24. I'm pretty sure the
error is coming the Domain Controller but I'm not entirely sure what to
look for. I went through the event logs but have not found anything
that stands out. Any ideas?
This means that share jCIFS is trying to access was not found. By default
jCIFS tries to connect to IPC$. If you view the domain controller in
Network Neighborhood what happends? Do you see IPC$ listed?
IPC$ is often not displayed when browsing in Network Neighborhood (may
depend on client OS); you could try the following:


import jcifs.Config;
import jcifs.smb.SmbFile;

public class ListShares {

public static void main(String[] args) throws Exception {
Config.setProperty("jcifs.smb.client.username", args[0]);
Config.setProperty("jcifs.smb.client.password", args[1]);
SmbFile[] shares = new SmbFile("smb://172.20.95.14/").listFiles();
for (int i = 0; i < shares.length; i++) {
System.out.println(shares[i]);
}
}

}


Stick your jCIFS parameters from web.xml into a .properties file, and run:

java -Djcifs.properties=myparams.properties ListShares username password

If "smb://172.20.95.14/IPC$/" is listed, then everything should be
working; if you get errors, or IPC$ isn't listed, that may point to
your problem.


Eric
Michael B Allen
2004-07-22 18:13:58 UTC
Permalink
On Thu, 22 Jul 2004 04:45:16 -0400
Post by Eric Glass
public class ListShares {
public static void main(String[] args) throws Exception {
Config.setProperty("jcifs.smb.client.username", args[0]);
Config.setProperty("jcifs.smb.client.password", args[1]);
SmbFile[] shares = new SmbFile("smb://172.20.95.14/").listFiles();
for (int i = 0; i < shares.length; i++) {
System.out.println(shares[i]);
The only problem with this is that RAPs are sent over IPC$ so if IPC$ isn't
there you'll get "The network name cannot ..."

Mike
--
Greedo shoots first? Not in my Star Wars.
Loading...