TvService seems to fail connecting MySQL (1 Viewer)

kasukka

New Member
November 11, 2009
2
0
MediaPortal Version: MediaPortalSetup_1.1.0_BETA-1_rev23491
MediaPortal Skin:
Windows Version: windows xp sp2
CPU Type: athlon xp
HDD:
Memory: 1gb
Motherboard:
Video Card: radeon 9600
Video Card Driver:
Sound Card:
Sound Card AC3:
Sound Card Driver:
1. TV Card: msi digivox mini ii v2
1. TV Card Type:
1. TV Card Driver:
2. TV Card:
2. TV Card Type:
2. TV Card Driver:
3. TV Card:
3. TV Card Type:
3. TV Card Driver:
4. TV Card:
4. TV Card Type:
4. TV Card Driver:
MPEG2 Video Codec:
MPEG2 Audio Codec:
h.264 Video Codec:
Satelite/CableTV Provider:
HTPC Case:
Cooling:
Power Supply:
Remote:
TV:
TV - HTPC Connection:

My problem is I just can't get TvService running. It's the same for stable version as well as this
Beta1 version. It always comes to the error below. Everything else with the database seems
to go right: I always get schema initialized/upgraded with MP's tables. Only when there's
just the startup left, the tvservice will quit.

Could anyone help me? I'm getting desperate :)


Thanks!!

Kasukka



FROM TV.LOG (a piece of text that will repeat multiple times):
------------------------------------------------

2009-11-12 00:17:48.703125 [5]: TV service: Starting
2009-11-12 00:17:49.109375 [TVService]: TVService v1.0.4.23491 is starting up on Windows XP ( Service Pack 2 ) [5.1.2600.131072]
2009-11-12 00:17:49.125000 [PowerEventThread]: TV service PowerEventThread message loop is running
2009-11-12 00:17:49.140625 [TVService]: Controller: Initializing TVServer
2009-11-12 00:17:49.140625 [TVService]: Controller: 1 init attempt
2009-11-12 00:17:49.171875 [TVService]: C:\Documents and Settings\All Users.WINDOWS\Application Data\Team MediaPortal\MediaPortal TV Server\gentle.config
2009-11-12 00:17:49.187500 [TVService]: Controller: using MySQL database connection: Server=perskeles;Database=MpTvDb;User ID=root;Password
2009-11-12 00:17:49.187500 [TVService]: ----------------------------
2009-11-12 00:17:49.203125 [TVService]: TvControllerException: Error: DatabaseUnavailableUnclassified
Gentle.Common.GentleException: The database backend (provider MySQL) could not be reached.
Check the connection string: Server=perskeles;Database=MpTvDb;User ID=root;Password=MediaPortal;charset=utf8;Connection Timeout=300; ---> MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. ---> System.Net.Sockets.SocketException: The attempted operation is not supported for the type of object referenced
at System.Net.Sockets.Socket.get_ConnectEx()
at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state)
at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state)
at MySql.Data.Common.StreamCreator.CreateSocketStream(IPAddress ip, UInt32 port, Boolean unix)
at MySql.Data.Common.StreamCreator.GetStream(UInt32 timeOut)
at MySql.Data.MySqlClient.NativeDriver.Open()
--- End of inner exception stack trace ---
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at Gentle.Provider.MySQL.MySQLProvider.GetConnection()
--- End of inner exception stack trace ---
at Gentle.Common.Check.FailWith(Severity severity, Error error, Exception e, String msg)
at Gentle.Common.Check.Fail(Exception e, Error error, Object[] args)
at Gentle.Provider.MySQL.MySQLAnalyzer.Analyze(String tableName)
at Gentle.Framework.GentleAnalyzer.UpdateObjectMap(ObjectMap map)
at Gentle.Framework.ObjectFactory.ConstructMap(PersistenceBroker broker, Type type)
at Gentle.Framework.ObjectFactory.GetMap(PersistenceBroker broker, Type type)
at Gentle.Framework.SqlBuilder..ctor(IGentleProvider provider, StatementType stmtType, Type type, LogicalOperator logicalOperator)
at Gentle.Framework.SqlBuilder..ctor(StatementType stmtType, Type type)
at TvDatabase.TvBusinessLayer.GetSetting(String tagName, String defaultValue)
at TvLibrary.Implementations.TvCardCollection..ctor(IEpgEvents epgEvents)
at TvService.TVController.InitController()MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. ---> System.Net.Sockets.SocketException: The attempted operation is not supported for the type of object referenced
at System.Net.Sockets.Socket.get_ConnectEx()
at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state)
at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state)
at MySql.Data.Common.StreamCreator.CreateSocketStream(IPAddress ip, UInt32 port, Boolean unix)
at MySql.Data.Common.StreamCreator.GetStream(UInt32 timeOut)
at MySql.Data.MySqlClient.NativeDriver.Open()
--- End of inner exception stack trace ---
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at Gentle.Provider.MySQL.MySQLProvider.GetConnection()System.Net.Sockets.SocketException: The attempted operation is not supported for the type of object referenced
at System.Net.Sockets.Socket.get_ConnectEx()
at System.Net.Sockets.Socket.BeginConnectEx(EndPoint remoteEP, Boolean flowContext, AsyncCallback callback, Object state)
at System.Net.Sockets.Socket.BeginConnect(EndPoint remoteEP, AsyncCallback callback, Object state)
at MySql.Data.Common.StreamCreator.CreateSocketStream(IPAddress ip, UInt32 port, Boolean unix)
at MySql.Data.Common.StreamCreator.GetStream(UInt32 timeOut)
at MySql.Data.MySqlClient.NativeDriver.Open()
at Gentle.Common.Check.FailWith(Severity severity, Error error, Exception e, String msg)
at Gentle.Common.Check.Fail(Exception e, Error error, Object[] args)
at Gentle.Provider.MySQL.MySQLAnalyzer.Analyze(String tableName)
at Gentle.Framework.GentleAnalyzer.UpdateObjectMap(ObjectMap map)
at Gentle.Framework.ObjectFactory.ConstructMap(PersistenceBroker broker, Type type)
at Gentle.Framework.ObjectFactory.GetMap(PersistenceBroker broker, Type type)
at Gentle.Framework.SqlBuilder..ctor(IGentleProvider provider, StatementType stmtType, Type type, LogicalOperator logicalOperator)
at Gentle.Framework.SqlBuilder..ctor(StatementType stmtType, Type type)
at TvDatabase.TvBusinessLayer.GetSetting(String tagName, String defaultValue)
at TvLibrary.Implementations.TvCardCollection..ctor(IEpgEvents epgEvents)
at TvService.TVController.InitController()


