Library Database Update Error
#1
Hello,

I upgraded from Jarvis Alpha3 to Jarvis Beta1, and my library seems to have disappeared. I have my library setup on my NAS, since I have several PCs running Kodi accessing it. I scanned through the log and see things like: "Error updating database xbmc_video99 from version 97 to 99". The rest of the log is at http://xbmclogs.com/p9u1pz4rm.

I followed a tutorial on how to setup a remote library database several years ago, don't actually know a lot about SQL or how it works. Any help would be appreciated!
Reply
#2
There may have been an error in the db conversion. No biggie.


Open your MySQL command line client

Use:
Show Databases; (note the colon)

Then (only on the new databases)
Drop database kodi_videoXX; (note colon, and XX is the database from the appropriate version)

(and music if needed)


Do NOT drop the previous version database.

Restart kodi. The new databases will access the previous version and convert. Should have you sorted without incident.
I really have no idea what I am talking about. Proceed with caution. I confuse easily. And drink. A lot.
Reply
#3
Thanks for your help, but the same thing happens each time I drop kodi_video99. Not sure if this matters, but I have six different video databases, all xbmc_videoXX. Might have to nuke the library and start from scratch. I had an old NAS die on me a few weeks ago, my home entertainment system is falling apart!
Reply
#4
Those old db's are probably from previous Installation's:
http://kodi.wiki/view/Database_versions

What version MySQL? If you upgraded to 5.7 there are some issues between Kodi and that version.

Your logs are missing, I went to go look through them. Can you repost?
I really have no idea what I am talking about. Proceed with caution. I confuse easily. And drink. A lot.
Reply
#5
Can you enable debug logging, quit Kodi, drop column "name" in the seasons table in xbmc_video97 and retry?
Drop newer databases (98, 99).
A debug log is only needed if the upgrade still fails.
Reply
#6
*edit - I posted this before I read your post, menakite - so this is not a debug log.

Weird, thought I left it set for two weeks. Here are the latest logs with the same errors: http://xbmclogs.com/pc6bjzvlh

I set this SQL stuff so long ago now, that I don't really recall what version everything was. Myphpadmin portal tells me the database server is MariaDB 5.5.44. Web Server is mysqlnd 5.0.11-dev-20120503-$ld. That sounds old.
Reply
#7
Here is debug log: http://xbmclogs.com/pf3sskhkt

There was no column "name" in seasons. Only idSeason, idShow, season.

I dropped kodi_video99, turned on debug mode, and this time when I started Kodi, it froze. Had to kill the process. Checked and now there's a kodi_video99 database. I left the kodi_video99 there, started Kodi a second time and this time it didn't freeze. Grabbed the logs from that just in case: http://xbmclogs.com/pherjod51

Thanks for the help!
Reply
#8
Maybe its me: The page you are looking for does not exist.

So flying blind:

Froze? I have seen cases where the DB conversion takes a tad bit of time. Somtimes you just have to let it brew.

You will be able to tell if it worked or not - if you can set content on your video sources. If the content doesn't stay - bad DB.
I really have no idea what I am talking about. Proceed with caution. I confuse easily. And drink. A lot.
Reply
#9
K I can see them now. weird.

Anyways, nothing new. Try and drop 98/99 again, and restart. let it roll. I assume that 97 worked for you just fine so you should be OK unless its like tomorrow and its still stuck.

Another suggestion - if it won't kill you to lose 97, do you have a 93 or 94 database?

Also, if you have problems dropping 98 (i.e. database doesn't exist) I found this for another user:
http://stackoverflow.com/questions/31229...e-database
I really have no idea what I am talking about. Proceed with caution. I confuse easily. And drink. A lot.
Reply
#10
@Redwingsfansfc there's a dot at the of the URLs you need to remove.

@MongarEric according to your debug log, Kodi was infact updating the DB when you killed it. Unfortunately there's no fancy progress bar/whatever (yet?) so it may look like it's sitting here doing nothing.

May I suggest you:
* enable debug logging;
* quit Kodi;
* drop xbmc_video98 and xbmc_video99, if they exist;
* drop "name" from "seasons" in xbmc_video97;
* drop "idSeason" from "episode" in xbmc_video97;
* restart Kodi. It may take a while to upgrade the DB.
Once the GUI shows up, if the library is empty then upload the new debug log.
Reply
#11
Thanks guys! Got it working.

I think I know what happened. I added a new harddrive to my NAS, so it was in the lengthy process of expanding the volume. While that process runs, reading and writing to the discs is painfully slow. I didn't realize that the Jarvis beta was going to update the database, so when Kodi sat at the logo screen for 15-20 minutes, I just thought it froze. It doesn't help that task manager says Kodi was "Not Responding". The next time I started it, the unfinished and probably corrupt database was there, so Kodi started and just didn't load any library. When I deleted the corrupt library and Kodi "froze" again to try to build it, I just assumed it was stuck again so I kept killing the process. Eventually it dawned on me that my NAS was slowing things down. Waited for the expansion to finish, then let Kodi build the new database. Who would have thought it takes a while to build a database with several terabytes worth of videos?
Reply
#12
Awesome to hear. Glad you got it sorted!
I really have no idea what I am talking about. Proceed with caution. I confuse easily. And drink. A lot.
Reply

Logout Mark Read Team Forum Stats Members Help
Library Database Update Error0