TV-Service starts before SQL-Server (1 Viewer)

patrick

Portal Pro
April 20, 2005
608
45
Southeast
Home Country
United States of America United States of America
Patric,

You may want to test again, just saw this in the SVN log 12Nov2006:

Code:
when service starts and sql server is not running yet, wait 5 seconds before trying to access the database

patrick
 

Patric

Portal Pro
August 27, 2004
84
2
Home Country
Germany Germany
Hi patrick,

I already compiled and tried that version directly after frodo had submitted that patch. It now works about 1 out of 3 times. I asked frodo by PM if he could possibly expand that 5 second delay for a second connection try to 10 seconds or insert a thrid connection try after another 5 seconds.

But I doubt he has time to read his PMs. Hopefully he has a lot work to do with the more serious problems.

Nevertheless I still hope that there'll be a solution for my problem.

And thanks for thinking about me :)
 

Patric

Portal Pro
August 27, 2004
84
2
Home Country
Germany Germany
Finally :)

frodo
Thanks alot for inserting the third connection attempt into the init routine!
That solved my problem.

Now I only have to delay the start of MP because the TV-Server needs really some time before accepting the client connection even though it's a single seat config.

Just for info:

TV-Server - tv.log
Code:
14.11.2006 22:24:43 TV service started
14.11.2006 22:24:45 C:\Dokumente und Einstellungen\All Users\Anwendungsdaten\MediaPortal TV Server\gentle.config
14.11.2006 22:24:51 ----------------------------
14.11.2006 22:24:51 Detected analog card:hauppauge wintv pvr pci ii tvtuner
14.11.2006 22:24:56 PluginManager: TvEngine.ConflictsManager is incompatible with the current tvserver version and won't be loaded!
14.11.2006 22:24:57 PluginManager: Loaded TV Movie Clickfinder Import version:0.2 author:mPod
14.11.2006 22:24:57 PluginManager: Loaded XmlTv version:1.0.0.0 author:Frodo
14.11.2006 22:24:57 Controller: Started at dign
14.11.2006 22:24:57 Controller: local ip adress:192.168.100.13
14.11.2006 22:25:02 C:\Dokumente und Einstellungen\All Users\Anwendungsdaten\MediaPortal TV Server\gentle.config
14.11.2006 22:25:02 ----------------------------
14.11.2006 22:25:02 Detected analog card:hauppauge wintv pvr pci ii tvtuner
14.11.2006 22:25:02 PluginManager: TvEngine.ConflictsManager is incompatible with the current tvserver version and won't be loaded!
14.11.2006 22:25:02 PluginManager: Loaded TV Movie Clickfinder Import version:0.2 author:mPod
14.11.2006 22:25:02 PluginManager: Loaded XmlTv version:1.0.0.0 author:Frodo
14.11.2006 22:25:02 Controller: Started at dign
14.11.2006 22:25:02 Controller: local ip adress:192.168.100.13
14.11.2006 22:25:07 C:\Dokumente und Einstellungen\All Users\Anwendungsdaten\MediaPortal TV Server\gentle.config
14.11.2006 22:25:07 ----------------------------
14.11.2006 22:25:07 Detected analog card:hauppauge wintv pvr pci ii tvtuner
14.11.2006 22:25:58 PluginManager: Loaded ConflictsManager version:1.0.0.0 author:Broceliande
14.11.2006 22:25:58 PluginManager: Loaded TV Movie Clickfinder Import version:0.2 author:mPod
14.11.2006 22:25:58 PluginManager: Loaded XmlTv version:1.0.0.0 author:Frodo
14.11.2006 22:25:58 Controller: Started at dign
14.11.2006 22:25:58 Controller: local ip adress:192.168.100.13
14.11.2006 22:25:58 Controller: server running on 192.168.100.13
14.11.2006 22:25:59 Controller: setup streaming
14.11.2006 22:26:00 dbs:36 channels
14.11.2006 22:26:00 EPG: grabber started..
14.11.2006 22:26:00 Scheduler: started
14.11.2006 22:26:03 Scheduler: loaded 0 schedules
14.11.2006 22:26:03 plugin: ConflictsManager stopped
14.11.2006 22:26:03 plugin: xmltv started
14.11.2006 22:26:03 Controller: initalized

TV-Server - error.log:
Code:
14.11.2006 22:24:57 !!!Controller:Unable to connect to database!!!
14.11.2006 22:24:57 Controller: database connection string:Password=mediaportal;Persist Security Info=True;User ID=sa;Initial Catalog=TvLibrary;Data Source=192.168.100.13\SQLEXPRESS;
14.11.2006 22:24:57 Sql error:The database backend (provider SQLServer) could not be reached.
Check the connection string: Password=mediaportal;Persist Security Info=True;User ID=sa;Initial Catalog=TvLibrary;Data Source=192.168.100.13\SQLEXPRESS;
14.11.2006 22:25:02 !!!Controller:Unable to connect to database!!!
14.11.2006 22:25:02 Controller: database connection string:Password=mediaportal;Persist Security Info=True;User ID=sa;Initial Catalog=TvLibrary;Data Source=192.168.100.13\SQLEXPRESS;
14.11.2006 22:25:02 Sql error:The database backend (provider SQLServer) could not be reached.
Check the connection string: Password=mediaportal;Persist Security Info=True;User ID=sa;Initial Catalog=TvLibrary;Data Source=192.168.100.13\SQLEXPRESS;

