Uknown Error Occurred (1 Viewer)

shackrock

Portal Pro
December 27, 2008
291
12
Raleigh, NC
Home Country
United States of America United States of America
Using the latest MP install... everything worked fine a few days ago, today I tried to turn on a TV channel and I get the "An Unknown Error Occurred" message. error.log is attached... it looks like the DB was messed up somehow? Is there any way to repair or anything??

I also noticed that WebEPG is failing as well. The guide says "no data available."

Thanks.
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hello shackrock

    Looks like your database has crashed.
    You can repair it from the command line.
    1. On W7 or Vista click start, type cmd and press enter/return. On XP click start, then click run, type cmd and press enter/return.
    2. Use the cd (change directory) command to navigate to your MySQL install folder bin directory. For a database installed by MP, type:
    cd "C:\Program Files\MySQL\MySQL Server 5.1\bin"
    or cd "C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin"

    ... then press enter/return.
    3. Type mysqlcheck mptvdb --auto-repair -e -u root -p and press enter. You should be prompted for a password. The default is MediaPortal (***case sensitive***).
    4. Restart the TV service using the manual control section of TV Server configuration or the Windows service manager.
    5. All good!

    mm
     

    shackrock

    Portal Pro
    December 27, 2008
    291
    12
    Raleigh, NC
    Home Country
    United States of America United States of America
    Worked like a charm, I'll save this for next time... just a few follow up questions for you though:

    1. Does this happen often?
    2. What could have caused this?
    3. How does MySQL know what was corrupt, and how does it fix it?
    4. Did I lose anything? Would I ever lose anything in this case?
    5. I noticed it said "XXX Marked as Crashed" after running the MySQL command. If MP was smart enough to mark the table as crashed, why doesn't it just do this for me? haha. Just thought I'd ask... maybe this can be added into a future release.
    Thanks!
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    1. Does this happen often?
    2. What could have caused this?
    3. How does MySQL know what was corrupt, and how does it fix it?
    It only happens to MySQL databases.
    Without getting too technical, the issue is due to the fact that the MySQL table engine that we use (MyISAM) doesn't support transactions. Effectively, it can't handle doing multiple updates at once. Do a google for mysql myisam crash and you'll come up with plenty of info if you want to know more.
    http://dba.stackexchange.com/questions/15075/why-do-mysql-tables-crash-how-do-i-prevent-it

    [edit: the MP designers of yesteryear chose MyISAM because it is supposedly faster than other MySQL table engines. I don't know if that can be proved. If you want to avoid this in future, use a Microsoft SQL Server DB. The express version is free. You could also try updating to a more recent version of MySQL.]

    Did I lose anything? Would I ever lose anything in this case?
    Technically I'm not sure. In this case and in 90% of the cases I see, the Program table (which is the table that holds EPG data) is the table that crashes. Obviously EPG data is usually replaceable.

    I noticed it said "XXX Marked as Crashed" after running the MySQL command. If MP was smart enough to mark the table as crashed, why doesn't it just do this for me? haha. Just thought I'd ask... maybe this can be added into a future release.
    It is not MP that is marking the table as crashed - it is MySQL.
    MP does not have this insight. MP tries to do business as usual and finds that things that normally work don't, and so we spit out errors into the log file.
    Technically there is a 3rd party layer between MP and the database, and if anything it would be that layer that would need to detect and report the problems.

    mm
     
    Last edited:

    Users who are viewing this thread

    Top Bottom