Gentle.config for MP1 client running against MP2Server with TVE3?

Discussion in 'General' started by pnyberg, July 17, 2015.

  1. pnyberg

    pnyberg Portal Pro

    Joined:
    August 21, 2006
    Messages:
    405
    Likes Received:
    18
    Occupation:
    IT professional
    Location:
    Stockholm
    Ratings:
    +19 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
    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?
     

    Attached Files:

  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    10,946
    Likes Received:
    4,712
    Ratings:
    +6,752 / 11
    Home Country:
    Germany Germany
    Show System Specs
    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
     
    • Like Like x 1
  4. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    10,946
    Likes Received:
    4,712
    Ratings:
    +6,752 / 11
    Home Country:
    Germany Germany
    Show System Specs
    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!
     
    • Like Like x 1
  5. pnyberg

    pnyberg Portal Pro

    Joined:
    August 21, 2006
    Messages:
    405
    Likes Received:
    18
    Occupation:
    IT professional
    Location:
    Stockholm
    Ratings:
    +19 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
    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.
     
  6. pnyberg

    pnyberg Portal Pro

    Joined:
    August 21, 2006
    Messages:
    405
    Likes Received:
    18
    Occupation:
    IT professional
    Location:
    Stockholm
    Ratings:
    +19 / 0
    Home Country:
    Sweden Sweden
    Show System Specs
    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)!
     
    • Like Like x 2
  7. Meier

    Meier Portal Pro

    Joined:
    November 1, 2006
    Messages:
    242
    Likes Received:
    22
    Ratings:
    +30 / 0
    Home Country:
    Germany Germany
    Show System Specs
    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.
     
    • Like Like x 1
  8. megahorst
    • Super User

    megahorst Super User

    Joined:
    July 8, 2006
    Messages:
    878
    Likes Received:
    173
    Ratings:
    +271 / 0
    Home Country:
    Germany Germany
    Show System Specs
    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?
     
  9. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    10,946
    Likes Received:
    4,712
    Ratings:
    +6,752 / 11
    Home Country:
    Germany Germany
    Show System Specs
    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()
     
    • Thank You! Thank You! x 1
  10. megahorst
    • Super User

    megahorst Super User

    Joined:
    July 8, 2006
    Messages:
    878
    Likes Received:
    173
    Ratings:
    +271 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Thx!
    Can you give me a hint where to change the provider?
     
  11. morpheus_xx
    • Team MediaPortal

    morpheus_xx Lead Dev MP2

    Joined:
    March 24, 2007
    Messages:
    10,946
    Likes Received:
    4,712
    Ratings:
    +6,752 / 11
    Home Country:
    Germany Germany
    Show System Specs
    The gentle.config contained in C:\Program Files (x86)\Team MediaPortal\MP2-Server\Plugins\SlimTv.Service3\Gentle.config

    Looks like:
    Code (XML):
    1.   <!--<DefaultProvider name="MySQL" connectionString="Server=-;Database=MpTvDb;User ID=root;Password=MediaPortal;charset=utf8;Connection Timeout=300;" />-->
    2.   <DefaultProvider name="SQLite" connectionString="Data Source=C:\ProgramData\Team MediaPortal\MP2-Server\Database\MP2TVE_3.s3db;Pooling=true;FailIfMissing=true;Version=3" />
    3.  
    Change it too:
    Code (XML):
    1.   <DefaultProvider name="MySQL" connectionString="Server=-;Database=MpTvDb;User ID=root;Password=MediaPortal;charset=utf8;Connection Timeout=300;" />
    2.   <!--<DefaultProvider name="SQLite" connectionString="Data Source=C:\ProgramData\Team MediaPortal\MP2-Server\Database\MP2TVE_3.s3db;Pooling=true;FailIfMissing=true;Version=3" />-->
    3.  
     
    • Thank You! Thank You! x 1
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!