[Linux] smb: File not found error, but plays from file manager
#1
Sad 
Before I post a log of this strange error, let me explain what's happening and how I set up this installation of XBMC.

Whenever I reboot, didn't use XBMC for quite some time or resume from suspend, I'm unable to play files from my library. XBMC just tells me: File not found, do you want to remove it from the library (Yes|No).
When I go to the file manager, open the share (which is a smb share on a NAS), maybe play some file from there (they all work fine) and then go back to the library: Everything plays perfectly.

This is how I set everything up: I took my database files (*.db) from a Windows machine, which has all the paths saved using the NAS' hostname. I then put these files on my brand new Linux (XBMC Live) installation. Before that I added the sources to sources.xml:

Code:
<sources>
    <programs>
        <default pathversion="1"></default>
    </programs>
    <video>
        <default pathversion="1"></default>
        <source>
            <name>smb://NAS/FTP/Filme/</name>
            <path pathversion="1">smb://USER:PASS@NAS/FTP/Filme/</path>
        </source>
        <source>
            <name>smb://NAS/FTP/Serien/</name>
            <path pathversion="1">smb://USER:PASS@NAS/FTP/Serien/</path>
        </source>
    </video>
    <music>
        <default pathversion="1"></default>
        <source>
            <name>Music</name>
            <path pathversion="1">/home/xbmc/Music/</path>
        </source>
    </music>
    <pictures>
        <default pathversion="1"></default>
        <source>
            <name>Pictures</name>
            <path pathversion="1">/home/xbmc/Pictures/</path>
        </source>
    </pictures>
    <files>
        <default pathversion="1"></default>
        <source>
            <name>smb://NAS/</name>
            <path pathversion="1">smb://USER:PASS@NAS/</path>
        </source>
    </files>
</sources>

But as Linux doesn't like windows hostnames, I added the following to /etc/hosts:
Code:
192.168.0.2     NAS.homenetwork         NAS

Then I copied the database files, as explained above. Everything's perfect. The paths are correct, the library has all the data I want, even thumbnails and the thumbnail cache work. It just doesn't play the files like I want it to.

I hope that's enough explanation for now. If you need anything else to get a better picture, just tell me and I'll post back with more info.

This is what I did for the following debug log to be created: Start XBMC, go to "Movies" and try to play one file from the library. Then I got that "file not found, do you want to remove it?" message and that's the end of the log.
http://pastebin.com/mmgvRvMR


edit1:
And here comes an interesting fact that I just came to think about now: I'm using 'xbmc' as a username on my NAS, but a different password then the one I used for the account 'xbmc' on XBMC Live. Could that be a problem?
Here's one line (of a few repeating lines per try) of my NAS' connection log.
Code:
Date             Time             Users  Source IP      Computer name     Connection type     Accessed resources     Action
2011-08-24    15:31:08    xbmc    192.168.0.3      xbmclive             SAMBA             ---                          Login Fail


edit2:
I just took a look into MyVideos34.db, table 'path'. I saw that every folder is saved with a complete path in there! As the database comes from windows, the username and password are NOT part of these paths. Example:
Code:
smb://NAS/FTP/Filme/
Could this be the problem? Would I have to complete the paths to contain username and password? I somehow find that very stupid - what if I want to change the password or username?

edit3:
Ok, made a few more tests. Added another subdirectory with a movie in it in the above path to check if XBMC adds the username and password to the path in myvideos34.db. But it doesn't.
Also changed the password of the XBMC Live user 'xbmc' to the same password used on my NAS. Didn't help either. I would love to make my NAS tell me what password it uses when all those "login failed" messages appear...

Then I modified sources.xml:
Code:
<source>
            <name>smb://NAS/FTP/Filme/</name>
            <path pathversion="1">smb://USERNUMBERTWO:PASS@NAS/FTP/Filme/</path>
        </source>
I would have expected to see "USERNUMBERTWO" appear in my NAS' error log when trying to play a movie from the library. But guess what: It's still the user 'xbmc'. When I make the above change for the <file> section of sources.xml, it tries that user when entering the file manager.
What's going on here? How is XBMC trying to login to my NAS?

Could really need some input from you guys...
Reply
#2
I am officially at the end of my means :-)
Maybe someone could tell me how the path value looks in their MyVideos34.db? That's the only thing I can think of that could be the culprit - as the DB comes from Windows.

Or I might just use smbmount...
Reply
#3
After hours and hours I finally found the problem. The sources.xml file doesn't have to contain the passwords, neither does mediasources.xml.
passwords.xml is doing exactly that: Converting URLs without username and password in them to URLs WITH username and password in them.

Quite undocumented and I've never seen that file on my Windows machine.
Reply

Logout Mark Read Team Forum Stats Members Help
[Linux] smb: File not found error, but plays from file manager0