Cannot mount Azure Files as a Network Share
-
Pi Model: 3 B
RetroPie Version Used: 4.4
Built From: Pre made SD Image on RetroPie website
Error messages received: "mount error(115): Operation now in progress"
Guides used:- https://retropie.org.uk/docs/Running-ROMs-from-a-Network-Share/#option-1-add-to-autostartsh-preferred-if-using-v40
- https://docs.microsoft.com/en-us/azure/storage/files/storage-how-to-use-files-linux
How to replicate the problem:
- Set up Azure Files
- On separate computer: Add a test ROM with Azure Storage Explorer to test the storage
- On RetroPie: Create a test folder:
mkdir /mnt/MyAzureFileShare
- On RetroPie: Try to mount the share and omit the password to verify the connection by getting a password prompt:
sudo mount -t cifs //<storage-account-name>.file.core.windows.net/<share-name> /mnt/MyAzureFileShare -o username=<storage-account-name>
- On RetroPie: Enter the storage password on prompt
- After a moment it gives the error:
mount error(115): Operation now in progress
What's wrong?
All I can guess is that RetroPie doesn't run SMB 3.0 with encryption, as the Azure docs state:
In order to mount an Azure file share outside of the Azure region it is hosted in, such as on-premises or in a different Azure region, the OS must support the encryption functionality of SMB 3.0.
But it also states:
SMB 3.0 encryption support was introduced in Linux kernel version 4.11 and has been backported to older kernel versions for popular Linux distributions.
And running
uname -r
gives4.14.30-v7+
which is higher than 4.11 so it should be ok? -
@seriema check errors in /var/log/syslog
Try adding
-o vers=3.0
(and specifying username and password in options also). Seeman mount.cifs
. -
@BuZz
cat /var/log/syslog
shows this error:Dec 28 22:55:11 retropie kernel: [26828.368357] CIFS VFS: Error connecting to socket. Aborting operation. Dec 28 22:55:11 retropie kernel: [26828.368375] CIFS VFS: cifs_mount failed w/return code = -115
Calls without the
vers=3.0
also say this:Dec 29 08:45:54 retropie kernel: [62271.409511] No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount.
I started with the version and including the password as that's how it's shown inside the Azure portal for this specific Azure Files. Then I have tried multiple variations of
mount.cifs
. All return the same error (mount error(115): Operation now in progress
):# As given by Azure portal sudo mount -t cifs //<storage-account-name>.file.core.windows.net/<share-name> /mnt/MyAzureFileShare -o vers=3.0,username=<storage-account-name>,password=<storage-account-key>,dir_mode=0777,file_mode=0777,sec=ntlmssp # With security disabled in Azure sudo mount -t cifs //<storage-account-name>.file.core.windows.net/<share-name> /mnt/MyAzureFileShare -o vers=2.1,username=<storage-account-name>,password=<storage-account-key>,dir_mode=0777,file_mode=0777,sec=ntlmssp,serverino # Other variants sudo mount -t cifs //<storage-account-name>.file.core.windows.net/<share-name> /mnt/MyAzureFileShare -o username=<storage-account-name>,password=<storage-account-key>,dir_mode=0777,file_mode=0777,serverino sudo mount -t cifs //<storage-account-name>.file.core.windows.net/<share-name> /mnt/MyAzureFileShare -o "username=<storage-account-name>,password=<storage-account-key>,dir_mode=0777,file_mode=0777,serverino" sudo mount -t cifs //<storage-account-name>.file.core.windows.net/<share-name> /mnt/MyAzureFileShare -o username=<storage-account-name>,password=<storage-account-key>,dir_mode=0777,file_mode=0777,serverino,sec=ntlm sudo mount -t cifs //<storage-account-name>.file.core.windows.net/<share-name> /mnt/MyAzureFileShare -o vers=3.0,username=<storage-account-name>,password=<storage-account-key>,dir_mode=0777,file_mode=0777,serverino sudo mount -t cifs //<storage-account-name>.file.core.windows.net/<share-name> /mnt/MyAzureFileShare -o vers=3.0,username=<storage-account-name>,password=<storage-account-key>,dir_mode=0777,file_mode=0777,serverino,sec=ntlm sudo mount -t cifs //<storage-account-name>.file.core.windows.net/<share-name> /mnt/MyAzureFileShare -o vers=3.0,username=<storage-account-name>,password=<storage-account-key>,dir_mode=0777,file_mode=0777,serverino,sec=ntlmssp
-
@BuZz I followed the Azure Files Troubleshooting guide and found this Troubleshooting tool (AzureFileDiagnostics.sh) from MS. It gave me a nice log: https://paste.ubuntu.com/p/YbcxFW2YXx/
The last line says everything:
2018-12-29T10:20:18.495Z Error: Port 445 is not reachable from this client and the error is Connection Timeout or Error happens
So, how do I open port 445? Could it be my ISP that's blocking it? I have an Apple AirPort Time Capsule as router and it doesn't have any ports blocked AFAIK.
-
If you're not blocking the port yourself, check with your ISP. RetroPie doesn't come with any firewall rules configured (unless you did so).
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.