FROM ERROR.LOG:
----------------------------------------------

2009-11-12 00:17:49.093750 [5]: applyProcessPriority: exception is at Gentle.Common.Check.FailWith(Severity severity, Error error, Exception e, String msg)
at Gentle.Common.Check.Fail(Exception e, Error error, Object[] args)
at Gentle.Provider.MySQL.MySQLAnalyzer.Analyze(String tableName)
at Gentle.Framework.GentleAnalyzer.UpdateObjectMap(ObjectMap map)
at Gentle.Framework.ObjectFactory.ConstructMap(PersistenceBroker broker, Type type)
at Gentle.Framework.ObjectFactory.GetMap(PersistenceBroker broker, Type type)
at Gentle.Framework.SqlBuilder..ctor(IGentleProvider provider, StatementType stmtType, Type type, LogicalOperator logicalOperator)
at Gentle.Framework.SqlBuilder..ctor(StatementType stmtType, Type type)
at TvDatabase.TvBusinessLayer.GetSetting(String tagName, String defaultValue)
at TvService.Service1.applyProcessPriority()
 

Owlsroost

Retired Team Member
  • Premium Supporter
  • October 28, 2008
    5,540
    5,038
    Cambridge
    Home Country
    United Kingdom United Kingdom
    Have you tried disabling any firewalls etc ?

    It would be better to use MP log collector (in the MP program group in the Start menu) and attach a full set of logs here.

    Tony
     

    kasukka

    New Member
    November 11, 2009
    2
    0
    Have you tried disabling any firewalls etc ?

    It would be better to use MP log collector (in the MP program group in the Start menu) and attach a full set of logs here.

    Tony

    I had firewalls disabled most of the time I tried to make it work.

    I now have one more clue: I installed MS SQL Server Express 2005 and reinstalled MP to use that
    and TvService now starts up.

    About logs: Yeah, sorry, will use the logging utility next time. I'll leave this issue for now, the M$ database
    will suffice until I'm getting "production ready" and will get back, if I still can't get MySQL to work.
     

    Cojun

    Portal Pro
    March 27, 2007
    110
    4
    58
    Home Country
    Germany Germany
    AW: TvService seems to fail connecting MySQL

    Hi,

    in some cases, you configured your computer with a specific computer name like "tvserver" or something else. In this case, MYSQL will not allow the connection from this hostname because you can only connect from "localhost" in the default settings.

    How to solve this problem:

    1. Install MySQL GUI-Tools
    2. Open MySQL-Administrator login to MySQL
    3. Click on User administration
    4. On the left lower site you will find a user list. Find the user wich Mediaportal should use to connect. Right click on that username an choose "Add new host" (or something like this).
    5. Now provide the hostname of your computer (e.g. tvserver)

    Ready!
    MP can now connect to MySQL

    Cheers

    Daniel
     

    PierreC

    MP Donator
  • Premium Supporter
  • November 9, 2011
    5
    1
    Home Country
    Canada Canada
    Re : TvService seems to fail connecting MySQL

    Hello,

    I also experience the same problem : TV server configuration cannot connect to my MySQL database.

    Note that I didn't install MySQL from the MediaPortal standard installation, since I already have a MySQL 5.5 server running on my computer. I can access my other databases using MySQL Workbench 5.2 CE (the GUI) without any problems.

    I have followed the tips provided in previous posts, that is :
    a) replacing the Hostname : localhost with the name of my computer (Pierre_France)
    b) creating a new user in MySQL Workbench and giving it all accesses and privileges.

    But it doesn't work. I also checked the firewall and my Norton Internet Security 2011 is not causing the problem. I have granted privilege to the specific programs and even if I desable the firewall, I am still unable to connect to the DB.

    An interesting fact thought is that the error message is different according to the hostname I specifed :

    If I specify «localhost», the I get the error message : Specify server name : Please specify a valid hostname or IP address for the server. I also tried «localhost:3306» without any further success.

    If I specify «Pierre_France», as the hostname, I get : Connection failed! Host 'Pierre_France" is not allowed to connect to this MySQL server even if I had granted user root with the privilege to connect to any DB schema from any host.

    In both cases, the user was «root» with my own password.

    I can send the logs if necessary.

    Can anyone help please? Thanks in advance!
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,228
    Home Country
    New Zealand New Zealand
    Re: Re : TvService seems to fail connecting MySQL

    Hi and welcome PierreC :)

    An interesting fact thought is that the error message is different according to the hostname I specifed :

    If I specify «localhost», the I get the error message : Specify server name : Please specify a valid hostname or IP address for the server. I also tried «localhost:3306» without any further success.
    That error is TV Server saying you can't use localhost. TV Server won't let you use localhost because the settings get copied to all clients that connect to the TV Server. Those clients could be different PCs for which localhost does not mean "the computer with TV Server installed" like it does on the actual TV Server. Don't use localhost or 127.0.0.1 - it flat out won't work.

    If I specify «Pierre_France», as the hostname, I get : Connection failed! Host 'Pierre_France" is not allowed to connect to this MySQL server even if I had granted user root with the privilege to connect to any DB schema from any host.
    Using Pierre_France is correct, but you either haven't given enough privilege to root yet or you haven't actually created the schema/database for TV Server to use. You must create the database manually if using an existing MySQL installation. Then the user (root in this case) must be granted all privileges on that schema from any PC. Note that you may also need to grant certain privileges on the MySQL system schema. The security with MySQL is a little finnicky - at least be sure you grant permissions on the schema/database *and* for all hosts.

    mm
     

    PierreC

    MP Donator
  • Premium Supporter
  • November 9, 2011
    5
    1
    Home Country
    Canada Canada
    Re : TvService seems to fail connecting MySQL

    Thank you very much mm! :)

    I created the DB schema, log on with Pierre_France and the TV Server configuration was able to create all the tables it needed.

    But TV Server ended failing to start TV Service. I got the following message error in the dialog box (converted from image to text with imperfect OCR) :

    Faited to startup tvserviceSystem.Runttime.Remoting.RemolingException:
    Service demandé introuvable

    Server stack trace: ·

    System.Runtime.Remoting.Channels.BinarySefveffOfmanerSink:.ProcessMessage
    (1ServerChannetSinkStad:sinkStiKt,lMessagerequestMsg.
    ITransportHeolders reqoestHeadefs, Stream requestStream.~
    r~ITransportHe~r~aden,Stream&
    responseStream)
    Exoeption rethrown al (Ol; ·S)'5l:em.Runlime.Remoting.Proxie5.ReatProxy.HandleRetur~
    !Je reqMsg, IMessage retMsg) ·S)'5l:em.Runtime.Remoting.ProxiaRealProxy.PrivatelnYoloe{MessageOata&
    msgData,lnt32type}
    à TyCootroUControlter.get...Cards()
    à SetupTv5tartup.Main(StringD arguments}

    I don't know if it is my TV card which is at fault now (I never managed to have it work with Windows Media Center, thus this trial of MediaPortal...) or if I have to look elsewhere for the problem.

    Can you diagnose what is wrong with my installations?

    Thanks in advance!

    Pierre Caron
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,228
    Home Country
    New Zealand New Zealand
    Hi again Pierre

    I don't think it is a TV card problem here, although it is a little strange. I found a German thread with the same error -->here<--. The solution there is to rename the *.exe.config files in the TV Server install directory to *.config (ie. remove the .exe part). Please try that first.

    mm
    PS: what operating system are you using on the PC with TV Server installed?
     

    PierreC

    MP Donator
  • Premium Supporter
  • November 9, 2011
    5
    1
    Home Country
    Canada Canada
    Re : TvService seems to fail connecting MySQL

    Hello mm,

    Sorry for not having gotten back to you sooner. I am a little bit puzzled with your first solution and am asking you if you could tell me precisely which file to rename from *.exe to *.config.

    I have two main directories :

    C:\Program Files (x86)\Team MediaPortal\MediaPortal TV Server
    and
    C:\Program Files (x86)\Team MediaPortal\MediaPortal

    and there are 16 *.exe files in those 2 directories.

    Also, renaming a file from *.exe to *.config has the effect of temporarly disabling it since the program could not be executed when renamed. It is thus important to know which file to desactivate...


    For your other question, I run Win 7 64 OS. I have attached my TV server log.

    I tried your second solution involving modifying the C:\Windows\System32\drivers\etc\hosts files and it didn't work out.

    Thank you again for your help. You are definitely very devoted.

    Pierre C.
     

    Users who are viewing this thread


    Write your reply...
    Top Bottom