[jcifs] Strange connection problems to Airport Extreme shares

Christian Ghisler support at ghisler.com
Fri Jul 3 03:51:26 MDT 2015


I'm using Jcifs in a free (and ad-free) file manager for Android.
A user has reported a very strange connection problem to an
Airport Extreme router with SMB shares. The problem also
occurs with other Android file managers using JCIFS, like
the popular ES File Explorer, so it's not specific to my app.

The following happens:
When the user tries to connect to the Airport Extreme, the
connection times out and fails. However, when the user first
connects to the Airport Extreme from a Windows PC, he is
then able to connect to it also from all Android apps!

What's special about the Airport Extreme is that it takes
1 minute(!) to initialize its disk before it can be accessed,
also when connecting from Windows.

I have therefore set the tomeout
jcifs.smb.client.responseTimeout value to 90000 milliseconds.

However, the connection still fails after these 90 seconds with
the following error:
Transport1 timedout waiting for response to SmbComSessionSetupAndX.
See below for the complete error message.

Now the question is: Why is Windows able to connect, but
JCIFS/Android isn't? Does Windows send any extra requests
to initialize the server before trying to access the shares?

Some additional info:
- when trying to access the uninitialized share from JCIFS
  multiple times, it takes 1 minute each time. So apparently the
  connection request doesn't inititialize the share.
- it's possible to browse the shares via smb://server , but
  trying to enter a share causes again the above error.
- address and credentials are correct because the connection
  does work after first connecting from a Windows PC.

Since I do not have an Airport Extreme myself, I could only
report what the user told me. I have sent him a few test
versions of my app, but couldn't find a solution for this
problem so far.

Best regards

Christian Ghisler

P.S. Complete error message:

jcifs.util.transport.TransportException: Transport1 timedout waiting for response to SmbComSessionSetupAndX[command=SMB_COM_SESSION_SETUP_ANDX,received=false,errorCode=0,flags=0x0018,flags2=0xC803,signSeq=0,tid=0,pid=53547,uid=0,mid=2,wordCount=13,byteCount=65,andxCommand=0x75,andxOffset=126,snd_buf_size=16644,maxMpxCount=10,VC_NUMBER=1,sessionKey=0,lmHash.length=24,ntHash.length=0,capabilities=84,accountName=guest,primaryDomain=?,NATIVE_OS=Linux,NATIVE_LANMAN=jCIFS]
at jcifs.util.transport.Transport.readn(Unknown Source)

More information about the jCIFS mailing list