[mythtv-users] Recording failure.

Stephen Worthington stephen_agent at jsw.gen.nz
Tue Apr 16 05:30:05 UTC 2019

On Mon, 15 Apr 2019 20:37:12 -0700, you wrote:

>I seem to have introduced another way to make recordings fail with the
>changes to make the IP address static. Now mythfilldatabase does not run.
>First thing I thought of was that disabling the iPv6 was more than a red
>herring but maybe a Black Swan. So I removed the code from the two files I
>had modified to disable ipv6 and verified that they are no longer
>disabled.  But mythfilldatabase still cannot find the backend.
>Here is the key line
>*DataDirect: Failed to get data: Download error*
>I made these changes to static IP addresses 12 days ago so I run out of
>schedule information tomorrow afternoon.  I felt panic setting in.
>I checked with Schedules Direct just to make sure I was OK there and
>Expires:Monday, June 17, 2019
>So that isn't it.
>I checked Mythbackend Setup and confirmed that the IP address was correct.
>I added one more entry in what I did to make the IP static
>broadcast  and that didn't help.
>It looked like Myth was not able to access the Internet but I can FTP into
>the Myth computer from my Windows PC in the other room so that seems odd.
>Finally I removed my static IP address fixes and now mythfilldatabase runs.
>The bad line now reads
>*Downloaded 1669761 bytes *
>Now I have two weeks of scheduled data so that fixed the mythfildatabase
>issue but now I have an unstable system that might crash in the next few
>Summary.  After setting IP address to static I could not download data from
>Schedules Direct.  Removing the static settings and it works.
>But this is not stable because of a bug somewhere in the system dynamic IP
>drops connection occasionally.
>Anyone know what I need to do to get the Static IP to work?

When you assign a static IP address, is it possible to assign the same
IP address as it was getting via DHCP?  That would likely work without
having to change anything else.  But if you change the IP address of
the box to a static IP address that is different from the one it used
to get via DHCP, then there are a number places where you need to
change IP address settings.  To change to a static IP address, first
shut down mythfrontend, mythbackend and any other MythTV programs that
may be running.  Then also shut down MySQL or MariaDB.  On Ubuntu:

sudo systemctl stop mythtv-backend
sudo systemctl stop mysql

Then do the change to make the IP address on the box static.  You can
do that via the NetworkManager GUI - select the Ethernet card you
want, and Edit Connections, then change its settings to "Manual" and
fill in the fields.  Or you can edit the /etc/network/interfaces file.

Then check your config files for your MySQL or MariaDB setup and see
if you are using the IP address anywhere in there (any files in
/etc/mysql or below).  Find all places in all the config files where
it says "bind-address" and change all of them that are not commented
out (# at the start of the line).  If you want to allow access to the
database from outside the backend PC, change them all to the new
static IP address, or better change them to * or ::.  Using * only
allows IPv4 access, and using :: allows IPv4 or IPv6 access.  If you
only want to allow access from the backend PC, the bind-address
setting should be (or ::1 for IPv6).

Then you have to change all the other places in MythTV's setup that
refer to the IP address.

The first place to change is in all your config.xml files, such as:

/home/<mythfrontend user>/.mythtv/config.xml

You may have either an IP address or a hostname in those files.  If it
is an IP address, you will need to change it.  If it is a hostname,
check if that name is defined in /etc/hosts and if so, change it
there.  The hostname could also be defined in your DNS server if you
run one - if so, change it there.

Then change the IP address in mythtv-setup:

General > Host Address Backend Setup > Primary IP address / DNS name

At this point, I think you need to reboot to bring everything up using
the new static IP address.

Then in each of your frontends, you may need to change the setting
there also:

Setup > General > Database configuration > Hostname

If your frontend fails to connect, then there should be a button
marked "Setup" that you can tab to and select and then it will take
you to the same Hostname setting as above and allow you to change it.

If you want to check all the IP address settings in your database,
this should do it:

sudo mysql
use mythconverg;
select * from settings where value='MasterServerIP' or
value='BackendServerIP' or value='BackendServerAddr';

It should show something like this:

MariaDB [mythconverg]> select * from settings where
value='MasterServerIP' or value='BackendServerIP' or
| value             | data     | hostname |
| BackendServerAddr | | mypvr    |
| BackendServerIP   | | mypvr    |
| MasterServerIP    | | NULL     |
3 rows in set (0.00 sec)

I think there should be BackendServerAddr and BackendServerIP settings
for each frontend hostname, and one MasterServerIP setting with NULL
hostname for the backend.

More information about the mythtv-users mailing list