Samba shares problem with LibreELEC (Krypton) v7.90.008 [WORKAROUND]

  • Hi.
    As this user: LibreELEC I have the same problem on my Odroid C2 device.

    I'm using/testing LibreELEC (Krypton) v7.90.008 ALPHA on Odroid C2.
    I can access to my QNAP NAS via SMB (Samba), I was able to create the Library and seen some videos, BUT after the reboot I cannot more access to all SMB share.... Error is: "Error 2: share not available" (on Debug log the error is: unix_err:'6e' error : 'Connection timed out').
    I tried to reboot again but stil have this problem. If I try to access to others SMB source the problem is always "Error 2: share not available"...

    I found a workaroud: change the WORGROUP to another name and then reset it to WORGROUP.

    Hope in a fix.
    Thanks.

    Edited once, last by outcave (December 5, 2016 at 2:14 PM).

  • Hi.
    Yes sorry for multiple post bur sometime it's not "easy" to choose well where to address the request on the Forum.
    Anyway here the log.

    This is the DEBUG log:

    Many thanks, hope in a fix.
    Thanks!

    Edited once, last by outcave (November 6, 2016 at 9:54 AM).


  • Please post the FULL log not the bits you think are important, there is other information we want/need to see. Also use the OS log paste function so we don't have to scroll stuff in forum posts.

    Hi.
    That was the full log from the starts of LibreELEC (boot) to when the problems was notice (I mean starts to play a mkv from the SMB share).

    Here: YfX7XxnW the FULL log (cat kodi.log).


    Another workaroud: if I change the Skin from the default one (Estuary) to "Confluence" the problem disappears and then I'm able to play files/movies from the same SMB share (also after reboots)! So it seem as problem somehow related to the skin used... I would like to use "Estuary" but with this samba problem I'm "forced" to use Confluence.
    Thanks.

    Edited once, last by outcave (November 7, 2016 at 1:08 PM).

  • Hi.
    chewitt did you have time to give a look at this Samba problem?
    It seem that I'm not the only one person to face this problem, here other two users that have the same problem: LibreELEC and LibreELEC

    Consider that I faced the problem since a fresh LibreELEC (Krypton) v7.90.008 installation. I don't know if this problem depend on the software release (LibreELEC v7.90.008) or depend on the system (Odroid C-2).
    On the LibreELEC v7.90.008 release notes I read "Update Samba configuration to improve performance and interoperability", may be there is fault here.

    Let me know how can I help you to address the problem.
    Thanks, hope in a fix.

  • Changes we made in 008 to update the samba (server) configuration have nothing to do with SMB (client) usage by Kodi. The "unix_err: 6" errors are seen on all variants of Linux running most versions of Kodi in recent years (Google and you'll find a ton of references in Kodi forums) so I honestly have no idea what the issue is but if I'm guessing; it's a combination of the getting-dated SMB implementation in Kodi and the utter protocol stupidity that is Windows networking. Turn everything off, turn things back on slowly starting with whatever box is trying to be the NAS.

  • mm...
    as I already mentioned the strange is that with Confluence skin Samba works, with Estuary skin not... I don't know how the skin can "change" the working of LibreELEC. The problems are not on the NAS (let me say, it's a "stupid" Samba Server on Linux), with the same NAS and same NAS configuration with OpenELEC 6.0.3 and LibreELEC 7.0.2 I don't have any problems.
      
    Is it possible to access to Samba (client) log to do more troubleshooting?

    Edited once, last by outcave (November 9, 2016 at 3:13 PM).

  • Ok Ok... I found the issue and the solution (or better to say: the workaround)!
    The problem is the name resolution... LibreELEC will connect to the Samba (SMB) share via the hostname (beacuse I added the Samba share via the GUI and the hostname was presented to me), "NAS" in my case: smb://NAS/Multimedia/Film/HD/Cartoon/testmovie.1080p.x264.mkv.
    So I have edited the file "/storage/.config/hosts.conf" with the IP and hostname (same as "/etc/hosts" file):

    Now the access to the Samba shares is always OK and really more fast!

    I leave to Kodi and LibreELEC team the "work" to understand:

    1. Why with the Skin "Confluence" this problem is not faced
    2. Why with the oldest version of LibreELEC this problem there was not

    Anyway, I expect and I hope, that the access to Samba shares will be guaranteed also via hostname without any action needed by the user into the /etc/hosts file (as it should be)...

    Thanks.

    Edited once, last by outcave (November 18, 2016 at 7:48 AM).

  • I have updated my raspberry with libreelec 7.90 krypton and experience the same issue. However, I cannot follow the solution presented above. Could someone be so kind to present a dummy-explanation to me? For clarity reasons, I only run a raspberry pi, no nas server or anything.


  • I have updated my raspberry with libreelec 7.90 krypton and experience the same issue. However, I cannot follow the solution presented above. Could someone be so kind to present a dummy-explanation to me? For clarity reasons, I only run a raspberry pi, no nas server or anything.


    If you don't use a NAS or anything why do you need SMB shares?

  • It might well be related to this change.

    I wrongly assumed in the past that Kodi didn't use Samba for SMB, but it seems it does use libsmbclient. Kodi might be trying to look up the name through the hosts file and fail instead of trying bcast next like it should logically.

    Someone with this issue should try to copy /etc/samba/smb.conf to /storage/.config/samba.conf and edit

    Code
    name resolve order = host bcast wins

    To this:

    Code
    name resolve order = bcast host wins

    Then restart Kodi.

    Probably a better default anyway since most users won't edit their hosts file.

    Oh and I wonder if this means an upgrade to Samba would automatically let Kodi use SMB2/3.

    Edited once, last by escalade (November 17, 2016 at 11:25 AM).


  • Oh and I wonder if this means an upgrade to Samba would automatically let Kodi use SMB2/3.

    That would be very welcome as it seems Kodi is having other issues with SMB1 and I can't disable SMB1 on my server to see if it helps because it's currently unsupported.

  • outcave

    Nobody confirmed it yet, it's simply a theory although since you say it started in .008 it might be correct. If you can do the test I suggested and report back I'll create a PR to change it once you have confirmed. Might be in time for the next alpha.

  • I'm not 100% sure, but ISTR there are two problems:

    a) Kodi has dependencies on samba 3.x and they need to bump to 4.x before we can use it
    b) Samba changed its compile process between 3.x and 4.x and it became a challenge to cross-compile

    I believe someone gave up on B as there was no point until A happened, but that was some time ago. I'm not sure anything changed though.