Unable to change database connection (1 Viewer)

fe31nz

Portal Member
July 3, 2008
5
0
Home Country
New Zealand New Zealand
Mediaportal version 1.7.1

I am running TV Server on my main Window 7 PC. This has two ethernet cards, on addresses 10.0.1.2 (savaidh) and 10.0.2.2 (savaidhg). I have Mediaportal running on the same PC, and also on my laptop (Windows 7 also). The laptop has TV Server and MySQL installed also, but not running. This setup has been working fine for years through various upgrades, but now the laptop does not connect correctly to the MySQL server on the the main PC. The upgrade that broke things was to change from the main PC being the router/firewall that forwarded IP packets between my 10.0.1.x and 10.0.2.x subnets to using a separate router box to do the forwarding. That involved tightening up the firewall settings, so that things on the 10.0.2.x subnet were able to send packets out to the 10.0.1.x subnet, but the other direction was blocked except for specific IP address and port combinations.

After installing the new router, I discovered that the laptop was set to talk to TV Server and MySQL on the main PC using the "savaidh" address (10.0.1.2), when it should all along have been using the "savaidhg" address (10.0.2.2) as the laptop is on the 10.0.2.x subnet (10.0.2.14). This worked before because the firewalling was lax and allowed the packets back and forth through the main PC between its two ethernet interfaces. I thought this would be easy to fix - just change the settings on the laptop to use the correct address. So, I ran the configuration.exe program and changed the laptop's TV Server address setting from "savaidh" to "savaidhg", and when I clicked on the Test Connection button, it said it could connect. I clicked on OK, then tried to run mediaportal.exe again. But it still could not connect, with exactly the same symptoms.

After some debugging, I discovered that the address had only been updated in Mediaportal.xml, but not in Gentle.config, so mediaportal.exe could talk to the TV Server, but not to the MySQL database. If I add a hosts file entry to override the address "savaidh" to be 10.0.2.2 instead of 10.0.1.2, then it works. But I have not found any way of getting the address in Gentle.config to update. If I change it manually, it gets overwritten when configuration.exe closes, and also when mediaportal.exe runs, and always gets set back to the wrong value of "savaidh" instead of "savaidhg". I have tried putting an invalid address into the configuration.exe setting, closing and reopening configuration.exe and then putting in the correct address, but the value in Gentle.config never changes. So where is this wrong "savaidh" address still coming from? And how do I change it?
 

fe31nz

Portal Member
July 3, 2008
5
0
Home Country
New Zealand New Zealand
I have found a workaround for this problem. If I edit Gentle.config and change "saviadh" to "savaidhg", then put the read-only attribute on the file, it all works properly.
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,578
    8,228
    Home Country
    New Zealand New Zealand
    So where is this wrong "savaidh" address still coming from? And how do I change it?
    The server. The server has a gentle.config file too. That file is copied to the clients. So I'd suggest to try and fix the server's file.
     

    fe31nz

    Portal Member
    July 3, 2008
    5
    0
    Home Country
    New Zealand New Zealand
    Thank you, that fixed it. Unfortuntately, Windows 7 did a bad boot the first time I tried it and was doing wierd things, so it did not work at first. But after I rebooted the laptop again, then it copied the fixed client Gentle.config file from the server box and it all worked again.
     

    Users who are viewing this thread

    Top Bottom