MP TV Service broken - "/TvControl" (1 Viewer)

Blue Lightning

Portal Member
October 8, 2011
49
52
Home Country
Antarctica Antarctica
Problem: TV Service broken. No stopping, no starting.
Solution: See below for fixing the database. It fixed my TV Service.
 
Last edited:

Wbunaarf

Portal Pro
December 9, 2005
534
103
Sweden
Home Country
Sweden Sweden
Hi,

I don't know if this is the only problem, but your SQL database seems to be corrupt:

Code:
2012-02-19 17:28:01.311652 [scheduler thread(10)]: scheduler: SchedulerWorker inner exception Error: StatementErrorUnclassified
Gentle.Common.GentleException: select idProgram, idChannel, startTime, endTime, title, description, genre, state, originalAirDate, seriesNum, episodeNum, episodePart, episodeName, starRating, classification, parentalRating from Program where title = ?title and startTime <= ?startTime and endTime > ?endTime; ---> MySql.Data.MySqlClient.MySqlException: Table 'program' is marked as crashed and should be repaired
  at MySql.Data.MySqlClient.MySqlStream.OpenPacket()
  at MySql.Data.MySqlClient.NativeDriver.FetchDataRow(Int32 statementId, Int32 pageSize, Int32 columns)
  at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
  at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
  at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
  at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
  at Gentle.Framework.SqlStatement.Execute(IDbConnection conn, IDbTransaction tr)
  --- End of inner exception stack trace ---
  at Gentle.Framework.SqlStatement.Execute(IDbConnection conn, IDbTransaction tr)
  at Gentle.Framework.PersistenceBroker.Execute(SqlStatement stmt, IDbConnection dbConnection, IDbTransaction dbTransaction)
  at Gentle.Framework.SqlStatement.Execute()
  at TvDatabase.Program.RetrieveCurrentRunningByTitle(String title, Int32 preRec, Int32 postRec)
  at TvService.Scheduler.IsTimeToRecordEveryTimeOnEveryChannel(Schedule schedule)
  at TvService.Scheduler.IsTimeToRecord(Schedule schedule, DateTime currentTime, RecordingDetail& newRecording)
  at TvService.Scheduler.StartAnyDueRecordings()
  at TvService.Scheduler.DoScheduleWork()
  at TvService.Scheduler.SchedulerWorker()MySql.Data.MySqlClient.MySqlException: Table 'program' is marked as crashed and should be repaired
  at MySql.Data.MySqlClient.MySqlStream.OpenPacket()
  at MySql.Data.MySqlClient.NativeDriver.FetchDataRow(Int32 statementId, Int32 pageSize, Int32 columns)
  at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
  at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
  at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
  at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
  at Gentle.Framework.SqlStatement.Execute(IDbConnection conn, IDbTransaction tr)


To quote mm1352000:


To fix that, open up a command prompt, navigate to the MySQL Bin folder (C:\Program Files\MySQL\MySQL Server 5.1\bin for me) and run the command:

Code:
mysqlcheck --user=root --pass=MediaPortal --auto-repair MPTVDB

//W
 

RobNorthcott

MP Donator
  • Premium Supporter
  • October 9, 2007
    540
    102
    Dartmoor, England
    Home Country
    United Kingdom United Kingdom
    In case you didn't know, you'll have to stop the TVServer service first, otherwise that auto-repair will fail on some files.
    You need to run these commands (can be set up as a batch file for next time it happens)
    Code:
    net stop tvservice
    c:
    cd \program files\mysql\mysql server 5.1\bin
    mysqlcheck mptvdb --auto-repair -e -u root --password=MediaPortal
    net start tvservice

    Rob
     

    Users who are viewing this thread

    Similar threads

    Reading through your code, I can see it's more than a couple steps above my paygrade. :cry:
    Reading through your code, I can see it's more than a couple steps above my paygrade. :cry:
    I used to run the TVService under the "NT Service\TVService" account to follow least privileges principal (not exposing my whole...
    Replies
    3
    Views
    2K
    I am following the official documentation for setting up the Kodi plugin in media portal. I have got no issues with media portal, nor media portal plugin on Kodi, but with the Kodi plugin that must be installed in the media portal, as it is not getting detected. I have made a copy of the dll file into the plugins folder as found in my...
    I am following the official documentation for setting up the Kodi plugin in media portal. I have got no issues with media portal...
    I am following the official documentation for setting up the Kodi plugin in media portal. I have got no issues with media portal...
    Replies
    0
    Views
    262
    Greetings to all Denizens of the land of MediaPortal... It seems our Zap2XML/GraceNote access is broken again. I (as many others) have been using the latest NewZap2xml_6 and it has worked flawlessly. A few days ago it all died. I wonder if anyone is working a solution to save the masses. I am hoping the good citizen of past is...
    Greetings to all Denizens of the land of MediaPortal... It seems our Zap2XML/GraceNote access is broken again. I (as many others)...
    Greetings to all Denizens of the land of MediaPortal... It seems our Zap2XML/GraceNote access is broken again. I (as many others)...
    Replies
    0
    Views
    1K
    I noticed there's an updated Visual C++ Runtime (14.50.35710), maybe try to reinstall the runtimes? That's what fixed the issue when I tried 1.38.1
    I noticed there's an updated Visual C++ Runtime (14.50.35710), maybe try to reinstall the runtimes? That's what fixed the issue...
    I just updated from 1.37 to 1.38. MediaPortal 1.38 exits abruptly when stopping video playback. I did three tests; Debug with...
    Replies
    38
    Views
    11K
    maybe setting loglevel to debug might pinpoint the difference between normal and stuck? Preferable with as much disabled as possible also try to see if anything is happening during stuck for the mediaportal process(resource monitor, disk activity, cpu usage, anything) maybe other programs competing for resouces?
    maybe setting loglevel to debug might pinpoint the difference between normal and stuck? Preferable with as much disabled as...
    Since over a year my MP sometimes stucks while showing the welcome screen. It started once a week now it happens every second time...
    Replies
    4
    Views
    2K
    Top Bottom