[jcifs] Problem connecting to a samba file share

Hite, Sharon (NIH/NIEHS) [E] hite1 at niehs.nih.gov
Mon Feb 9 17:12:06 GMT 2009


I am trying to troubleshoot a problem connecting to a samba file share.
I can connect manually, but when I use JCIFS to connect, I get this
message:

 

[2009-02-09 16:49:05,648] ERROR appLog The specified share name
//devwww/devwww cannot be found. 

jcifs.smb.SmbException

jcifs.util.transport.TransportException

java.io.IOException: transport closed in negotiate

               at
jcifs.smb.SmbTransport.negotiate(SmbTransport.java:276)

               at
jcifs.smb.SmbTransport.doConnect(SmbTransport.java:306)

               at jcifs.util.transport.Transport.run(Transport.java:240)

               at java.lang.Thread.run(Thread.java:595)

 

               at jcifs.util.transport.Transport.run(Transport.java:256)

               at java.lang.Thread.run(Thread.java:595)

 

               at jcifs.smb.SmbTransport.connect(SmbTransport.java:296)

               at jcifs.smb.SmbTree.treeConnect(SmbTree.java:141)

               at jcifs.smb.SmbFile.doConnect(SmbFile.java:858)

               at jcifs.smb.SmbFile.connect(SmbFile.java:901)

               at jcifs.smb.SmbFile.connect0(SmbFile.java:827)

               at jcifs.smb.SmbFile.open0(SmbFile.java:917)

               at jcifs.smb.SmbFile.open(SmbFile.java:951)

               at
jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:73)

               at
jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:65)

               at
jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:52)

               at
gov.nih.niehs.pubbot.server.PubBotServer.init(PubBotServer.java:769)

               at
gov.nih.niehs.pubbot.server.PubBotServer.main(PubBotServer.java:149)

               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)

               at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)

               at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)

               at java.lang.reflect.Method.invoke(Method.java:585)

               at
com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

 

My application has had no problems connecting for over two years so I
don't think it's my code.  However, I need some ideas on where to look
to resolve this issue.  For reference, here is the code I use to test
connections:

 

        jcifs.Config.setProperty( "jcifs.netbios.client.writeSize",
"65535");

        jcifs.Config.setProperty( "jcifs.netbios.client.snd_buf_size",
"60416");

        jcifs.Config.setProperty("jcifs.smb.lmCompatibility","3"); //
Allows use of LMv2

        jcifs.Config.setProperty("jcifs.netbios.wins",props.getIp());

 
jcifs.Config.setProperty("jcifs.smb.client.username",props.getUsername()
);

 
jcifs.Config.setProperty("jcifs.smb.client.password",props.getPassword()
);

 
jcifs.Config.setProperty("jcifs.smb.client.domain",props.getDomain());

 

            try {

                appLog.debug("Testing connection to the share " +
fileShare;

                //noinspection UNUSED_SYMBOL

                SmbFileInputStream in = new SmbFileInputStream("smb:" +
fileShare + "/index.cfm");

            } catch (SmbException e) {

                appLog.error("The specified share name " +
props.getFileShares(i) + " cannot be found.",e);

                System.exit(-1);

            } catch (MalformedURLException e) {

                appLog.fatal("MalformedURLException testing file share "
+ props.getFileShares(i),e);

                System.exit(-1);

            } catch (UnknownHostException e) {

                appLog.fatal("UnknownHostException testing file share "
+ props.getFileShares(i),e);

                System.exit(-1);

            } catch (IOException e) {

                appLog.fatal("IOException testing file share " +
props.getFileShares(i),e);

                System.exit(-1);

            }

 

Sharon S Hite, Information Technology Specialist

Computer Technology Branch, Office of Management

National Institute of Environmental Health Sciences

 

-------------- next part --------------
HTML attachment scrubbed and removed


More information about the jcifs mailing list