Database Connection Problems (on client machine) (2 Viewers)

porky996t

MP Donator
  • Premium Supporter
  • May 21, 2008
    1,016
    81
    Bolton, Lancashire, England
    Home Country
    England England
    Hi Guys,

    After many months of playing nice, my bedroom client will not start up properly. It opens up and then stays minimised to the taskbar. The only way to then shut MP down is via Ctrl+Alt+Del.

    I have reinstalled, but still have the same problem. :(

    The GF uses this client everyday, so I'd be grateful if someone could assist in getting her off my back - the WAF has plummeted from a exceptional high.

    Logs attached.

    Thanks in advance.
     
    Last edited:

    Jay_UK

    Test Group
  • Team MediaPortal
  • October 6, 2009
    1,781
    283
    Derby
    Home Country
    United Kingdom United Kingdom
    Hi there,

    Are you sure it's not opening off screen?

    Have you tried to restore/move the window - may need to use the cursor keys

    J.
     

    porky996t

    MP Donator
  • Premium Supporter
  • May 21, 2008
    1,016
    81
    Bolton, Lancashire, England
    Home Country
    England England
    Thanks for the response Jay, unfortunately it isn't that.

    I have uninstalled and done a complete full reinstall. I now have MP appearing fullscreen, and it seems like the problem starts when I go into the TV section. This particular client is not picking up any data from the TV Server (I think...from reading the logs). The last few entries from the logs says:-

    2012-09-01 15:16:15.433255 [Info.][MPMain(1)]: Tv NotifyManager: Exception at timer_tick Error: DatabaseUnavailableUnclassified
    Gentle.Common.GentleException: The database backend (provider MySQL) could not be reached.
    Check the connection string: Server=TVPC;Database=MpTvDb;User ID=root;Password=MediaPortal;charset=utf8;Connection Timeout=30; ---> MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. ---> System.Exception: Exception of type 'System.Exception' was thrown.
    at MySql.Data.MySqlClient.NativeDriver.Open()
    --- End of inner exception stack trace ---
    at MySql.Data.MySqlClient.NativeDriver.Open()
    at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
    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.Recording.ListAllActive()
    at TvPlugin.TvNotifyManager.AddActiveRecordings()
    at TvPlugin.TvNotifyManager._timer_Tick(Object sender, EventArgs e)MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. ---> System.Exception: Exception of type 'System.Exception' was thrown.
    at MySql.Data.MySqlClient.NativeDriver.Open()
    --- End of inner exception stack trace ---
    at MySql.Data.MySqlClient.NativeDriver.Open()
    at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
    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.Exception: Exception of type 'System.Exception' was thrown.
    at MySql.Data.MySqlClient.NativeDriver.Open() st : at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
    at System.Environment.get_StackTrace()
    at TvPlugin.TvNotifyManager._timer_Tick(Object sender, EventArgs e)
    at System.Windows.Forms.Timer.OnTick(EventArgs e)
    at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.Run(Form mainForm)
    at MediaPortalApp.Main(String[] args)
    2012-09-01 15:16:34.039319 [Info.][MPMain(1)]: Tv NotifyManager: Exception at timer_tick Error: DatabaseUnavailableUnclassified
    Gentle.Common.GentleException: The database backend (provider MySQL) could not be reached.
    Check the connection string: Server=TVPC;Database=MpTvDb;User ID=root;Password=MediaPortal;charset=utf8;Connection Timeout=30; ---> MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts. ---> System.Exception: Exception of type 'System.Exception' was thrown.
    at MySql.Data.MySqlClient.NativeDriver.Open()


    This seems a little odd, as the kitchen client is working fine, and the main HTPC (which acts as the server) in the lounge is working fine; it is just this bedroom client that cannot connect to the server Database. I can access all shared folders, I can 'ping' the server and get a verified response.

    If I shut down MP and restart the PC, then MP just sits on the taskbar again when the machine has finished booting up. I have to reinstall to be able to get working properly. If I start in non-fullscreen mode, I get a blank window with the windows 7 circular, busy cursor showing constantly.

    Any ideas anyone?

    Thansk in advance of useful suggestions.


    EDIT: This has to be a Database connection issue.... see error log (this after another clean reinstall of 1.2.3 and now a clean reinstall of 1.3 alpha)
     
    Last edited:

    porky996t

    MP Donator
  • Premium Supporter
  • May 21, 2008
    1,016
    81
    Bolton, Lancashire, England
    Home Country
    England England
    Hi Owlsroost,

    I have checked it and it seems OK - in that, I mean it is the same as the other client. I can access the 'server' shared folder for films & TV Series so it isn't being blocked. It is just that MySQL database is not being seen/shared with this particular machine.

    I have disabled "TV" in the plugins config and MP starts up fine now. My TV Series and MovingPictures which use shared folder run fine.

    EDIT: I have tried MP on both my laptop and the GF's laptop. MP runs fine on my laptop and will not run on the GF's as "the database backend is not accessible" - which is the same problem as is happening with the bedroom client. Could it be the MySQL database on the TV Server in the lounge is failing to see the clients??
     
    Last edited:

    porky996t

    MP Donator
  • Premium Supporter
  • May 21, 2008
    1,016
    81
    Bolton, Lancashire, England
    Home Country
    England England
    Still not working.... WAF now at all time low... :( looks like I'll have to remove MP from bedroom this weekend and go back to the built in tuner on the TV.

    Thanks for the suggestions so far.
     

    mm1352000

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

    Is either the GF's laptop or the bedroom PC running a 64 bit version of Windows?
    If you're still willing to give it a shot, I suggest you fully disable firewalls on the server and client for testing.
    Also please post the gentle.config files from the server and client.
    Note: MySQL DBs can be configured to allow/disallow connections on a host/IP basis. So you maybe able to connect to a DB with given credentials on one PC where you can't from another. I'm pretty sure the configuration applied to the MySQL installed by a default MP installation allows connections from any host.
    I would suggest you install MySQL Workbench (or MySQL GUI Tools - older version of the MySQL admin tools) on one of the affected PCs and attempt a simple DB connection using root/MediaPortal.

    mm
     

    porky996t

    MP Donator
  • Premium Supporter
  • May 21, 2008
    1,016
    81
    Bolton, Lancashire, England
    Home Country
    England England
    Hi mm,

    Thanks for the input.

    None of the laptops or MP machines have 64 bit version on them. All running Win 7 x86

    I have disabled both firewalls - no change. The client is still not connecting to the database.


    gentle.config files will not attach, due to file extension type. So this is a copy of the text from client machine:-

    <?xml version="1.0" encoding="utf-8"?>
    <Gentle.Framework>
    <!-- See the API documentation for the Gentle.Framework.GentleSettings class for
    detailed information on the keys available in the Options section -->
    <Options>
    <!-- the default timeout value in seconds for IDbCommand instances created by Gentle -->
    <CommandTimeout>30</CommandTimeout>
    <!-- whether to enable support for Gentle-managed concurrency control columns -->
    <ConcurrencyControl>false</ConcurrencyControl>
    <!-- options: Attributes or XML (XML currently unused) -->
    <MasterDefinition>Attributes</MasterDefinition>
    <Analyzer>
    <!-- options: None, OnDemand (the default), Full -->
    <Level>OnDemand</Level>
    <!-- whether to warn about unmapped columns and other non-fatal errors -->
    <Silent>false</Silent>
    </Analyzer>
    <Cache>
    <!-- default cache strategy (use only Never or Temporary) -->
    <DefaultStrategy>Temporary</DefaultStrategy>
    <CacheStatements>true</CacheStatements>
    <CacheObjects>true</CacheObjects>
    <!-- when true Gentle will try to bypass query execution and compose
    the result from cached data alone -->
    <SkipQueryExecution>true</SkipQueryExecution>
    <!-- the scope within which to ensure uniqing
    options: Thread (default), Application or WebSession -->
    <UniqingScope>Application</UniqingScope>
    </Cache>
    <Logging>
    <!-- This setting controls the lowest log level emitted. See the
    Verbosity enum for details on the available values. -->
    <Verbosity>Warning</Verbosity>
    <!-- Do not edit this unless you know what you're doing. This setting
    controls at what level error conditions are considered fatal. -->
    <Frailty>Warning</Frailty>
    <!-- Use values defined in the LogCategories enum to turn logging on/off
    for selected categories. The available values include:
    All (all categories)
    StatementExecutionRead (select statements)
    StatementExecutionWrite (insert/update/delete statements)
    StatementExecutionOther (any other kind of statement)
    StatementExecution (any kind of statement; same as all three groups above)
    Cache (cache accesses)
    Metadata (metadata updates)
    General (everything else) -->
    <!-- The following sample first disables all categories, then selectively
    turns on various subcategories -->
    <Category name="All" enabled="false" />
    <Category name="StatementExecution" enabled="false" />
    <Category name="Cache" enabled="false" />
    <Category name="Metadata" enabled="false" />
    </Logging>
    </Options>
    <!--
    <NamespaceProviders>
    <Namespace namespace="Gentle.First" provider="SQLServer" connectionstring="..." />
    <Namespace namespace="Gentle.Second" provider="SQLServer" connectionString="..." />
    </NamespaceProviders>
    -->
    <DefaultProvider name="MySQL" connectionString="Server=TVPC;Database=MpTvDb;User ID=root;Password=MediaPortal;charset=utf8;Connection Timeout=30;" />
    <!--
    <DefaultProvider name="Firebird" connectionString="User=SYSDBA;Password=masterkey;Data Source=TvLibrary.fdb;ServerType=1;Charset=UNICODE_FSS;" />
    <DefaultProvider name="Jet" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Code\Gentle.NET\Source\Gentle.Framework.Tests\Database Files\Gentle_MSAccess.mdb;OLE DB Services=-1;" />
    <DefaultProvider name="MySQL" connectionString="Server=10.0.0.2;Database=test;User ID=xxx;Password=xxx" />
    <DefaultProvider name="PostgreSQL" connectionString="Server=10.0.0.2;Database=Test;User ID=xxx;Password=xxx" />
    <DefaultProvider name="Oracle" connectionString="Data Source=kermit.symbiote.sporadicism.com,1521;User ID=gentle;password=xxx" />
    <DefaultProvider name="OracleODP" connectionString="Data Source=kermit.symbiote.sporadicism.com,1521;User ID=gentle;password=xxx" />
    <DefaultProvider name="SQLite" connectionString="URI=file:c:/Code/Gentle.NET/Source/Gentle.Framework.Tests/Database Files/Gentle_SQLite.db" />
    <DefaultProvider name="SQLServer" connectionString="data source=127.0.0.1;initial catalog=Test;user id=xxx;password=xxx;packet size=4096" />
    -->
    <!-- IMPORTANT: You must uncomment ONLY the providers that you will be using. If a provider
    is defined below, but Gentle cannot find or load the associated library, an exception
    will most likely be raised! -->
    <Providers>
    <!-- list known provider assemblies; the assembly .dll suffix is optional -->
    <!-- Provider name="CE" assembly="Gentle.Provider.CE" /-->
    <!-- Provider name="Firebird" assembly="Gentle.Provider.Firebird" /-->
    <!-- Provider name="Jet" assembly="Gentle.Provider.Jet" /-->
    <Provider name="MySQL" assembly="Gentle.Provider.MySQL.dll" />
    <!-- Provider name="Oracle" assembly="Gentle.Provider.Oracle" /-->
    <!-- Provider name="OracleODP" assembly="Gentle.Provider.OracleODP" /-->
    <!-- Provider name="PostgreSQL" assembly="Gentle.Provider.PostgreSQL" /-->
    <!-- Provider name="SQLite" assembly="Gentle.Provider.SQLite" / -->
    <Provider name="SQLServer" assembly="Gentle.Provider.SQLServer" />
    <!-- Provider name="Sybase" assembly="Gentle.Provider.Sybase" / -->
    <!-- Provider name="SybaseASA" assembly="Gentle.Provider.SybaseASA" / -->
    </Providers>
    </Gentle.Framework>

    This is the same from the Server machine...

    EDIT: This is actually from the MP Client that sits on the TV Server machine, it is not the gentle.config detail from the TV Server itself, that file detail is a couple of posts further on. Thanks to HomeY for pointing this out.


    <?xml version="1.0" encoding="utf-8"?> <Gentle.Framework> <!-- See the API documentation for the Gentle.Framework.GentleSettings class for detailed information on the keys available in the Options section --> <Options> <!-- the default timeout value in seconds for IDbCommand instances created by Gentle --> <CommandTimeout>30</CommandTimeout> <!-- whether to enable support for Gentle-managed concurrency control columns --> <ConcurrencyControl>false</ConcurrencyControl> <!-- options: Attributes or XML (XML currently unused) --> <MasterDefinition>Attributes</MasterDefinition> <Analyzer> <!-- options: None, OnDemand (the default), Full --> <Level>OnDemand</Level> <!-- whether to warn about unmapped columns and other non-fatal errors --> <Silent>false</Silent> </Analyzer> <Cache> <!-- default cache strategy (use only Never or Temporary) --> <DefaultStrategy>Temporary</DefaultStrategy> <CacheStatements>true</CacheStatements> <CacheObjects>true</CacheObjects> <!-- when true Gentle will try to bypass query execution and compose the result from cached data alone --> <SkipQueryExecution>true</SkipQueryExecution> <!-- the scope within which to ensure uniqing options: Thread (default), Application or WebSession --> <UniqingScope>Application</UniqingScope> </Cache> <Logging> <!-- This setting controls the lowest log level emitted. See the Verbosity enum for details on the available values. --> <Verbosity>Warning</Verbosity> <!-- Do not edit this unless you know what you're doing. This setting controls at what level error conditions are considered fatal. --> <Frailty>Warning</Frailty> <!-- Use values defined in the LogCategories enum to turn logging on/off for selected categories. The available values include: All (all categories) StatementExecutionRead (select statements) StatementExecutionWrite (insert/update/delete statements) StatementExecutionOther (any other kind of statement) StatementExecution (any kind of statement; same as all three groups above) Cache (cache accesses) Metadata (metadata updates) General (everything else) --> <!-- The following sample first disables all categories, then selectively turns on various subcategories --> <Category name="All" enabled="false" /> <Category name="StatementExecution" enabled="false" /> <Category name="Cache" enabled="false" /> <Category name="Metadata" enabled="false" /> </Logging> </Options> <!-- <NamespaceProviders> <Namespace namespace="Gentle.First" provider="SQLServer" connectionstring="..." /> <Namespace namespace="Gentle.Second" provider="SQLServer" connectionString="..." /> </NamespaceProviders> --> <DefaultProvider name="MySQL" connectionString="Server=TVPC;Database=MpTvDb;User ID=root;Password=MediaPortal;charset=utf8;Connection Timeout=30;" /> <!-- <DefaultProvider name="Firebird" connectionString="User=SYSDBA;Password=masterkey;Data Source=TvLibrary.fdb;ServerType=1;Charset=UNICODE_FSS;" /> <DefaultProvider name="Jet" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Code\Gentle.NET\Source\Gentle.Framework.Tests\Database Files\Gentle_MSAccess.mdb;OLE DB Services=-1;" /> <DefaultProvider name="MySQL" connectionString="Server=10.0.0.2;Database=test;User ID=xxx;Password=xxx" /> <DefaultProvider name="PostgreSQL" connectionString="Server=10.0.0.2;Database=Test;User ID=xxx;Password=xxx" /> <DefaultProvider name="Oracle" connectionString="Data Source=kermit.symbiote.sporadicism.com,1521;User ID=gentle;password=xxx" /> <DefaultProvider name="OracleODP" connectionString="Data Source=kermit.symbiote.sporadicism.com,1521;User ID=gentle;password=xxx" /> <DefaultProvider name="SQLite" connectionString="URI=file:c:/Code/Gentle.NET/Source/Gentle.Framework.Tests/Database Files/Gentle_SQLite.db" /> <DefaultProvider name="SQLServer" connectionString="data source=127.0.0.1;initial catalog=Test;user id=xxx;password=xxx;packet size=4096" /> --> <!-- IMPORTANT: You must uncomment ONLY the providers that you will be using. If a provider is defined below, but Gentle cannot find or load the associated library, an exception will most likely be raised! --> <Providers> <!-- list known provider assemblies; the assembly .dll suffix is optional --> <!-- Provider name="CE" assembly="Gentle.Provider.CE" /--> <!-- Provider name="Firebird" assembly="Gentle.Provider.Firebird" /--> <!-- Provider name="Jet" assembly="Gentle.Provider.Jet" /--> <Provider name="MySQL" assembly="Gentle.Provider.MySQL.dll" /> <!-- Provider name="Oracle" assembly="Gentle.Provider.Oracle" /--> <!-- Provider name="OracleODP" assembly="Gentle.Provider.OracleODP" /--> <!-- Provider name="PostgreSQL" assembly="Gentle.Provider.PostgreSQL" /--> <!-- Provider name="SQLite" assembly="Gentle.Provider.SQLite" / --> <Provider name="SQLServer" assembly="Gentle.Provider.SQLServer" /> <!-- Provider name="Sybase" assembly="Gentle.Provider.Sybase" / --> <!-- Provider name="SybaseASA" assembly="Gentle.Provider.SybaseASA" / --> </Providers> </Gentle.Framework>

    I'll install the workbench and see if I can connect that way..

    Thanks for assistance so far.
     
    Last edited:

    porky996t

    MP Donator
  • Premium Supporter
  • May 21, 2008
    1,016
    81
    Bolton, Lancashire, England
    Home Country
    England England
    I have installed MySQL Workbench on the bedroom client and this cannot connect to the database.

    I'm using the IP address of 192.168.1.130, which is that in the streaming server, with a port of 554... should i be using port 554 or the MySQL default one of 3306??

    EDIT: Tried both and none connected :(
     
    Last edited:

    HomeY

    Test Group
  • Team MediaPortal
  • February 23, 2008
    6,475
    4,645
    49
    ::1
    Home Country
    Netherlands Netherlands
    Connection settings client:
    <DefaultProvider name="MySQL" connectionString="Server=TVPC;Database=MpTvDb;User ID=root;Password=MediaPortal;charset=utf8;Connection Timeout=30;" />

    Connection settings server:
    <DefaultProvider name="MySQL" connectionString="Server=TVPC;Database=MpTvDb;User ID=root;Password=MediaPortal;charset=utf8;Connection Timeout=30;" />

    So it seems that 1 is wrong, since both the server & client use 'TVPC' as computername. Does it work when you replace 'TVPC' in the client file and replace it with the IP of the server?
     

    Users who are viewing this thread

    Top Bottom