Random error connecting to remote MySQL server at boot (1 Viewer)

klara31

Portal Member
March 28, 2009
43
1
Home Country
Netherlands Netherlands
I am using a remote MySQL server as database server. Up to MP version 1.4, I never had problems connecting to the TvService during boot, but since 1.5 I do.

After boot, every now and then MP throws an error stating that the TvService cannot be found. Checking in Services, I can confirm that the service indeed isn't started. When starting manually (start service), the TvService comes alive and MP is working.

The log in C:\ProgramData\Team MediaPortal\MediaPortal TV Server\log\TVService-Error.txt shows the following error:
[2013-10-07 19:09:31,772] [Log ] [4 ] [ERROR] - applyProcessPriority: exception is bij Gentle.Common.Check.FailWith(Severity severity, Error error, Exception e, String msg)
bij Gentle.Common.Check.Fail(Exception e, Error error, Object[] args)
bij Gentle.Provider.MySQL.MySQLAnalyzer.Analyze(String tableName)
bij Gentle.Framework.GentleAnalyzer.UpdateObjectMap(ObjectMap map)
bij Gentle.Framework.ObjectFactory.ConstructMap(PersistenceBroker broker, Type type)
bij Gentle.Framework.ObjectFactory.GetMap(PersistenceBroker broker, Type type)
bij Gentle.Framework.SqlBuilder..ctor(IGentleProvider provider, StatementType stmtType, Type type, LogicalOperator logicalOperator)
bij Gentle.Framework.SqlBuilder..ctor(StatementType stmtType, Type type)
bij TvDatabase.TvBusinessLayer.GetSetting(String tagName, String defaultValue)
bij TvService.Service1.applyProcessPriority()
 

mm1352000

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

    This error is coming from deep in the bowels of the database framework. I've looked at the code but to be completely honest I have no idea what is going on or what the error really means.

    Do you remember if you installed/configured the database yourself?
    Can you confirm that the TVService Windows service has a dependency on the MySQL5 service?

    mm
     

    klara31

    Portal Member
    March 28, 2009
    43
    1
    Home Country
    Netherlands Netherlands
    MySQL is running on a Linux server. The TvService therefore has NO MySQL dependency as MySQL is NOT running on the windows machine. I have reverted back to 1.4 again, as this became quite annoying... I do not recall 1.4 (or definitely earlier versions) having this problem.

    This issue only occurs when (re)booting. To me, it looks like the TvService starts before the network is fully operational. The TvService windows service has only the RPC dependency. I tried adding lanmanserver and lanmanworkstation, but this did not solve my problem.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    MySQL is running on a Linux server.
    Are you using a static IP address on the Windows server? Normally having the dependency on MySQL (which also requires network access) should make the TV service work smoothly. Obviously your situation is different... and I can't explain why upgrading from 1.4 to 1.5 would change anything.

    I have reverted back to 1.4 again, as this became quite annoying... I do not recall 1.4 (or definitely earlier versions) having this problem.
    And has the problem gone away, or too early to tell?

    This issue only occurs when (re)booting. To me, it looks like the TvService starts before the network is fully operational. The TvService windows service has only the RPC dependency. I tried adding lanmanserver and lanmanworkstation, but this did not solve my problem.
    I don't know what the lanman* services are, but you could try adding dependency on the Server service. According to this:
    http://stackoverflow.com/questions/10855290/which-windows-service-ensures-network-connectivity
    ...it may help.
     

    klara31

    Portal Member
    March 28, 2009
    43
    1
    Home Country
    Netherlands Netherlands
    Are you using a static IP address on the Windows server?
    Yes, it is addressed as 192.168.100.10

    And has the problem gone away, or too early to tell?
    So far so good, but can't tell really. As soon as this happens again, I will let you know.

    I don't know what the lanman* services are, but you could try adding dependency on the Server service.
    These services should ensure that networking is running. I have tried to add them (both), but this did not solve the problem. I actually tried them using exactly the same post :)

    If you want me to run a specific test or with debug options, please let me know. I am happy to help!
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    If you want me to run a specific test or with debug options, please let me know. I am happy to help!
    Sure. :)
    At the moment there is nothing to try. The thing is, I can't think of anything that was changed in MP 1.5 that would cause this. So, I'm a little "stumped".
     

    klara31

    Portal Member
    March 28, 2009
    43
    1
    Home Country
    Netherlands Netherlands
    I am now back on 1.4 for a couple of days and still have NOT encountered the same issue as described above...
     

    klara31

    Portal Member
    March 28, 2009
    43
    1
    Home Country
    Netherlands Netherlands
    Just a note, or actually a moment of slight embarrassment:
    Are you using a static IP address on the Windows server?
    No, acutally I am not. The windows server gets its IP address via DHCP. The static IP is reserved for my Linux (database) server. I got those two mixed up. Sorry about that...
     

    klara31

    Portal Member
    March 28, 2009
    43
    1
    Home Country
    Netherlands Netherlands
    Browsing through the issues, I stumbled upon this one: https://issues.team-mediaportal.com/browse/MP1-4102
    Isn't it possible to (re)start the tvservice when MP itself is started?

    I have done some additional testing, and it looks to me like a timing issue at boot.
     

    Users who are viewing this thread

    Top Bottom