[mythtv-users] Recording failure.
Allen Edwards
allen.p.edwards at gmail.com
Tue Apr 16 05:48:14 UTC 2019
On Mon, Apr 15, 2019 at 10:30 PM Stephen Worthington <
stephen_agent at jsw.gen.nz> wrote:
> 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 192.168.1.255 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 *
> >Success
> >
> >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
> >weeks.
> >
> >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?
> >
> >Allen
>
> 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 127.0.0.1 (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:
>
> /etc/mythtv/config.xml
> /home/mythtv/.mythtv/config.xml
> /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';
> quit
>
> It should show something like this:
>
> MariaDB [mythconverg]> select * from settings where
> value='MasterServerIP' or value='BackendServerIP' or
> value='BackendServerAddr';
> +-------------------+----------+----------+
> | value | data | hostname |
> +-------------------+----------+----------+
> | BackendServerAddr | 10.0.2.4 | mypvr |
> | BackendServerIP | 10.0.2.4 | mypvr |
> | MasterServerIP | 10.0.2.4 | 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.
> _______________________________________________
>
Thanks for your quick responses. I just had a chance to try another fix and
it worked.
First, I have always used 192.168.1.111 as the IP address even when it was
dynamic. I have that IP entered in the backend as the IP address and always
have.
The fix was to add some name servers. These are universal Google name
server addresses.
*dns-nameservers 8.8.8.8 8.8.4.4*
So the new file looks like this
*auto lo*
*iface lo inet loopback*
*auto enp2s0*
*iface enp2s0 inet static*
* address 192.168.1.111*
* netmask 255.255.255.0*
* gateway 192.168.1.1*
* broadcast 192.168.1.255*
* dns-nameservers 8.8.8.8 8.8.4.4 *
Obviously the issue was it could not find Schedules Direct.
I found this helpful
https://michael.mckinnon.id.au/2016/05/05/configuring-ubuntu-16-04-static-ip-address/
Allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20190415/9bfb508c/attachment.html>
More information about the mythtv-users
mailing list