[fixed] No database connection from client after new install? (1 Viewer)

ramu

Portal Pro
July 15, 2008
190
7

Hello MP team,

I just changed to 1.2.0 beta;
1. Installed MP Server on an XP machine, wherefore I choose the existing database option (mysql)
2. Installed MP Client on win7 as an update for 1.2. alpha and XP notebook as a new installation

and got the following problem:
While on the server there is no problem displaying program information on both notebooks I get the information, that the database is not avaible while all ip Ports are connected.

Now I wonder why there is no connection because I’m able to connect from the notebooks the mysql database via mysql-tools. Also because I chanced no addition informations on a former 1.2 alpha running system..

Please have a look to the error.log, there is the database: There is Server=localhost where else it should be the server ip???
Is there a possibility to add the ip for the database connection? I only know the ip for the mediaserver in mp setup.

Thx ramu


2011-05-03 22:24:02.160853 [ERROR][MPMain(1)]: PluginManager: GuiControlsDemo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null is tagged as incompatible with the current MediaPortal version and won't be loaded!
2011-05-03 22:24:02.172853 [ERROR][MPMain(1)]: PluginManager: MPHSPlugin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null is tagged as incompatible with the current MediaPortal version and won't be loaded!
2011-05-03 22:24:03.500929 [ERROR][MPMain(1)]: TVHome: Error in Reload
2011-05-03 22:24:03.515930 [ERROR][MPMain(1)]: Exception :Error: DatabaseUnavailableUnclassified
Gentle.Common.GentleException: The database backend (provider MySQL) could not be reached.
Check the connection string: Server=localhost;Database=MpTvDb;User ID=root;Password=***;charset=utf8;Connection Timeout=300; ---> 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 TvPlugin.ChannelNavigator.ReLoad()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()
 

Iwen

Portal Pro
August 14, 2007
464
32
Home Country
Germany Germany
AW: No database connection from client after new install?

That's a problem which happened to a few people (me too) in the german section too.

Full Products Cleanup of the TV-Server part and new installation helped in my case. Only thing I changed was in the installation process to choose not the "SQL server is already present...." option but the "MySQL 5" option. (Advanced Installation - MediaPortal Wiki)

Don't know why this has helped. It's definitely not a problem of the client part.
 

wupperi

MP Donator
  • Premium Supporter
  • July 29, 2007
    56
    0
    Unterfranken
    Home Country
    Germany Germany
    AW: No database connection from client after new install?

    same here. had to manually edit gentle config on client side.
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,553
    3,934
    Lehmden
    Home Country
    Germany Germany
    AW: No database connection from client after new install?

    Hello.
    It's a nasty MySQL "Feature" that leads to this. If you do a complete uninstall (don't forget to delete the MySQL Databases Folder manually, will stay there if you don't do it) and reinstall the MySQL Server be sure NOT to activate Strict Mode. This is the reason for such problems.
     

    ramu

    Portal Pro
    July 15, 2008
    190
    7
    AW: No database connection from client after new install?

    Hello,

    thanks for Your ideas. I don't belive that this is the problem, because the mysql database is running well on the mp-server. There I do not have this problems at all. TV is running and I get all the program information.

    I think it's a problem with gentle config file as wupperi said. I tried to chance there the value from localhost to server-ip, too but I didn't get the database connenction running. Of course I entered the right IP adress in mp-client setup.

    So I don't know where the mp-client gets his information about the mysql-ip-adresse from. I would guess that there is somewhere localhost coded while it should be gerneric form the configfile and represent the same ip als tv-server...

    By the way after the start of mp client the system chanced gentle.config the the old value "localhost" while before the client started I chanced it to the tv-server ip???

    <DefaultProvider name="MySQL" connectionString="Server=localhost;Database=MpTvDb;User ID=root;Password=MediaPortal;charset=utf8;Connection Timeout=300;" />

    When clicking on tv-program I get the ip-setup site after a while. There is the right tv-server ip so i click on ok. After a moment I get the error window: Connected to tv-server; No db-connection; all Ip-ports open...

    Please have another look to that problem...

    ramu
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,553
    3,934
    Lehmden
    Home Country
    Germany Germany
    AW: No database connection from client after new install?

    Hi.
    This error message without a doubt indicates there's a problem with the Database. I had exactly this error installing 1.2Beta Client on my laptop while MePo was running fine on my main HTPC (SingleSeat). The only solution that helps me was to disable the strict mode of MySQL, delete all connections and add a new local connection (root@localhost) after that. Since then the connection between TV Server and MySQL is a bit faster too...

    BTW. This Problem is NOT related to 1.2 Beta only. I had this on a regular basis since a Year or so. Now for first time we have a clear error message. Before 1.2 Beta it says only "no connection to tv service"...

    Something had changed on Windows 7 I think, as the MySQL Install File I use (5.1) is a lot older and has no issues at an earlier time. I've tried some newer versions of MySQL also. All have this issue too.
     

    ramu

    Portal Pro
    July 15, 2008
    190
    7
    AW: No database connection from client after new install?

    Hello,

    no it's not a database problem. It's as wupperi said a config problem. My mistake was to change gentle.config on client site. It seems to be copied for tv server to client each time mp is started.

    So in my point of view the bug is that there was NO mysql setup/connection window while installing mp 1.2.0 beta, which asked for user/passwd and as I guess chanced the gentle.config file to the right connection information for connected clients...

    So, no MP is running on my notebook/client without problems!

    ramu
     

    mm1352000

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

    So you have resolved the problem, but do we need to do anything about this? Is there an installer issue?

    mm
     

    ramu

    Portal Pro
    July 15, 2008
    190
    7
    AW: No database connection from client after new install?

    Hi mm,

    think You have to have a look to the installer methode which should ask for db-connection infos and should change the gentle.config file from localhost to whereever the database-server is.

    In older versions I got a setupwindow while installation which asked for the database connection and of course for the user and password. When I installed 1.2.beta this db-config-screen dindn't appear??

    I guess that's the problem...

    Now tv-server provides a gentle.config file to the clients which causes the client to look for the db-server on the loclahost, so there cound't be a real connection and for example the programm info cound not be displayed.

    Thx
    ramu
     

    Users who are viewing this thread

    Top Bottom