MP - MediaPortal.log (excerpt):
Code:
2006-11-14 22:25:15.978745 [Info.][MPMain]: TvCropManager: Started
2006-11-14 22:25:15.978745 [Info.][MPMain]: TVHome:ctor
2006-11-14 22:25:16.259237 [Info.][MPMain]: ChannelNavigator::ctor()
2006-11-14 22:25:16.446232 [Info.][MPMain]: Remote control:master server :192.168.100.13
2006-11-14 22:25:16.570895 [Info.][MPMain]: ChannelNavigator::Reload()
2006-11-14 22:25:21.791167 [Info.][MPMain]: Exception   :System.Net.Sockets.SocketException: Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte

Server stack trace: 
   bei System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   bei System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   bei System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(EndPoint ipEndPoint)
   bei System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket()
   bei System.Runtime.Remoting.Channels.SocketCache.GetSocket(String machinePortAndSid, Boolean openNew)
   bei System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.SendRequestWithRetry(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream)
   bei System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
   bei System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]: 
   bei System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   bei System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   bei TvControl.IController.get_DatabaseConnectionString()
   bei TvPlugin.ChannelNavigator.ReLoad()
2006-11-14 22:25:21.791167 [Info.][MPMain]: Exception   :Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte
2006-11-14 22:25:21.791167 [Info.][MPMain]:   site      :Void HandleReturnMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessage)
2006-11-14 22:25:21.837915 [Info.][MPMain]:   source    :mscorlib
2006-11-14 22:25:21.837915 [Info.][MPMain]:   stacktrace:
Server stack trace: 
   bei System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   bei System.Net.Sockets.Socket.Connect(EndPoint remoteEP)
   bei System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket(EndPoint ipEndPoint)
   bei System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket()
   bei System.Runtime.Remoting.Channels.SocketCache.GetSocket(String machinePortAndSid, Boolean openNew)
   bei System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.SendRequestWithRetry(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream)
   bei System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, ITransportHeaders& responseHeaders, Stream& responseStream)
   bei System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]: 
   bei System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   bei System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   bei TvControl.IController.get_DatabaseConnectionString()
   bei TvPlugin.ChannelNavigator.ReLoad()
2006-11-14 22:25:21.884664 [Info.][MPMain]: TVHome:Init
2006-11-14 22:25:22.102825 [Info.][MPMain]: TVHome:OnAdded

Thanks for your great work!
 

infinite.loop

Retired Team Member
  • Premium Supporter
  • December 26, 2004
    16,163
    4,133
    127.0.0.1
    Home Country
    Austria Austria
    @frodo
    Thanks alot for inserting the third connection attempt into the init routine!
    That solved my problem.

    Now I only have to delay the start of MP because the TV-Server needs really some time before accepting the client connection even though it's a single seat config.
    i am bumping this old thread because i am interested in a few things

    when you start your singleseat config, and then enter MyTV, then you get "No TV-Server found".
    have i got that right?

    if so, then if you wait a few seconds and try again (after TV-Service has started) it should work (without restarting MediaPortal) right?

    :)
     

    mrkaras

    Portal Pro
    December 9, 2006
    541
    7
    Home Country
    No, I don't think the my TV part will ever reconnect after it has failed initially. I think the EPG is the same, it never shows if it didn't work first time unless you restart mediaportal.
     

    PsyDuck

    Portal Member
    January 22, 2007
    17
    0
    Home Country
    Sweden Sweden
    Any news on this....Tried to check the TVPlugin-code in order to find a fix...but I am to stupid to find the "initializing part" in the code.
     

    mrkaras

    Portal Pro
    December 9, 2006
    541
    7
    Home Country
    there now seemes to be several options relating to this but they do not fix it. possably if I set a long wait time it might, I have it set to 2 seconds, so now when MP starts it briefly says "waiting for 2 seconds" (that takes a bit less than 1 second to move on).

    the TV service never connects and must be restarted, config will say it can not connect to the service.
     

    Hetfield

    Portal Pro
    March 3, 2007
    69
    9
    Home Country
    Finland Finland

    Yes!!! So also many others have the same problem as I do. Let's hope this gets fixed some day. For me the batch file has been 100% stable for over half years. Any other time out settings in MediaPortal don't help at all (or helps if I put over 60 - 120 seconds). This batch file is anyway much better: it doesn't cause you to wait too long just to be sure. It starts MediaPortal immediately when everything is ready, and it works always.
     

    Users who are viewing this thread

    Top Bottom