PI2-OSMC-Kodi-MySql - Problem With retreiving information for Kodi User interfac
#1
I'm stumped on this, even after looking at several pages of a search in this forum about MySql and came back without answers, I'm beginning to think that something is broke.

Details:
New Raspbery Pi 2, 8GB microsd, 16GB thumb drive 2.5 power supply
Installed with latest OSMC & Kodi (all updates applied)
MySql is installed on a separate system and is in use for several databases by other systems on my local network.

I've been using Raspberry Pis' (1s and 2s) XMBC and Kodi for a long time.

Movie and TV files (about 4.5 TB) are on 16TB FreeNAS in a single NFS share in 4 directories below the share.

The share is tested and I can see it from all systems on my local network and can access the share on the Pi after creating a "Network Location" and then creating a source for each of the 4 sub-directories. I can access the videos and play them, or update the files from any device on the network.

I was already aware that I could put an advancedsettings.xml file in the /.kodi/userdata folder and use a MySql database to share the database to all of my devices. I figured that would be the smartest way to re-create it on my new Pi2s. My old Pis' on the network are all using an older version of Kodi and I didn't want to mix versions especially when trying to use a MySql database. I went with creating a new database on a different server so that I had a clear migration path without confusion. Since I wanted to keep my old data as well I exported the data (many files to each folder) for re-import into the new database.

