Strange connection problems to Airport Extreme shares
Christian Ghisler <[email protected]> Fri, 3 Jul 2015 11:51:26 +0200
| Newsgroups | gmane.network.samba.java |
|---|---|
| Message-ID | <VMSyX9RapObZ28gDL3xOTubSz9pfGMbUY16hqM2LSUw@akmail> |
Hi! 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 r= esponse to SmbComSessionSetupAndX[command=3DSMB_COM_SESSION_SETUP_ANDX,rec= eived=3Dfalse,errorCode=3D0,flags=3D0x0018,flags2=3D0xC803,signSeq=3D0,tid= =3D0,pid=3D53547,uid=3D0,mid=3D2,wordCount=3D13,byteCount=3D65,andxCommand= =3D0x75,andxOffset=3D126,snd_buf_size=3D16644,maxMpxCount=3D10,VC_NUMBER=3D= 1,sessionKey=3D0,lmHash.length=3D24,ntHash.length=3D0,capabilities=3D84,ac= countName=3Dguest,primaryDomain=3D?,NATIVE_OS=3DLinux,NATIVE_LANMAN=3DjCIF= S] at jcifs.util.transport.Transport.readn(Unknown Source)