OSMC not able to find files on smb share

Hello,

I have a setup of OSMC running on a RPi 3 with a shared database with kodi running on my windows maschine. Both have sources defined for a smb share (running on my TrueNAS if that matters).
I used to have the shares and the mysql server on another windows maschine, but this one is very outdated. On the old setup it worked without problems, but on the new one I can only play videos when on my windows kodi.
I changed the SQL server in advancedsettings.xml and changed the shares in OSMC gui. I can also navigate in the files tab and even start video files there (they play just fine). But in the library mode for movies or tv shows when I want to start it says ‘file not found, delete it from library?’
Is there a known problem like this or has anyone a suggestion how to find the reason for that behaviour?

Thanks in advance,
Anduril

Are you sure both the machines are able to use the same file path? If you bring up the information window of a library item and hover over the “refresh” option what file path is displayed?

yes I am sure both use the same path. I don’t know what ‘refresh’ you mean. I use the Amber skin and there is a path information beneath genre, author and so on. Both show ‘SMB://FREENAS/DATEN/…’.

Well starting point would be to upload logs.

1 Like

well I hope I found the needed logfile. If there is any other that might contain usefull output, please let me know.
This is of /home/osmc/.kodi/temp/kodi.log:

2021-01-30 01:29:10.076 T:1388298464   ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://FreeNAS/Daten/Filme/Serien/Gilmore%20Girls/Staffel%205'
                                            unix_err:'d' error : 'Permission denied'
2021-01-30 01:29:10.076 T:1388298464   ERROR: GetDirectory - Error getting smb://FreeNAS/Daten/Filme/Serien/Gilmore Girls/Staffel 5/
2021-01-30 01:29:11.155 T:1388298464   ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://FreeNAS/Daten/Filme/Serien/Gilmore%20Girls/Staffel%205'
                                            unix_err:'d' error : 'Permission denied'
