[jcifs] jcifs v 1.2.6 cant connect to samba 2.0.7 again

Michael B Allen mba2000 at ioplex.com
Fri Oct 28 19:52:05 GMT 2005


On Fri, 28 Oct 2005 11:49:57 -0700
Mike Mercier <mmercier at gmail.com> wrote:

> Hello,
> 
> Using similar code as before:
> 
> package cifstest;
> 
> import jcifs.smb.SmbFile;
> import jcifs.smb.SmbException;
> import java.net.MalformedURLException;
> /**
> *
> * @author Administrator
> */
> 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", "3");
> SmbFile theFile;
> try {
> theFile = new SmbFile(args[0]);
> if (theFile.exists()) {
> System.out.println("Found " + theFile.getPath());
> }
> if (theFile.isDirectory()) {
> System.out.println(theFile.getPath() + " is a directory");
> }
> } catch (SmbException e) {
> System.out.println(e.getClass() + " " + e.getMessage());
> } catch (MalformedURLException e) {
> System.out.println(e.getClass() + " " + e.getMessage());
> }
> }
> }
> 
> I found a copy of 1.2.4 on my machine (src only, no jar file).
> 
> Add 1.2.4 source to the project, and remove jcifs-1.2.6.jar from lib\ext and
> project and above application works successfully.
> 
> Remove source (1.2.4) from project, add 1.2.6 to lib\ext and as a library,
> or add 1.2.6 as src and the application fails.
> 
> Typical failure output:
> java.net.SocketTimeoutException: Receive timed out
> at java.net.PlainDatagramSocketImpl.receive0(Native Method)
> at java.net.PlainDatagramSocketImpl.receive(Unknown Source)
> at java.net.DatagramSocket.receive(Unknown Source)
> at jcifs.netbios.NameServiceClient.run(NameServiceClient.java:184)
> at java.lang.Thread.run(Unknown Source)

The above exception is normal. It's just the name service thread timing out.

> class jcifs.smb.SmbException

What is this exception? Post the stack trace.

> session established ok with xxxxxxxx/xxx.xxx.xxx.xxx
> New data read: Transport1[xxxxxxxx/xxx.xxx.xxx.xx:139]
> 00000: FF 53 4D 42 72 00 00 00 00 88 01 00 00 00 00 00 | SMBr...........|
> 00010: 00 00 00 00 00 00 00 00 00 00 7C 0F 00 00 01 00 |..........|.....|
> 
> byteCount=10 but readBytesWireFormat returned 9

The above warning is harmless.

Please don't post the bits that you think are important. Just post the
whole thing. If you really feel it contains sensitive information just
send it to me directly.

> 
> on server, the log file contains:
> [2005/10/28 10:50:40, 0] lib/util_sock.c:read_socket_data(477)
> read_socket_data: recv failure for 4. Error = Connection reset by peer
> 
> Has something changed since 1.2.4?
> 
> Thanks,
> Mike
> 


More information about the jcifs mailing list