Kodi v19 crashing when using MariaDB

  • Hello I have two issues when trying to switch to MariaDB


    First here is my config


    First issue:

    When I switch the advancedsettings as expected my library is empty, also the content of my libraries is set to None and I have to set them again.

    Is from scenario:

    1. Kodi boots up

    2. Navigate to settings -> Media -> Videos -> Library 1 -> Set Content -> Movies -> OK


    Expected Result:

    The media library content to be set and to be indexed


    Observed:

    Media library content is not set, its None again, basically nothing happens, no scan, nothing


    Log: Logs while setting library content - Pastebin.com


    Second Issue:

    When switched the advanced settings without setting library content i try to open any movie and Kodi crashes

    1. Kodi boots up

    2. Navigate to -> Settings -> Media -> Videos -> Library Movies -> Open movie folder -> Select MKV file -> Kodi crashes to reboot


    Expected:
    Movie to play


    Observed:

    Kodi reboots


    Log: 2021-04-08 21:27:27.609 T:993 DEBUG <general>: Open - probing detected forma - Pastebin.com



    Any help or does someone observe this behavior as well ?


    System - Raspberry Pi 4 - 4GB


    EDIT: If i revert to original advancedsettings.xml, everything goes back to normal.

    • Official Post

    The first order of business will be you providing us the FULL and unmodified kodi.log file, and not just the parts that you find interesting. So far nothing reflects problems with the usage of MariaDB.


    Also remove the cache settings in the advancedsettings.xml file for now. They should be totally unnecessary in a local network.

  • Here is the full log from today, for obvious stupid reason i have lost the one from last night. Only change I have made is to swap the kodi user with the DB root one just to amuse myself with a desperate try, but made no change.

    Logs old - Pastebin.com



    About the caching, I will remove it just for the test. I need it, because I have a VPN tunnel to NAS and the internet connection is not the best everywhere, so I do the caching if I leave the player on, to download some portion of the media while I am doing something else.



    To provide additional info, the MariaDB is on Docker container on my docker-host machine, I have tested it and I have connection from another device on the same VLAN as Kodi. I personally exclude the network connectivity issue.


    Also tried to create manually 'videodb119' as I saw the logs it could not found it, but that also did not solve the issue.

    Logs from that try: Kodi.log - Pastebin.com

    Edited 2 times, last by departy ().

    • Official Post

    Logs from that try

    Okay, a full log is good news. Too bad there is also bad news.


    As per Kodi and LibreELEC forum rules, support is halted because you have several repos/add-ons installed which facilitate video piracy. This is not welcome here in whatever shape or form. You can find the problem entries here, colored in orange in this link: hastebin


    Clean up the Kodi setup, and try again. Also, debugging needs to be enabled in Kodi for a more detailed log file. Once enabled, restart LibreELEC so debug info can be gathered from the start.

  • No problem will remove them, they not being used anyway. And will post the logs again in debug mode ? Would that suffice to get some help on my problem ?

  • If i leave it with local database, it works, but as soon as I try to switch to MariaDB it starts hiccupping(cannot play video even local to SD card and cannot set movie library)

    hastebin - xoradenomo (kodi.tv) Log from when I play local video while having setup maria DB, it reboots at the end of the file

    If i set it to local DB instead, everything works perfectly

    • Official Post

    I just don't get it. A database, SQLite or MySQL/MariaDB should not interfere in one way or another. It normally only retrieves data before the video plays. Perhaps streamdetails are updated as well if there are changes detected. After a video ends, then data is written into the database (watched status and playcount), which is trivial.


    So whatever your Docker setup is doing, you may want to check the MariaDB log file and see what it is up to. Especially when things go fine when a local database is active.

  • Hello,


    Im using a MariaDB and LibreElec 10 setup and I did not have any issue at all.


    Before Switching to MariaDB, you can "Export" your mediatech. Then, you start fresh using a fresh installation and mariadb. After , you may re-import the previous Export and it will rebuild the mediatech.

  • EDIT: fixed!!!! i changed docker from bridge network to host network. also, in advancedsettings I had mysql server specified as 127.0.0.1 and now i have it as 192.168....lan ip of the kodi machine. Dunno which of the two did it, but it works now. hope it helps someone..


    Hi,

    I have exactly the same issue.

    I tried several times with a new docker from scratch, tried mariaDB and mySQL dockers, both give same results. Kodi crashes when trying to play any (local disk of file share) video.

    On top of that, I see in the kodi logs that he complains some query fails. That query actually fails in mysql console as well, so I guess kodi is sending unsupported queries to the DB.


    SQL
    SELECT albumview.*, albumartistview.* FROM albumview JOIN albumartistview ON albumview.idAlbum = albumartistview.idAlbum WHERE albumartistview.idAlbum in (SELECT albumview.idAlbum FROM albumview WHERE albumview.strAlbum != '' AND albumview.iTimesPlayed>0 ORDER BY albumview.iTimesPlayed DESC LIMIT 100) ORDER BY albumview.iTimesPlayed DESC, albumartistview.iOrder


    It seems mysql does not support "LIMIT" in certain subqueries.


    Code
    2022-08-09 19:57:34.680 T:40883   ERROR <general>: SQL: [MyMusic82] Undefined MySQL error: Code (1235)
                                                       Query: SELECT albumview.*, albumartistview.* FROM albumview JOIN albumartistview ON albumview.idAlbum = albumartistview.idAlbum WHERE albumartistview.idAlbum in (SELECT albumview.idAlbum FROM albumview WHERE albumview.strAlbum != '' AND albumview.iTimesPlayed>0 ORDER BY albumview.iTimesPlayed DESC LIMIT 100) ORDER BY albumview.iTimesPlayed DESC, albumartistview.iOrder
    
    2022-08-09 19:57:34.680 T:40883   ERROR <general>: GetTop100Albums failed
    2022-08-09 19:57:34.681 T:40883   ERROR <general>: GetDirectory - Error getting musicdb://top100/albums/


    but as I was saying, my main issue is kodi crashing when using mysql or mariadb, and working great when advancedsettings.xml is renamed.

    was thinking of trying to run the docker somewhere else (currently running on libreelec machine itself) but I don't see a reason why this would not work as I see people using it...

    Edited once, last by vanja ().