<div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 15, 2019 at 10:30 PM Stephen Worthington <<a href="mailto:stephen_agent@jsw.gen.nz">stephen_agent@jsw.gen.nz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, 15 Apr 2019 20:37:12 -0700, you wrote:<br>
<br>
>I seem to have introduced another way to make recordings fail with the<br>
>changes to make the IP address static. Now mythfilldatabase does not run.<br>
><br>
>First thing I thought of was that disabling the iPv6 was more than a red<br>
>herring but maybe a Black Swan. So I removed the code from the two files I<br>
>had modified to disable ipv6 and verified that they are no longer<br>
>disabled.  But mythfilldatabase still cannot find the backend.<br>
><br>
>Here is the key line<br>
>*DataDirect: Failed to get data: Download error*<br>
><br>
><br>
>I made these changes to static IP addresses 12 days ago so I run out of<br>
>schedule information tomorrow afternoon.  I felt panic setting in.<br>
><br>
>I checked with Schedules Direct just to make sure I was OK there and<br>
>Expires:Monday, June 17, 2019<br>
>So that isn't it.<br>
>I checked Mythbackend Setup and confirmed that the IP address was correct.<br>
><br>
>I added one more entry in what I did to make the IP static<br>
>broadcast 192.168.1.255  and that didn't help.<br>
><br>
>It looked like Myth was not able to access the Internet but I can FTP into<br>
>the Myth computer from my Windows PC in the other room so that seems odd.<br>
><br>
>Finally I removed my static IP address fixes and now mythfilldatabase runs.<br>
><br>
>The bad line now reads<br>
>*Downloaded 1669761 bytes *<br>
>Success<br>
><br>
>Now I have two weeks of scheduled data so that fixed the mythfildatabase<br>
>issue but now I have an unstable system that might crash in the next few<br>
>weeks.<br>
><br>
>Summary.  After setting IP address to static I could not download data from<br>
>Schedules Direct.  Removing the static settings and it works.<br>
>But this is not stable because of a bug somewhere in the system dynamic IP<br>
>drops connection occasionally.<br>
><br>
>Anyone know what I need to do to get the Static IP to work?<br>
><br>
>Allen<br>
<br>
When you assign a static IP address, is it possible to assign the same<br>
IP address as it was getting via DHCP?  That would likely work without<br>
having to change anything else.  But if you change the IP address of<br>
the box to a static IP address that is different from the one it used<br>
to get via DHCP, then there are a number places where you need to<br>
change IP address settings.  To change to a static IP address, first<br>
shut down mythfrontend, mythbackend and any other MythTV programs that<br>
may be running.  Then also shut down MySQL or MariaDB.  On Ubuntu:<br>
<br>
sudo systemctl stop mythtv-backend<br>
sudo systemctl stop mysql<br>
<br>
Then do the change to make the IP address on the box static.  You can<br>
do that via the NetworkManager GUI - select the Ethernet card you<br>
want, and Edit Connections, then change its settings to "Manual" and<br>
fill in the fields.  Or you can edit the /etc/network/interfaces file.<br>
<br>
Then check your config files for your MySQL or MariaDB setup and see<br>
if you are using the IP address anywhere in there (any files in<br>
/etc/mysql or below).  Find all places in all the config files where<br>
it says "bind-address" and change all of them that are not commented<br>
out (# at the start of the line).  If you want to allow access to the<br>
database from outside the backend PC, change them all to the new<br>
static IP address, or better change them to * or ::.  Using * only<br>
allows IPv4 access, and using :: allows IPv4 or IPv6 access.  If you<br>
only want to allow access from the backend PC, the bind-address<br>
setting should be 127.0.0.1 (or ::1 for IPv6).<br>
<br>
Then you have to change all the other places in MythTV's setup that<br>
refer to the IP address.<br>
<br>
The first place to change is in all your config.xml files, such as:<br>
<br>
/etc/mythtv/config.xml<br>
/home/mythtv/.mythtv/config.xml<br>
/home/<mythfrontend user>/.mythtv/config.xml<br>
<br>
You may have either an IP address or a hostname in those files.  If it<br>
is an IP address, you will need to change it.  If it is a hostname,<br>
check if that name is defined in /etc/hosts and if so, change it<br>
there.  The hostname could also be defined in your DNS server if you<br>
run one - if so, change it there.<br>
<br>
Then change the IP address in mythtv-setup:<br>
<br>
General > Host Address Backend Setup > Primary IP address / DNS name<br>
<br>
At this point, I think you need to reboot to bring everything up using<br>
the new static IP address.<br>
<br>
Then in each of your frontends, you may need to change the setting<br>
there also:<br>
<br>
Setup > General > Database configuration > Hostname<br>
<br>
If your frontend fails to connect, then there should be a button<br>
marked "Setup" that you can tab to and select and then it will take<br>
you to the same Hostname setting as above and allow you to change it.<br>
<br>
If you want to check all the IP address settings in your database,<br>
this should do it:<br>
<br>
sudo mysql<br>
use mythconverg;<br>
select * from settings where value='MasterServerIP' or<br>
value='BackendServerIP' or value='BackendServerAddr';<br>
quit<br>
<br>
It should show something like this:<br>
<br>
MariaDB [mythconverg]> select * from settings where<br>
value='MasterServerIP' or value='BackendServerIP' or<br>
value='BackendServerAddr';<br>
+-------------------+----------+----------+<br>
| value             | data     | hostname |<br>
+-------------------+----------+----------+<br>
| BackendServerAddr | 10.0.2.4 | mypvr    |<br>
| BackendServerIP   | 10.0.2.4 | mypvr    |<br>
| MasterServerIP    | 10.0.2.4 | NULL     |<br>
+-------------------+----------+----------+<br>
3 rows in set (0.00 sec)<br>
<br>
I think there should be BackendServerAddr and BackendServerIP settings<br>
for each frontend hostname, and one MasterServerIP setting with NULL<br>
hostname for the backend.<br>
_______________________________________________<br></blockquote><div><br></div><div>Thanks for your quick responses. I just had a chance to try another fix and it worked.</div><div><br></div><div>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.</div><div><br></div><div>The fix was to add some name servers.  These are universal Google name server addresses.</div><div><br></div><div><b>dns-nameservers 8.8.8.8   8.8.4.4</b></div><div><b><br></b></div><div>So the new file looks like this</div><div><div><b>auto lo</b></div><div><b>iface lo inet loopback</b></div><div><b>auto enp2s0</b></div><div><b>iface enp2s0 inet static</b></div><div><b>    address 192.168.1.111</b></div><div><b>    netmask 255.255.255.0</b></div><div><b>    gateway 192.168.1.1</b></div><div><b>    broadcast 192.168.1.255</b></div></div><div><b>    dns-nameservers 8.8.8.8   8.8.4.4  </b><br></div><div><b><br></b></div><div>Obviously the issue was it could not find Schedules Direct. </div><div>I found this helpful <a href="https://michael.mckinnon.id.au/2016/05/05/configuring-ubuntu-16-04-static-ip-address/">https://michael.mckinnon.id.au/2016/05/05/configuring-ubuntu-16-04-static-ip-address/</a></div><div><br></div><div>Allen</div><div><br></div><div> </div></div></div></div>