2021-01-30 01:29:11.156 T:1388298464   ERROR: GetDirectory - Error getting smb://FreeNAS/Daten/Filme/Serien/Gilmore Girls/Staffel 5/
2021-01-30 01:29:12.220 T:1388298464   ERROR: CVideoPlayer::OpenInputStream - error opening [smb://FreeNAS/Daten/Filme/Serien/Gilmore Girls/Staffel 5/gg-s05e15.avi]
2021-01-30 01:29:12.220 T:1388298464  NOTICE: CVideoPlayer::OnExit()
2021-01-30 01:29:12.681 T:1915786160 WARNING: CSettingsManager: unable to read value of setting "language"
2021-01-30 01:29:12.681 T:1915786160 WARNING: CAddonSettings[metadata.tvshows.themoviedb.org]: failed to load value "de" for setting language
2021-01-30 01:29:12.689 T:1915786160 WARNING: CSettingsManager: unable to read value of setting "language"
2021-01-30 01:29:12.689 T:1915786160 WARNING: CAddonSettings[metadata.tvshows.themoviedb.org]: failed to load value "de" for setting language
2021-01-30 01:29:12.812 T:1915786160  NOTICE: CVideoPlayer::CloseFile()
2021-01-30 01:29:12.836 T:1915786160  NOTICE: VideoPlayer: waiting for threads to exit
2021-01-30 01:29:12.836 T:1915786160  NOTICE: VideoPlayer: finished waiting
2021-01-30 01:30:50.534 T:1915786160  NOTICE: Samba is idle. Closing the remaining connections
2021-01-30 13:17:09.666 T:1756299488   ERROR: CRepository: http://download.osmc.tv/kodi/addons/leia/addons.xml.gz index has wrong digest 4219eb3ccf76e898364f7f9063a883a906e631e2e1c0ab610aaa448b4a17e048, expected: fb2f84e6ebe79e58b1f43d9d9e69dfb242d8b502e848f8994faaa2e8a3bda5d7
2021-01-31 13:57:47.817 T:1915786160  NOTICE: VideoPlayer::OpenFile: smb://Freenas/Daten/Filme/Serien/Gilmore Girls/Staffel 5/gg-s05e15.avi
2021-01-31 13:57:47.820 T:1492902112  NOTICE: Creating InputStream
2021-01-31 13:57:49.945 T:1492902112  NOTICE: Creating Demuxer
2021-01-31 13:57:53.745 T:1492902112  NOTICE: Opening stream: 0 source: 256
2021-01-31 13:57:53.745 T:1492902112  NOTICE: Creating video codec with codec id: 12
2021-01-31 13:57:53.762 T:1492902112  NOTICE: Creating video thread
2021-01-31 13:57:53.762 T:1756299488  NOTICE: running thread: video_thread
2021-01-31 13:57:53.764 T:1492902112  NOTICE: Opening stream: 1 source: 256
2021-01-31 13:57:53.764 T:1492902112  NOTICE: Finding audio codec for: 86017
2021-01-31 13:57:53.764 T:1492902112  NOTICE: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder mp3float
2021-01-31 13:57:53.765 T:1492902112  NOTICE: Creating audio thread
2021-01-31 13:57:53.766 T:1337966816  NOTICE: running thread: CVideoPlayerAudio::Process()
2021-01-31 13:57:53.767 T:1337966816  NOTICE: Creating audio stream (codec id: 86017, channels: 2, sample rate: 48000, no pass-through)

It says permission denied, but later it plays that video…

Full logs uploaded via My OSMC would have been a lot more helpful but the “Permission denied” shown above tells me that the first step would be for you to look at ~/.kodi/userdata/passwords.xml and make sure that it has working credentials for that share. If this is working on another Kodi box you can use its passwords.xml for reference (or just copy it over to this machine).

https://paste.osmc.tv/sukoreqase
I uploaded the logs as asked for. I found a line in the kodi.log part where it says
2021-02-01 19:32:08.172 T:1539219680 ERROR: Load - Unable to load: special://profile/passwords.xml, Line 21
but I don’t know why…
Here is also the .kodi/userdata/passwords.xml (without user:password of course)

<passwords>
    <path>
        <from pathversion="1">smb://Freenas/Daten</from>
        <to pathversion="1">smb://USER:PASSWORD@Freenas/Daten/</to>
    </path>
    <path>
        <from pathversion="1">smb://Freenas/Daten/Filme/allgemein</from>
        <to pathversion="1">smb://USER:PASSWORD@Freenas/Daten/Filme/allgemein<$
    </path>
    <path>
        <from pathversion="1">smb://Freenas/Daten/Filme/Serien</from>
        <to pathversion="1">smb://USER:PASSWORD@Freenas/Daten/Filme/Serien<$
    </path>
    <path>
        <from pathversion="1">smb://Freenas/Daten/Filme/M  rchen/Neuverfilmungen</from>
        <to pathversion="1">smb://USER:PASSWORD@Freenas/Daten/Filme/M  rchen/Neuverfilmungen$
    </path>
</passwords>

Thanks in advance for any kind of help

I was also just wondering about the message of the old mysql version. I think this can safely be ignored, as it is a remnant of my old setup. Up to know I only ported the video db to my new mariadb, the music db is still on my old pc with the old mysql version. This will be shut down when the new on works fine.
Also in addition: the entry IP, USER and PASSWORD are values changed by me before upload, as the log uploader did not sanitized all passwords.

The next line in the log says:

Error reading end tag.

It might be a copy/paste problem but for each <to pathversion="1"> tag there needs to be a </to> end tag, so these lines are incorrectly missing the end tags:

<to pathversion="1">smb://USER:PASSWORD@Freenas/Daten/Filme/allgemein<$
...
<to pathversion="1">smb://USER:PASSWORD@Freenas/Daten/Filme/Serien<$
...
<to pathversion="1">smb://USER:PASSWORD@Freenas/Daten/Filme/M  rchen/Neuverfilmungen$

What you posted is only 18 lines so I would recommend you take a look at line 21. I think if Kodi find any error in an xml file it doesn’t load the entire file so just one error in that file would break all credentials on Kodi paths.

Hey darwindesign,

you were right. There was a copy/paste typo with missing tags in the passwords.xml. I fixed this, but still it does not work. I reuploaded the logfiles https://paste.osmc.tv/ibagiruceb
I don’t see any problems with the passwords.xml file any more, but also no other problem catching my eye…

You could try I settings>services>SMB client> and enable the “Mitigate MTU issues with SMBv2” option
As it seems connection is falling back to SMB2

1 Like

If the mitigate MTU suggestion doesn’t do it turn on debug logging and try to play something. In the log you should see a notice about opening a file like

smb://machine/path/name.ext

and then you should see a second where it is inserting the credentials such as

smb://USERNAME:PASSWORD@machine/path/name.ext

which should confirm if that file is actually inserting credentials for the path your using.

I don’t find the option ‘Mitigate MTU issues with SMBv2’ anywhere… I can only select the min and max SMB version to be used.
Also with the logs I’m still struggeling. I can’t get them to show entries for smb when starting playback.
I see 2021-02-03 21:03:50.737 T:1916494768 DEBUG: OnClick called on 'videodb://inprogresstvshows/211/-2/10124?season=-2&tvshowid=211' but file doesn't exist (10124 beeing the database ID of the episode), but nothing smb near that line. Playing the file later through videos–>files logged this: 2021-02-03 21:35:06.612 T:1916494768 NOTICE: VideoPlayer::OpenFile: smb://Freenas/Daten/Filme/Serien/Navy CIS/Staffel 16/Navy.CIS.S16E03.Abgelehnt /navy.cis.s15e03.mkv without any error near that line…

May need to enable expert level in Settings - System

Sorry, the Mitigate MTU option is only relevant to the Vero and your using a RPi. If your not seeing the credentials getting added with debug logging then there is probably still something wrong with your passwords.xml even if it isn’t throwing an error. I would suggest to either take a very hard look at the file (you can use this how-to for reference on what that file is doing), ditch your current one on this machine and replace it either with making a new network path in Kodi or just copying that file from your working machine (it doesn’t matter if it is on another platform), or else you would have to give us a pastebin of the exact file that had only the credentials replaced and no other edits so we could have a shot at spotting the issue.

Generally speaking it doesn’t take much of a mistake to break an XML file in Kodi. For example I was having an issue with a keymap I was working on the other day and it took me a half hour before I figured out it wasn’t working because I had accidently inserted two spaces instead of one between a key id and its modifier, and that was enough to make it not work.

well I kind of circumvented it. I tried a fresh install and it seems to work. I added the password in the gui and I can use the media database without problems. Only thing is that I have to redo all my settings, but that’s only a matter of time…

1 Like