Kodi Community Forum

Full Version: Issue getting XBMCBuntu to play media files on windows share (using mysql sync)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey everyone,
I have 3 xbmc boxes (2 live boxes and 1 windows) all streaming media from a Windows Home Server. I am also sync'ing my media to the xbmc boxes through mysql, which is also installed on the home server. Sync'ing works fine. My master library is from the windows box since that was what i was configuring first, and i can play all media just fine from that box. The Live boxes all contact the SQL server and update their libraries correctly. They sync any updates from the windows box fine (such as watched items), and i can even update watched items from the context menu on each movie or TV show from the live boxes (so it is communicating fine with the SQL server), but when i actually try and PLAY any media from the live boxes, it simply says that the media no longer exists and asks if i want to remove it from the library.
When i check the log file, the paths for all the media is correct, its looking in the right place, but i do get permission denied errors in there. I setup the shares on the live boxes and i can navigate them fine, but when i navigate manually, i believe it uses the username of "guest" (blank password), which i don't know if its using when i try to watch the file.
Not sure if this is relevant information, but this is basically just all the information i have at the moment. If something else would help then let me know.
I guess i'm just not sure if i can define a username of "guest" if i'm getting the library info from the SQL server. Also, would i even NEED to since i have the correct shares setup in XBMC anyways and i manually navigate just fine.
This is pretty much my last hurdle before its all working exactly as i wanted. Sad
Viewing content and syncing the databases are two separate things that do not depend on each other at all. That said, you need to set up a user on your WHS box that reflects the XBMC clients trying to access content, and give those accounts the correct permissions. The share(s) user is not the same as the MySQL user.
But there are no users. the user "everyone" has read/write access. And i am aware they don't depend on each other, but it does show that the live box is able to communicate both read and write to the mysql database, even tho they are different users.
And from what i understand from the media sync, there is no username and password that is involved in setting up the sync other than what is needed for the database, unless it tries to use THAT username and password to login to the file server as well, which is not documented.
I can also connect to the windows media shares by setting up the share on the live boxes and navigating to them manually. No username and password is necessary on any of the boxes to connect manually. I can even stream from the "files" section by navigating to the folder on the media server. Its just when i try to play the media through the media library that i get the error.
Stop worrying about the database and your "media sync". It has nothing to do with your problem at hand. You're conflating issues and making things worse. Your central MySQL database works across clients, great. The db users and r/w abilities have absolutely nothing to do with your network shares.

You need to troubleshoot your shares that contain the media. That's where the problem is. You need to find out why you're having permissions errors when your Linux XBMC installs try to play something. Start there and forget about the db.
I'm not worried about the DB. Its doing its thing. The only reason i bring it up is cause the library pulls its info from the DB. Including the path to where the media is. The issue is this, when i navigate to the folders manually, it uses the path smb://[email protected]/video/movies/<etc>, which works.
The information it gets from the DB is smb://xxx.xxx.xxx.xxx/video/movies/<etc>, which gives a permissions error.
I have tried to turn on anonymous login, but either windows home server doesn't like that or it just hasn't turned on properly. What i need to know is where i can edit the path for the videos that it pulls from the mysql db so that it uses the "guest" username.
So creating a user and assigning it the proper permissions isn't the issue, the issue is getting the library to USE a username in the first place.
FFS, then stop talking about the db, they have nothing to do with one another. XBMC's library is getting a (library) path, not a username/password combo, from the db, but it (XBMC) still needs to use it's sources.xml entry to actually access the content. That's where you need to be concentrating not with the library db.

Have your read any documentation about accessing WHS shares anonymously or without a set password from a non-Windows OS? If not, why not? If not, when are you going to? Concentrate on the problem at hand and stop looking down blind paths. As I said before, you need to concentrate on why you're getting the permissions error in the first place. You keep wanting to address the symptoms and not the problem. How did you set your video sources up in XBMC? Did you supply a username when setting them up? Have you set them up? The library is not sources.xml. Your sources need to be correct for viewing of content to work.
you know what i love? the patience and how helpful you've been. truly, your unending patience is an inspiration.
And yes. I have read documentation. People have been having similar issues with anonymous login, it doesn't like it. I had it setup in windows server 2008 but i don't have another copy of that after a server crash so i went with windows home server 2011 since it was all i really needed. Guest login is supposed to work when you define its permissions as full control (which was done).
And yes, i did check the sources.xml file. It has the proper username. As evidenced by the fact that i can navigate to it manually with the source i setup as i said earlier. Its the library itself is NOT using that path. Now if you say the library is SUPPOSED to using the username from the sources.xml file then you're either wrong or xbmc isn't doing what its supposed to.
All a central db based library does is push the meta ijnfo for the files to XBMC it does not play the content. XBMC uses sources.xml to access the content. The library plays no part in this. Your underlying issue is that of XBMC not being able to access your content. You need to figure out why and forget about the library is or is not doing.

Put it this way, the library just gives XBMC the nfo information, the thumbnails and some other meta data about the file. XBMC displays that information when in Library mode. When you click on an entry in the library, XBMC then navigates to the source it has stored in sources.xml and plays that information. Are the sources set up identically on all your clients? They need to be. The path statements as well as any username and password information needs to be the same on every source. If you disable the networked library entry in advancedsettings.xml and let your Linux client build a library locally, does it work? You need to do some troubleshooting and forget about the network db right now.
Ok, thank you for that.
Now, you said forget about the network DB, but please bear with me in my thought process. You mentioned that it gets nfo info, the thumbnails (which i don't think is the case since the xbmc wiki tells you that you need to use path substitution or symbolic links to point your other xbmc machines to the thumbnails folder on the master XBMC machine), and other meta data about the file. But i just checked the XBMC box (a windows machine that was able to login without the username since it was part of the server's homegroup) that was used to BUILD the database in the first place, and its sources.xml file has the path for these as "smb://xxx.xxx.xxx.xxx/video/<etc>". This is the path that shows up in the log file on the live box when i get permission denied errors.
Does the database get populated with the file path from the xbmc machine that populates the database? This would logically be the entire reason for my issue. It would also mean that the library on the live box is getting this info ONLY from the database and not from the sources that are setup, which also makes sense to me as the library gets populated with media info whether or not you have any sources setup.
I corrected the sources.xml file on the windows box, but do i need to completely blow away the database and then start again in order for it to update properly?
Yes, the machine that builds the database builds the path, which is why the sources.xml files on all the clients need to be the same.

Yes, the live box is getting its information solely from the networked db, that's the entire point. And again, why the sources.xml files need to match.

In your case, I'd make sure that all clients can first access content from your WHS, then build a local library db on your Linux box, then make sure their sources.xml entries are identical, then blow away and recreate the network db. You need to start at the access level and move up, not the other way around.

Yes, you need path substitution or symbolic links for the thumbnails to be on the network db, but that's not really relevant.
Thanks,
I knew it would work if i allowed the live box to build its own local library. So i blew the database away on the sql server and then rebuilt from the windows machine, removing the old sources and making sure i add them again with all the proper info. It worked. Just needs a few hours to rebuilt the database now. Thanks for the help.
And no, the thumbnail stuff was not really relevant. Just pointing out my experience. I'm just saying that it doesn't get the thumbnail itself from the database, it gets it directly from the master xbmc machine that you build the database on.
Regardless, thanks for the help. At least now we can stop passive aggressively insulting each other over a forum thread. Wink
I wasn't being passive aggressive. If I wanted to insult you I would openly, it's much more fun. Tongue

That said, glad you got it working. As with most things, start with the basics, then work your way up.