Kodi Community Forum

Full Version: Cannot access Samba share with min protocol set to SMB3
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I am having trouble getting Kodi to access an SMB share on another Raspberry Pi. The server Pi has min protocol set to SMB3. WHen I try to connect from Kodi, it comes up with a box headed "error" with the text "connection timed out". How can I get Kodi to speak SMB3?
What is the reason for not to set the minimum to SMB2 and the maximum to SMB3?
(2018-06-22, 09:36)DaVu Wrote: [ -> ]What is the reason for not to set the minimum to SMB2 and the maximum to SMB3?
Because I want to force the protocol to version 3. It inter-operates fine with Windows 10, and I can also use smbclient on linux to connect to it as long as I force it to SMB3. Kodi seems to be the only thing that doesn't work.
which OS/distro and Kodi version are you using?
I'm using the version of Kodi from the default (i.e. "official") Raspbian repository - archive.raspberrypi.org on Raspbian. The OS and Kodi are kept fully up-to-date using apt-get update && apt-get upgrade. I loaded LibreELEC on a spare Pi and it works fine, just not the Raspbian-bundled version of Kodi for some reason.
Which OS and samba version are you running on the server? And no log, no problem.
Log here: http://paste.kodi.tv/berazesafo

The relevant line from the log is:

Code:
23:26:17.523 T:1695748864 ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://USER: PASSWORD@livingroom/pie-disk' unix_err:'6e' error : 'Connection timed out'

(Space inserted betweek USER: and PASSWORD to stop forum software inserting an emoji).

It comes up with the "connection timed out" error immediately when I try to connect to the samba server, so it is obviously a bogus error.
Yeah that error is pretty much generic, it can be many things, I suspect a hostname/name resolution problem. How did you tried to connect to the server ?
Try this way: https://forum.kodi.tv/showthread.php?tid...pid2711070
Or add your server to /etc/hosts from your Kodi client.
It's not a name resolution problem - I have tried using the IP address of the samba server as well with the same result. I have also tried on OpenELEC where I can connect to the samba server fine. The problem is in the Raspbian-bundled version of Kodi, or how it uses the relevant samba libraries.
I doubt that, I am the guy who packages Kodi available on archive.raspberrypi.org. The smbclient version which Kodi is compiled against is the latest one available on Raspbian Stretch, 4.5.12.
And I don't have any issue connecting my Raspberries running Kodi on Raspbian Stretch to samba servers running on Raspbian Stretch, Windows 10 and Ubuntu 16.04. Also Android devices on the same network works fine. On Linux machines I use a pretty basic smb.conf configuration, no need to specify SMB version.
I think your problem is in your Raspbian Stretch Pi and/or on your Pi samba server, which you still didn't said which OS is running and samba version.
Also, after checking your Kodi log again, I noticed that you have set only 76MB for the GPU mem, the minimum for Kodi is 160MB and the recommended for the Pi 2 and 3 is 256MB. That can cause a lot of problems. Take a look at this also:
https://www.raspberrypi.org/forums/viewt...6&t=192499
(2018-06-22, 05:05)andrum99 Wrote: [ -> ]I am having trouble getting Kodi to access an SMB share on another Raspberry Pi. The server Pi has min protocol set to SMB3. WHen I try to connect from Kodi, it comes up with a box headed "error" with the text "connection timed out". How can I get Kodi to speak SMB3?

Sounds like you haven't configured Kodi to use "Minimum protocol version" and "Maximum protocol version" to SMB3.

By default the 4.5.2 Samba client libraries provided by Raspbian will only speak SMB1 (and nothing else) unless told to use something higher than SMB1. Yes, it's a brain dead policy, but this is Samba. Fortunately it does get a little better with Samba 4.8.x.

In Kodi, go to Settings > Services > SMB client (you will need to change the settings level to Advanced or higher to access the SMB client option).

Set both Max/Min protocol version to SMB3. Reboot.
(2018-06-25, 02:53)Milhouse Wrote: [ -> ]
(2018-06-22, 05:05)andrum99 Wrote: [ -> ]I am having trouble getting Kodi to access an SMB share on another Raspberry Pi. The server Pi has min protocol set to SMB3. WHen I try to connect from Kodi, it comes up with a box headed "error" with the text "connection timed out". How can I get Kodi to speak SMB3?

Sounds like you haven't configured Kodi to use "Minimum protocol version" and "Maximum protocol version" to SMB3.

By default the 4.5.2 Samba client libraries provided by Raspbian will only speak SMB1 (and nothing else) unless told to use something higher than SMB1. Yes, it's a brain dead policy, but this is Samba. Fortunately it does get a little better with Samba 4.8.x.

In Kodi, go to Settings > Services > SMB client (you will need to change the settings level to Advanced or higher to access the SMB client option).

Set both Max/Min protocol version to SMB3. Reboot. 
 Oh well... after reading posts #2 and #3, I thought OP had already done that and still wasn't working...
(2018-06-25, 02:53)Milhouse Wrote: [ -> ]
(2018-06-22, 05:05)andrum99 Wrote: [ -> ]I am having trouble getting Kodi to access an SMB share on another Raspberry Pi. The server Pi has min protocol set to SMB3. WHen I try to connect from Kodi, it comes up with a box headed "error" with the text "connection timed out". How can I get Kodi to speak SMB3?

Sounds like you haven't configured Kodi to use "Minimum protocol version" and "Maximum protocol version" to SMB3.

By default the 4.5.2 Samba client libraries provided by Raspbian will only speak SMB1 (and nothing else) unless told to use something higher than SMB1. Yes, it's a brain dead policy, but this is Samba. Fortunately it does get a little better with Samba 4.8.x.

In Kodi, go to Settings > Services > SMB client (you will need to change the settings level to Advanced or higher to access the SMB client option).

Set both Max/Min protocol version to SMB3. Reboot. 
 On Raspbian there isn't that option, but on Ubuntu 16.04 there is and samba is a lower version (4.3.11). Is there any patch which is not on Kodi github for that option to become available?
(2018-06-25, 02:53)Milhouse Wrote: [ -> ]
(2018-06-22, 05:05)andrum99 Wrote: [ -> ]I am having trouble getting Kodi to access an SMB share on another Raspberry Pi. The server Pi has min protocol set to SMB3. WHen I try to connect from Kodi, it comes up with a box headed "error" with the text "connection timed out". How can I get Kodi to speak SMB3?

Sounds like you haven't configured Kodi to use "Minimum protocol version" and "Maximum protocol version" to SMB3.

By default the 4.5.2 Samba client libraries provided by Raspbian will only speak SMB1 (and nothing else) unless told to use something higher than SMB1. Yes, it's a brain dead policy, but this is Samba. Fortunately it does get a little better with Samba 4.8.x.

In Kodi, go to Settings > Services > SMB client (you will need to change the settings level to Advanced or higher to access the SMB client option).

Set both Max/Min protocol version to SMB3. Reboot.     
That is indeed brain dead. On my system, the only option under SMB client is to set the address of the WINS server. I did manage to specify the min/max protocol version by adding these options to ./kodi/.smb/user.conf, after finding https://ioblogblog.wordpress.com/2017/06...t-century/. The contents of my ~/.kodi/.smb/user.conf file being:

Code:
[global]
client min protocol = SMB2
client max protocol = SMB3
server min protocol = SMB2
I checked that file previously on LibreELEC (I said OpenELEC in my previous post - it was actually LibreELEC) to see what the difference between it and my non-working system was, and found no such setting. I'm guessing LibreELEC includes a newer version of the samba client libraries that enables the newer protocols by default. Thank you for your help.
Pages: 1 2