[mythtv-users] Python3 interface: Could not find setting 'BackendServerAddr' on host '192.168.1.10' [work-around]

Roland Ernst rcrernst at gmail.com
Wed Feb 26 22:06:52 UTC 2020


On Mon, Feb 24, 2020 at 10:33 PM Ross Boylan
<rossboylan at stanfordalumni.org> wrote:
>
>
>
> On Mon, Feb 24, 2020 at 12:20 PM Peter Bennett <pb.mythtv at gmail.com> wrote:
>>
>>
>>
>> On 2/24/20 3:01 PM, Ross Boylan wrote:
>>
>> The workaround is to add an entry to the settings table in the form the program wants.
>>
>> I'm not sure if the lack of the appropriate entry originally indicates
>> 1. I misconfigured my setup
>> 2. the code has a bug
>> 3. the code is correct for the v31 schema but not for v30.
>> 4. something else
>>
>> From settings table:
>> | value             | data                | hostname |
>> +-------------------+---------------------+----------+
>> | AllowConnFromAll  | 0                   | barley   |
>> | BackendServerAddr | myth.betterworld.us | barley   |
>> | BackendServerAddr | 192.168.1.10        | barley   |
>> | ListenOnAllIps    | 1                   | barley   |
>> | MasterServerIP    | 192.168.1.10        | NULL     |
>> | MasterServerName  | barley              | NULL     |
>> +-------------------+---------------------+----------+
>>
>> The entry for BackendServerAddr | 192.168.1.10 is one I added recently; with that I am  able to get past the error I reported.
>> I initially used myth.betterworld.us as the hostname, but that didn't match my existing entry for BackendServerPort.
>> myth.betterworld.us, barley, and 192.168.1.10 are all the same machine, the one on which I'm running.
>>
>>
>>
>> BackendServerAddr and MasterServerName replaced MasterServerIP in V30, but if you have not done any update since V29 it may not have been set up. I believe the code will still use MasterServerIp if BackendServerAddr and MasterServerName are not set up..
>>
>> You can set it up by running mythtv-setup -> General -> Host Address Backend Setup on the machine in question. The entry for "Primary IP Address/DNS Name" is what is used for BackendServerAddr.
>>
>> I don't know what happens if you have two entries for the same hostname. That should not be allowed.
>>
>
> Thanks for the tip about double entries; since it's apparently not supposed to be, it seemed safest to fix it the same way I created it, using SQL directly.
> I deleted the old entry with the hostname as the data field, and left the new one with the IP address.
>
> I recall during setup some uncertainty about whether I should be using a name or an IP at various points.  Having a hard-coded IP seems a bit problematic if the host has a dynamic IP (not currently an issue for me, though if I stick the BE in a VM it might be).
>
> Ross


Ross,
Thank You for your report about canonical addressing in the Python Bindings.

I created ticket #13593 upon your finding at
https://code.mythtv.org/trac/ticket/13593

Could you please apply the proposed patch in this ticket and
restore the database to the canonical IP addressing scheme, like

| BackendServerAddr | myth.betterworld.us | barley |

 and run the attached test file?

The attached test file does not alter yourt MythTv system in any way.

The file should report instead of an IP address '10.0.0.XXX'
the canonical address of your MythTV system
and report something like

$ python3 test_canonical_address.py
host : myserver
Master-Backend IP: 10.0.0.XXX
Hash1 : f78f3ddee497d3e8
Hash2 : f78f3ddee497d3e8
host-ip1 : 10.0.0.XXX
BackendServerPort1 : 6543
host-ip2 : 10.0.0.XXX
BackendServerPort2 : 6543
host-ip3 : 10.0.0.XXX
BackendServerPort3 : 6543

Roland
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_canonical_address.py
Type: text/x-python
Size: 1099 bytes
Desc: not available
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20200226/c7bf18c4/attachment.py>


More information about the mythtv-users mailing list