Wiki Navigation
- Loading...
Overview
If you have problems with the connection of your MediaPortal Client to the TV Server you should carefully read this page.
TV Server Connection
The MediaPortal Client needs a connection to the MediaPortal TV Server for TV and Radio sections to work. The TV Server may be installed on the same PC as the MP Client (single-seat) or on a different machine (remote server).
In any case the hostname of the machine running the TV Server must be filled into the Hostname field in the TV Client section of the MediaPortal Configuration (here: "SERVER"). You may leave the field empty, if you have a single-seat setup. Then MediaPortal will fill in the local host's name automatically.
To verify that the TV Server can be connected press the Test Connection button.
If the connection is successful, you'll see the Hostname field turn green and you will receive a popup stating the connection to the TV Server is successful.
If the connection fails, you will receive a popup stating the connection to the TV Server failed and the Hostname field will turn red. See the error message in the popup to get an idea of what is wrong:
- Unable to detect host "xyz"
This means that the machine "xyz" in the Hostname field could not be found in the network - either because it does not exist or because it is down.
Make sure that you have written the hostname correctly and the machine is running and accepts ping requests
- Unable to connect to TV Server on host "xyz" / Unable to get data from TV Server on host "xyz"
This means that the machine "xyz" could be contacted, but the TV Server is not running on this machine.
Launch Services from the Windows Control Panel - Administrative Tools on this machine and have a look at the TvService. If you cannot find it, check if the MediaPortal TV Server is installed correctly on this machine. If it is listed, Start or Restart it and test connection again.
If you could establish a connection, close the MediaPortal Configuration tool with OK.
This will also update the connection to the TV Server database. There will be an error message if the update fails.
Important:
Do not edit the hostname in the MediaPortal.xml file manually, since the database connection will not be updated then.
Tip:
The database connection is only updated if the hostname has been modified. To force this, save the configuration settings once with an invalid hostname (ignore the error message). Then restart the MediaPortal Configuration, fill in the correct hostname and save the configuration settings again.
Database Connection
In addition to the connection to the TV Server the MediaPortal Client also must have direct access to the TV Server's database. The database connection is configured in the client's gentle.config file which is located in the MP client data directory (C:\ProgramData\Team MediaPortal\MediaPortal). This file is updated every time a new hostname for the TV Server is configured.
The typical symptom for a bad database connection is an empty TV or Radio guide (no channels listed and the Channel Group button is missing):
In the MP client's error.log file (in C:\ProgramData\Team MediaPortal\MediaPortal\log) you will find something like this:
Gentle.Common.GentleException: The database backend (provider MySQL) could not be reached. Check the connection string: Server=SERVER;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()
If you experience such symptoms, you should first check that the connection to the TV Server is configured correctly (see above). This is important since the database connection string in the gentle.config file can and will be updated only if the TV Server is connected.
Tip:
Do not edit the gentle.config file manually. If it cannot be updated automatically you should copy the gentle.config file from the TV Server's directory (C:\ProgramData\Team MediaPortal\MediaPortal TV Server) to the client (C:\ProgramData\Team MediaPortal\MediaPortal) and then run the MediaPortal Configuration to setup the connection to the TV Server.
This page has no comments.