Smb only works after logging through SSH

Yep, I’m a bit puzzled about it. I’ve a shared folder in a Windows 10 machine. If I reboot OSMC and i try to access the shared folder it says: ‘No route to host’. However, if I go to my Windows 10 machine, I open a SSH session, then I close it and I retry the connection it works. wtf? Maybe it isn’t related to OSMC, but could someone know what’s going on with this?

Thanks, best regards.

Well without logs and also more details how you access your SMB shares, not really

Sounds like a firewall or networking issue. Do the OSMC device (Pi, Vero, …?) and the Windows 10 machine get told their IP, DNS, and gateway by a DHCP?

Did you specify a host name or an IP in /etc/fstab? Or do you do use userland-based mounting?

If you’re unsure about answering, please upload a log.

Well, the log doesn’t throw much info:


08:07:59.165 T:1706029824 WARNING: CSkinInfo: failed to load skin settings
08:08:03.726 T:1664086784 ERROR: SMBDirectory->GetDirectory: Unable to open di rectory : ‘smb://USERNAME:PASSWORD@192.168.1.185/’ unix_err:‘71’ error : ‘No route to h ost’
08:08:05.297 T:1926277632 ERROR: GetDirectory - Error getting smb://USERNAME:P ASSWORD@192.168.1.185/
08:08:05.297 T:1926277632 ERROR: CGUIDialogFileBrowser::GetDirectory(smb://USE RNAME:PASSWORD@192.168.1.185/) failed
08:09:03.318 T:1767895808 ERROR: OnTvStandby - Unexpected [standby_pc_on_tv_st andby] setting value

The smb URL I use, as you can see, is with the complete local IP of the PC. Both windows and Raspberry Pi have been setup with an static IP address.

Well A full logs including dmesg and journal would most likely tell us more.
Alternatively you might want to try autofs instead of the build in smb client

I’ve just found out that just pinging from my windows PC to OSMC is also a valid workarroud :open_mouth: