[Bug] DB address not correctly set in multi-seat installation. (1 Viewer)

infinite.loop

Retired Team Member
  • Premium Supporter
  • December 26, 2004
    16,163
    4,133
    127.0.0.1
    Home Country
    Austria Austria
    and exactly as I expected your servers gentle.config shows "localhost" - so a client can't connect to the MySql service for obvious reasons. ;)

    <DefaultProvider name="MySQL" connectionString="Server=localhost;Database=MpTvDb;User ID=root;Password=MediaPortal;charset=utf8;Connection Timeout=30;" />
    The installer always fills in the hostname on a clean install. So I guess you entered "localhost" manually somehow?
     

    Atomic7431

    Portal Pro
    June 17, 2011
    497
    71
    Home Country
    United Kingdom United Kingdom
    thats the first time ive altered the config on the tv server ever. infact until last night i did not have a key to use the correct program to alter that file. and i never manually changed the ip or hostname until now.
    I never had to change the streaming server settings until now, on an older build they just worked, i entered the hostname on the client machine and it just connected no issues, until i did a complete uninstall on both machines and then installed the rc1 and suddenly i had these issues.
     

    infinite.loop

    Retired Team Member
  • Premium Supporter
  • December 26, 2004
    16,163
    4,133
    127.0.0.1
    Home Country
    Austria Austria
    thats the first time ive altered the config on the tv server ever. infact until last night i did not have a key to use the correct program to alter that file. and i never manually changed the ip or hostname until now.
    I never had to change the streaming server settings until now, on an older build they just worked, i entered the hostname on the client machine and it just connected no issues, until i did a complete uninstall on both machines and then installed the rc1 and suddenly i had these issues.
    The upgrade does not change the gentle.config, so it was like this before you upgraded to 1.2.0 RC.

    "Why" you have "localhost" in the servers gentle.conf I do not know. :confused:
    The automatic installation definitly always inserts the hostname....

    So right now I can only set this thread to "not reproducible". :(
     

    Atomic7431

    Portal Pro
    June 17, 2011
    497
    71
    Home Country
    United Kingdom United Kingdom
    Later i may be able to check the config file before i changed to rc1, as i took an image just incase all went down the pan, ill check it and let you know in due course.
     

    karniemi

    Portal Pro
    November 11, 2010
    65
    12
    Hmmm...I'll have to check my tvserver as well -as a user I really could not have known that the DB address is picked by the client from servers configs...=). More natural to me would have that it would have used the servers IP as the DB address as well.

    -I cannot remember which was the first version of MediaPortal that I installed on my server. I wonder if the upgrade path is visible somewhere... I'm pretty sure I never entered "localhost" there myself.
    -I'm just wondering why you say it's "for obvious reasons". For servers configuration is should be OK to have there the localhost as DB address -because it is the servers configuration file-it tells the server where the DB can be found. Why does the client copy that configuration blindly in the background without telling the user or giving the user any option? I think it's "for obvious reasond" only if you know what it's doing in the background...otherwise...it's not that logical to me ... =)
    -BTW, my server also has the client installed as it's connected to our TV on the living room. Just to notice, if the installer works differently when installing only the server or server+client on the machine.

    But I'll check my servers config (and the upgrade path if it's available so we get the root cause for this issue....).

    -Checked my server node: in both Gentle.conf files I do have the IP -so not "localhost" there at all... (There are two files of course because I also have the client installed on the server node.). So... it seems the client did not pick "localhost" entry from the server. Or....oops...I just installed 1.2.0RC also on the server this morning and I had the problem with the client yesterday...so maybe the RC just fixed the configs on the server? I love making up hypothesis -it gives you more freedom that sticking to reality and facts :)...
     

    karniemi

    Portal Pro
    November 11, 2010
    65
    12
    Here are the logs from my client which got the "localhost" as DB address in installation (I really first configured the wrong IP address, if that's visible in the logs. I'm using IP addresses because I'm not quite sure if my intra setup allows me to use hostnames...would it require netbios or dhcp or something...). And sorry for not attaching these right from the start...I'm just learning how to report issues...:sorry:
     

    karniemi

    Portal Pro
    November 11, 2010
    65
    12
    Just wondering, when does the Mediaportal client try to decide the DB address?
    -it's not asking for it during installation -so propably the Gentle.conf gets some default? maybe "localhost"?
    -when started for the first time it actually starts the configuration tool, where I enter the tvserver address, but not the DB address. Is it then trying to contact tvserver to get the DB address and store it in Gentle.conf? If it does, what if tvserver is not up yet(WOL not working or something else)?
    -when starting the client again, after first configuration is done, does it try to connect server to find out the DB address from the server? If it does, what if tvserver is not up yet(WOL not working or something else)?

    Whereever it tries to find out&store the DBs IP address, it seems to have failed since it kept the assumed (by me) default "localhost" in Gentle.conf...
     

    infinite.loop

    Retired Team Member
  • Premium Supporter
  • December 26, 2004
    16,163
    4,133
    127.0.0.1
    Home Country
    Austria Austria
    Here are the logs from my client which got the "localhost" as DB address in installation (I really first configured the wrong IP address, if that's visible in the logs. I'm using IP addresses because I'm not quite sure if my intra setup allows me to use hostnames...would it require netbios or dhcp or something...). And sorry for not attaching these right from the start...I'm just learning how to report issues...:sorry:
    I need the gentle.config from the TV-Server and the client.
     

    infinite.loop

    Retired Team Member
  • Premium Supporter
  • December 26, 2004
    16,163
    4,133
    127.0.0.1
    Home Country
    Austria Austria
    Just wondering, when does the Mediaportal client try to decide the DB address?
    The MP Client on a different PC than the server, asks you for the TV-Servers hostname (i.e. when entering MyTv the first time).
    After you enter that info, the client connects to the TV-Server and asks him for the databaseconnection string / details.

    Whereever it tries to find out&store the DBs IP address, it seems to have failed since it kept the assumed (by me) default "localhost" in Gentle.conf...
    It is not your client which fails. The issue is allready inside the TV-servers gentle.config.
    Inside that "localhost" is used for the SQL connection.
    While this does work on the server because the SQL install is "local", It can not work on any client on an other PC because using "localhost" there means that the client tries to find the SQL server on the client.

    This is why "localhost" must never be used when setting up the server, or clients on other PC's can not connect to the DB.

    In 1.3.0 we will take measures to prevent that configuration error, however it was done (by user or some glitch in the OS/installer/present SQL installation)
     

    karniemi

    Portal Pro
    November 11, 2010
    65
    12
    Oops, now I feel even more lazy & stupid. Seems that this is a known issue without any fixes implemented yet.
    https://forum.team-mediaportal.com/...se-connection-client-after-new-install-96141/

    (I tried to check the code as well, but it's so sweet macaroni that it's difficult to get the grip of it this fast. I've worked a lot maintaining some spaghetti code and I hated it- Later been working with the macaroni code...I'm not quite sure which I like better =)...with spaghetti you have at least something pull from -with macaroni you get lots of pieces here and there not seeing how it all flows together...=)...)
     

    Users who are viewing this thread

    Top Bottom