I started the re-scan on the movies directory and could see the progress on the Kodi screen I could also see the records being added to the database as well as the interface traffic on the NAS as Kodi was getting data. It all looked happy. My initial optimism was short lived when I attempted to look in Movies Recently Added and got nothing but a menu (that I shouldn't have gotten) no movies just a menu that looped back to its self from any pick. It didn't improve when I looked in the Kodi Movies interface and saw nothing except that same menu. I allowed the scan to complete in the hopes that it would then show me the movies it had scanned but no joy. The movies all exist in the database and appear to have gotten the exported information but do not show in the Movies interfaces.

Did this same behavior exist for TV Shows? Why yes. Yes it does. I thought that perhaps this was just Movies that were having problems so I scanned/imported the TV Shows from the same share different sub-directory expecting to see something different and was able to prove that Einstein was correct that "Expecting different results from the same tests is insanity" (to paraphrase). I did notice some where in here that it doesn't seem to be remembering the folder contents settings as it has to be set/reset each time its tried.

I decided that I must have done something wrong and opened the Videos>Files the NFS share and then on into the movies directory and was able to play one of the movies that it had made a record for in the database but would not show me in the user interface. Still thinking something wasn't right potentially with my setup (permissions maybe) I wiped the microsd and the thumb drive dropped the databases and did it all again. Still wrong, during the times I was waiting for the import I googled and read lots of bug repports and other problems posted about MySql without finding this issue.

Thinking that perhaps it was just me or my setup I tested by wiping the microsd and thumb drive again and then installing without adding the advancedsettings.xml. I allowed it to create the local (default) database. WooHoo! It did scan and add the movies to the local database it shows them in the Kodi user interface almost immediately. It did not get the watched marks from the .nfo files created by the export.

At different points in this excercise in futility (for me) I have tried other themes to see if the same problem persists and it does. I have tried it with and without assorted add-ons and most everything I can think of. The end result for me was that nothing mattered except for the use of the MySql Database, advancedsettings.xml and "Network Location" to connect to the NFS share.

A summary of my delima: I want to use a MySql database to share watched marks and such. The end run would be to connect 4 additional Pi 2s to the network (replacing the older Pis' I have now) and use the same sources from my NAS and the data from the MYSql database on all. This does not appear to work properly on Kodi using the network location and share/sources from my NAS even though the paths to the files appear to be correct in the database after scanning/import. It does work using the local database from a single Kodi installation. Is there another procedure I should be trying, or something I sound like I'm doing wrong?

I expect that the problem is a difference in the handling of the paths (especially when using Network Locations) between the Kodi interface and the scan/import process.

If there are tests I can perform or files I can provide I will do that but scanning in the shares/sources again to answer a question is very time consuming.
Reply
#2
You should start by providing a debug log http://kodi.wiki/view/Log_file/Easy
Reply
#3
(2016-01-10, 23:37)asavah Wrote: You should start by providing a debug log http://kodi.wiki/view/Log_file/Easy

Interesting suggestion considering the problem. A log for which side of the problem. Where it works or where it doesn't considering that a log of a single side of the problem doesn't seem to tell enough of the story. Since only one side of that story (log wise) can't possibly explain why it works when the default database is in use locally and doesn't when a MySql database is in use.

Being that the problem exists when advancedsettings.xml is in place and the database is created and and everything else appears to be working other than Kodi isn't reading the data that it has already written it actually seems that it isn't a very useful task.
Reply
#4
http://kodi.wiki/view/Forum_rules
2.3.6
Quote from one of the developers:
"No debug log - no problem"

Stop trying to be a smart ass and provide a debug log from non-working installation.
Reply
#5
This document will help you provide all the information needed to identify what's up:

https://osmc.tv/wiki/general/how-to-subm...rt-request
Reply
#6
(2016-01-11, 00:39)asavah Wrote: http://kodi.wiki/view/Forum_rules
2.3.6
Quote from one of the developers:
"No debug log - no problem"

Stop trying to be a smart ass and provide a debug log from non-working installation.

Funny you would point me at that when on the same page at 2.3.6 it clearly says:

Quote:When posting a problem you are encouraged to post a debug log from when the problem occurred. When posting a log or other lengthy code in the forum, please use a paste site, as described in the debug log wiki page. Do not post log snippets on the forum, if you want to point out a specific part refer to the line number.

and a bit later:
Quote:3 ADVICE: How do I ask a question in a smart way?

How to ask questions in a smart way?:
When you ask:
Use meaningful, specific subject headers on posts.
Be explicit about your question.
Be precise and informative about your problem.
Include screenshots to aid in problem description.
Describe the problem's symptoms, not your guesses.
Describe your problem's symptoms in chronological order
Describe the goal, not the step.
Don't ask people to reply by private e-mail or private message.
Courtesy never hurts, and sometimes helps.
Follow up with a brief note on the solution if you find one

I sincerely question what you are saying for the good reason that it doesn't make a lot of sense. I'd like to say that I don't appreciate your curt passive aggressive manner, I've been sincere and provided what I actually believe is reasonable considering the situation.

If you would like contribute something useful and you believe that a log/logs or whatever else would be useful could you explain why and which case I honestly asked about a couple posts ago. I do not understand how or what would help here because of the nature of this problem. Please don't point me to references to objects that aren't particularly useful.
Reply
#7
What would be useful:

Clear your library (back it up if you want to).
Put your mysql advancedsettings.xml file back in userdata.
Enable debug logging.
Restart.
Set content on a source and scan it.
Try to access the movie library.
Upload log to xbmclogs, pastebin or similar and post a link here.

Edit: The above would be useful because it would have info on the scan, and info on accessing the library.
Even if it shows nothing at all - that would be useful because things can be eliminated.
Reply
#8
(2016-01-11, 01:13)trogggy Wrote: What would be useful:

Clear your library (back it up if you want to).
Put your mysql advancedsettings.xml file back in userdata.
Enable debug logging.
Restart.
Set content on a source and scan it.
Try to access the movie library.
Upload log to xbmclogs, pastebin or similar and post a link here.

Edit: The above would be useful because it would have info on the scan, and info on accessing the library.
Even if it shows nothing at all - that would be useful because things can be eliminated.

Thanks will do.
Reply
#9
Re-imaged and reinstalled OSMC on Pi2 dropped databases on MySql server.
Reinstalled and updated to all current versions for OSMC and all Kodi updates.
Put advancedsettings.xml in /.kodi/userdata
System Settings > Debugging: Enabled debug logging
Rebooted system
Videos>Files>Add videos...
Add Video Source > Browse
Add network Location (nfs 192.168.23.177 mnt/tank/video)
selected location and then selected movies from directory list in share
ok to add source then set options to (Movies) Movies are in seperated folders that match movie title.
Answered "yes" to prompt "Do you want to refresh information for all items within this path?"
Verified that databases were created on MySql server and entries are being made in the tables as movies are scanned.
Network interface for NAS shows activity from the ip address of this Kodi
Click back out to main area of interface and clicked on the entry for "Movies" taked to a menu offering "Movies", Recently Added Movies, Files, Playlists and Video add-ons
selecting Movies from this menu brings up a menu offering Genres, Title, Year, Actors, Directors, Studios, Countries, Tags
clicking on any of these entries does nothing and takes me nowhere
back out one level and clicking on Recently added movies gets me a dialog for Remote share that says "Couldn't connect to network server" ( I do wonder what network server it is talking about because the scanning continues with connectivity to the NAS interface and new records being added to the MySql database for the movies as it scans them.
scanned the movies directory of the share
stopped the scan after about 1200 movies
clicked to My OSMC and clicked to upload logs Logs: /home/osmc/.kodi/temp/kodi.log

posted as much as the pastbin would allow to http://paste.osmc.io/enivoyohox.xml

If you really want to see the entire log I'll be happy to zip it up and mail it to someone the clipped portion of the log is just more of the same adding more movies.
Reply
#10
The media is shared from 192.168.23.177 while the MySQL server is on ~.150? Is this correct? Yes, all logs from MyOSMC log uploader would be more helpful. We don't need it zipped because no one will download it to view it one time. MyOSMC log uploader neatly provides a paste type link for you to provide to us.

Also, same error from another user http://forum.kodi.tv/showthread.php?tid=123266
Reply
#11
(2016-01-11, 05:28)ActionA Wrote: The media is shared from 192.168.23.177 while the MySQL server is on ~.150? Is this correct? Yes, all logs from MyOSMC log uploader would be more helpful. We don't need it zipped because no one will download it to view it one time. MyOSMC log uploader neatly provides a paste type link for you to provide to us.

Also, same error from another user http://forum.kodi.tv/showthread.php?tid=123266

Yes, The share on the NAS is at 192.168.23.177 and the MySql Server is at 192.168.23.150. The Pi2 I'm running OSMC/Kodi on is at 192.168.23.176.

When I clicked on the log uploader all I saw was this: Logs: /home/osmc/.kodi/temp/kodi.log. Where can I find or get this link and I'll give it another go. Its huge.

Honestly nothing after what you got that isn't much the same as what is in the pastbin just another 1200 or so other movies being added nothing new to see, just lots of lines of kodi doing the same thing over and over again. Let know how to get it sent to you and it will happen.

I read your link it does seem to be similar but it is about smb and/or windows and this is an NFS share being used in basically a Linux environment and it ain't the same I believe.

Edit: Adding to my comments, The share is not a local share. If it doesn't work using MySql then why would it work using the default database?
Reply
#12
Frankly I think we have enough log of scraping, here are a couple more things to look at:

1. Check via mysql client thhat there is data in the database. Sounds like you probably know how to do that. If not I can give some details.

2. With debbuging on,restart kodi,, try to open the library, then post a log of that.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#13
(2016-01-11, 07:31)nickr Wrote: Frankly I think we have enough log of scraping, here are a couple more things to look at:

1. Check via mysql client thhat there is data in the database. Sounds like you probably know how to do that. If not I can give some details.

2. With debbuging on,restart kodi,, try to open the library, then post a log of that.

Yes, the database has lots of tables and within them lots of records. All total the scan of around 1200 movies created about 21MB of database. I'm sure that I could create a smaller test set of movies in the same share (maybe 20 movies representative of the rest of the library) and run again send an exported .csv.

2. Got a link to that uploaded log: http://paste.osmc.io/eqapofaguk

I'm thinking I didn't get one before because the files were so big (30.4 MB). Let me know if y'all need something else Smile
Reply
#14
Looking thru your log files there are many "SQL: The table does not exist" mainly around the "views"

1. Which mysql version your are using?
2. Does kodi/kodi has full rights on the mysql server?

These are the tables you would need in the Videodatabase
actor
actor_link
art
bookmark
country
country_link
director_link
episode
episode_view
files
genre
genre_link
movie
movie_view
movielinktvshow
musicvideo
musicvideo_view
path
season_view
seasons
sets
settings
stacktimes
streamdetails
studio
studio_link
tag
tag_link
tvshow
tvshow_view
tvshowcounts
tvshowlinkpath
version
writer_link
Reply
#15
In an effort to encapsulate the events for this problem in a single log I created a new directory (testmovies) in the same share on the NAS (192.168.23.177) containing 12 folders totaling 25 movies.

On the database server I dropped the existing databases in order to provide as clean and simple a reqult as possible.

The import should result in just 25 movies being scanned vs the complete Movies directories on the NAS and be much faster while providing a significantly smaller log while providing a representitave sample of all of my movies.

For the Pi2 I followed the process I've used previously and created a fresh system then applied all updates via Updates>Manual Updates in MyOSMC. Then Rebooted.

SSHed in to the Pi2 and Created advancedsettings.xml in /.kodi/userdata
System Settings > Debugging: Enabled debug logging
Rebooted system
Videos>Files>Add videos...
Add Video Source > Browse
Add network Location (nfs 192.168.23.177 mnt/tank/video)
Selected the Network location and then selected the new "testmovies directory" (mentioned above) from the directory list in share
clicked "Ok" to add source then set options to (Movies) Movies are in seperated folders that match movie title.
Answered "yes" to prompt "Do you want to refresh information for all items within this path?"
Verified that databases were created on MySql server and entries are being made in the tables as movies are scanned. In database MyVideos93 28 tables created, 2134 records total databas size at 1.8MiB
Network interface for NAS shows activity from the ip address of this Kodi

Scan completed and backed out to main interface clicked Movies no entries except more menu items offering "Movies", Recently Added Movies, Files, Playlists and Video add-ons.
Selecting Movies from this menu brings up another menu offering Genres, Title, Year, Actors, Directors, Studios, Countries, Tags. selecting Movies from this menu brings up a menu offering Genres, Title, Year, Actors, Directors, Studios, Countries, Tags. Clicking on any of these entries does Nothing.

backed out and went to MyOSMC and clicked on Log UPdater and Submitted all configs and logs to: http://paste.osmc.io/uzomobeqah

Verified that address was valid and that a log was present at that address by opening it. I hope that this is useful in determining the problem and resolution.
Reply

Logout Mark Read Team Forum Stats Members Help
PI2-OSMC-Kodi-MySql - Problem With retreiving information for Kodi User interfac0