[jcifs] jcifs v 1.2.6 cant connect to samba 2.0.7

Mike Mercier mmercier at gmail.com
Fri Oct 28 15:48:37 GMT 2005


Hello,

I have the following java app:

package cifstest;

import jcifs.smb.SmbFile;
import jcifs.smb.SmbException;
import java.net.MalformedURLException;

public class Main {

/** Creates a new instance of Main */
public Main() {
}

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
System.setProperty("jcifs.util.loglevel", "4");
System.setProperty("jcifs.smb.client.disablePlainTextPasswords", "false");
// TODO code application logic here
SmbFile theFile;
try {
theFile = new SmbFile(args[0]);
if (theFile.exists()) {
System.out.println("Found " + theFile.getPath());
}
if (theFile.isDirectory()) {
System.out.println(theFile.getParent() + " is a directory");
}
} catch (SmbException e) {
System.out.println(e.getClass() + " " + e.getMessage());
} catch (MalformedURLException e) {
System.out.println(e.getClass() + " " + e.getMessage());
}
}
}

Against a windows xp machine with an open share I can successfully do the
following:
java -jar cifsTest.jar smb://server/share

Against a Linux box running smb (2.0.7) with an open share the above fails
with:
Transport1: connect: state=0
class jcifs.smb.SmbException

and sometimes with:
Transport1: connect: state=0
class jcifs.smb.SmbException
session established ok with 0.0.0.0 <http://0.0.0.0><00>/xxx.xxx.xxx.xxx
The error in the smb log is:
[2005/10/28 06:18:00, 0] lib/util_sock.c:read_socket_data(477)
read_socket_data: recv failure for 4. Error = Connection reset by peer

Anyone have any insight?

Thanks,
--Mike
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the jcifs mailing list