Connecting to Azure File Share from Mac: No Route to Host
Asked Answered
J

7

8

I'm trying to connect to an Azure file share from my Mac running High Sierra 10.13.6 using the following command:

mount_smbfs -d 0777 -f 0777 //dolphins:[email protected]/models /Users/b3020111/Azure

However I keep getting the error:

mount_smbfs: server connection failed: No route to host

I have turned off packet signing in /etc/nsmb.conf:

[default] signing_required=no

After looking around the web I seem to be at a loss as to where to go, any help is appreciated.

Jp answered 23/8, 2018 at 11:4 Comment(5)
Did the provided answer resolve your issue ?Juliettejulina
did it work for you.. I am facing similar issue.Fulgent
@AdamSmith-MSFT I still have this problem on 2 different machines. I'm not able to connect to any Azure file shares.Hake
@FrankKrueger, please double check if port 445 is allowed by your ISP, let me know if you could run some test to confirm it's not related to the ISP blocking the SMB connectionJuliettejulina
@AdamSmith-MSFT I've tried on three different ISPs, and no connection. Have you ever seen this work?Hake
A
13

I got it working with azure provided connection example.

mount_smbfs -d 777 -f 777 //user:key@storageurl/folder ~/mountfolder

Folder in file share needed after url and mountfolder must exist.

But the main reason for "No route to host" was because the access key had forward slash in it! I did a rebuild of key1 until I got a key without forward slash.

BUT! Be aware, rebuilding key will kill all mounts and connections to that storageaccount.

Auctorial answered 17/10, 2019 at 7:34 Comment(4)
The above worked for me. Mount folder must exist and folder/share name after storage url.Australorp
I had the same problem with the forward slash in the key... I wonder how you escape this? 🤔Mcmillan
You need to urlencode the password. For me, it was replacing the forward slashes with %2f.Baldridge
same error! Worked with a different password that did NOT have a # (pound sign) at the end of the password! This had nothing to do with azure, just a Windows file share. When trying with a different password (and user) it worked. Wild.Fondness
M
4

Came across this issue myself today. Do double check that your ISP does not block SMB port 445. In my case, AT&T does actually block this port. I found this in their guide http://about.att.com/sites/broadband/network

The solution for me was to connect with a VPN which I'm already hosting on Azure. Additionally as others have mentioned in this thread, escape any / with %2f. Also, add the share name in the connection URL. For example, if your share name is my-data then the connection URL should contain xxx.file.core.windows.net/my-data.

This is omitted for some reason in the Azure docs/UI and was required for successful connection on OSX.

Merriott answered 15/11, 2020 at 18:18 Comment(2)
Thanks for '/' escape hint!Liponis
THIS. I figured this out independently, but wished I had seen this earlier. Many networks (Comcast, the Microsoft corporate network) block 445 traffic. What I found does work is using my T-Mobile iPhone tethered to my computer for testing this code path in my lib. Setting up a VPN is a lot more of a pain, but I'll have to automate that in the future as well. Thanks!Phares
W
4

"mount(2) system call failed no route to host "

  • while mounting azure file share on linux vm we can have this error. In my case One package was missing which is - cifs-utils So, I have used below command "sudo yum install cifs-utils -y" to resolv the issue.
Windbag answered 28/7, 2022 at 11:55 Comment(0)
H
2

It was the "/" after all. I had to regenerate the key over ten times till I get a key that doesn't have the "/" character and then it worked fine through the terminal.

Hearse answered 6/8, 2020 at 3:29 Comment(1)
good catch. I had to regenerate the keys as well to get a key without a /. and with that one it finally worked.Buzzard
J
1

It should work using the following syntax:

mount_smbfs //<storage-account-name>@<storage-account-name>.file.core.windows.net/<share-name> <desired-mount-point>

Without adding the permissions.

Via Finder:

enter image description here

Source can be found here

Juliettejulina answered 23/8, 2018 at 21:39 Comment(1)
Hey, I have tried both through Finder and Terminal, and am still not able to connect. mount_smbfs //[email protected]/dolphin-recognition /Users/b3020111/Azure mount_smbfs: server connection failed: Operation timed outJp
P
0

Important to allow port 445 (TCP) to smb communication. If you don't access it, your firewall block it! Please enable it and try it again.

Pronounced answered 27/1, 2020 at 10:7 Comment(0)
B
0

I ran into this same problem, and while I was never able to get it working through the terminal I did manage to get it resolved in finder.

Essentially the same instructions as @Adam Smith-MSFT, however one key difference.

I created a directory via Azure's web interface, and after that I was able to connect by adding /<directory-name> to the connection string. Without a directory this would not work at all.

Bethune answered 21/2, 2020 at 6:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.