Gentle.config for MP1 client running against MP2Server with TVE3? (2 Viewers)

pnyberg

Portal Pro
August 21, 2006
405
36
Stockholm
Home Country
Sweden Sweden
Hi, I am testing the latest MP2 Server with TVE3 support.

I have the server up and running and the tuners and Everything is working locally on the server.

But when testing with a remote MP1 client it does not work, it is related to the SQLite DB used in MP2.
But I can't figure out how to edit the gentle.config on the MP1 client...

I am using MS SQL Express in my MP1 TvE3 server.

I have tried editing the gentle.config on the MP1 client - but to no avail.
Attaching the client error log and my gentle.config on the client as well.

Should I use an UNC path to the SQLite file perhaps, in order for the MP1 client to open the file?
The gentle.config file attached is the config which is working with my MP1 TVE3 server against the SQL server backend,
but I suspect you could give my pointers anyway?
 

Attachments

  • Gentle.config.txt
    5.7 KB

morpheus_xx

Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    I think you need:
    • Add a share to server that exposes \ProgramData\Team MediaPortal\MP2-Server\Database folder
    • Add UNC share to gentle.config, pointing to the s3db
    • Copy the files Gentle.Provider.SQLite.dll and System.Data.SQLite.DLL to MP1 client folder
    This should make the access basically working. But there will be other issues, i.e. TV Guide might not work, as it tries to access DB directly. And this "feature" doesn't know about Sqlite.

    Edit: Here is a link to the gentle config used in MP2: https://github.com/morpheusxx/Media...ne.Core3/content/References/Gentle.config#L85
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    Another idea could be to try to connect the MP2-TVE3 plugin to your existing MSSQL DB. Therefor you would need to copy the one from MP1 to: C:\ProgramData\Team MediaPortal\MP2-Server\SlimTVCore\Gentle.config

    I've never tested this, but I am curious if this works. So please report back once you have tried this!
     

    pnyberg

    Portal Pro
    August 21, 2006
    405
    36
    Stockholm
    Home Country
    Sweden Sweden
    Hi morpheus_xx,

    Added the .dlls into the MP1 folder, then it did not complain about the providers anymore, thanks.
    However, when chaning the Connection string to UNC, it does not work, because the MP1 client seems to inherent the setting from MP2TVE3, because the connecion string Changes to "C:\Med.." again upon start - and I get the error - unreachable instead.

    So as you say it seems my only option is to test your other suggestion.
    So it should only be to change the gentle.config on the MP2 server - and it will re-create a DB in SQL Express instead?
    I will test and report back,

    Thanks in advance.
     

    pnyberg

    Portal Pro
    August 21, 2006
    405
    36
    Stockholm
    Home Country
    Sweden Sweden
    Success morpheus_xx!

    Everything seems to work exactly as for my MP1 TVE3 server! Even the TV Guide.

    So in order to get a remote MP1 client to work against a MP2 TVE3 backend server, you need to have a non-file based DB such as MS SQL Express, which is by default accessible over the network.

    So what I did to get it to work:

    1. Install MP2 Server (and client) on backend server.

    2. Edit "ProgramData\Team MediaPortal\MP2-Server\SlimTVCore\gentle.config" to use MS SQLServer provider:
      <DefaultProvider name="SQLServer" connectionString="Password=password;Persist Security Info=True;User ID=sa;Initial Catalog=MpTvDb2_TVE3;Data Source=servername;Connection Timeout=30;" />
      In my case I wanted a new DB - "MPTVDB2_TVE3".

    3. Restart the MP2-Server, which will create the new DB, I got a lot of errors in server.log during first restart, but the DB was created anyway. To remedy I restarted the MP2-Server again - which started okay.

    4. Configure the TV server by running "SetupTV.exe" for MP2.

    5. Start a remote MP1 client - everything should work as before (as running against an MP1 TVE3 server, that is)
    Perfect, now I can run my normal MP1 "production" clients as well as test the new MP2 client at the same time!

    Excellent work morpheus_xx (and everybody else in the team ofc)!
     

    Meier

    Portal Pro
    November 1, 2006
    242
    30
    Home Country
    Germany Germany
    Hi.
    It's working for me aswell - but I also had to modify the file C:\Program Files (x86)\Team MediaPortal\MP2-Server\Plugins\SlimTv.Service3\Gentle.config and it was only working if I used the MP1 TV Database - a new one was not created.
     

    megahorst

    Super User
  • Team MediaPortal
  • Super User
  • July 8, 2006
    879
    259
    Home Country
    Germany Germany
    Another idea could be to try to connect the MP2-TVE3 plugin to your existing MSSQL DB. Therefor you would need to copy the one from MP1 to: C:\ProgramData\Team MediaPortal\MP2-Server\SlimTVCore\Gentle.config

    I've never tested this, but I am curious if this works. So please report back once you have tried this!

    I'm trying a smooth migration of my environment to MePo 2. Therefore I need the server to be able to serve TV to MePo 1 and MePo 2 clients in parallel.
    What I have done so far:
    installed the MePo2 server,
    copied the gentle.config from the MePo1 TV server to C:\ProgramData\Team MediaPortal\MP2-Server\SlimTVCore\v3.0,
    disabled the MePo1 TV-Server and have tried to start the TV cionfig of the MePo2 server.
    I get the following error:
    upload_2015-10-2_9-47-51.png


    The TV-Service did not start.
    Any ideas?
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    There is a mismatch between provider type and connection string: You have SQLite provider but seem to use a MySQL connection string.

    Gentle.Common.GentleException: The database backend (provider SQLite) could not be reached.
    Check the connection string: Server=192.168.1.6;Database=MpTvDb;User ID=root;Password=MediaPortal;charset=utf8;Connection Timeout=30; ---> System.ArgumentException: Data Source cannot be empty. Use :memory: to open an in-memory database
    bei System.Data.SQLite.SQLiteConnection.Open()
    bei Gentle.Provider.SQLite.SQLiteProvider.GetConnection()
    --- Ende der internen Ausnahmestapelüberwachung ---
    bei Gentle.Common.Check.FailWith(Severity severity, Error error, Exception e, String msg)
    bei Gentle.Common.Check.Fail(Exception e, Error error, Object[] args)
    bei Gentle.Provider.SQLite.SQLiteProvider.GetConnection()
    bei Gentle.Framework.PersistenceBroker.Execute(SqlStatement stmt, IDbConnection dbConnection, IDbTransaction dbTransaction)
    bei TvDatabase.TvBusinessLayer.GetSetting(String tagName, String defaultValue)
    bei TvService.TvServiceThread.StartPlugins()
    bei TvService.TvServiceThread.OnStart()System.ArgumentException: Data Source cannot be empty. Use :memory: to open an in-memory database
    bei System.Data.SQLite.SQLiteConnection.Open()
    bei Gentle.Provider.SQLite.SQLiteProvider.GetConnection()
     

    megahorst

    Super User
  • Team MediaPortal
  • Super User
  • July 8, 2006
    879
    259
    Home Country
    Germany Germany
    There is a mismatch between provider type and connection string: You have SQLite provider but seem to use a MySQL connection string.

    Thx!
    Can you give me a hint where to change the provider?
     

    morpheus_xx

    Retired Team Member
  • Team MediaPortal
  • March 24, 2007
    12,073
    7,459
    Home Country
    Germany Germany
    The gentle.config contained in C:\Program Files (x86)\Team MediaPortal\MP2-Server\Plugins\SlimTv.Service3\Gentle.config

    Looks like:
    XML:
      <!--<DefaultProvider name="MySQL" connectionString="Server=-;Database=MpTvDb;User ID=root;Password=MediaPortal;charset=utf8;Connection Timeout=300;" />-->
      <DefaultProvider name="SQLite" connectionString="Data Source=C:\ProgramData\Team MediaPortal\MP2-Server\Database\MP2TVE_3.s3db;Pooling=true;FailIfMissing=true;Version=3" />

    Change it too:
    XML:
      <DefaultProvider name="MySQL" connectionString="Server=-;Database=MpTvDb;User ID=root;Password=MediaPortal;charset=utf8;Connection Timeout=300;" />
      <!--<DefaultProvider name="SQLite" connectionString="Data Source=C:\ProgramData\Team MediaPortal\MP2-Server\Database\MP2TVE_3.s3db;Pooling=true;FailIfMissing=true;Version=3" />-->
     

    Users who are viewing this thread

    Top Bottom