[mythtv-users] One step forward, two steps back - Frontends not woring properly

Damian myth at surr.co.uk
Sun May 1 23:42:32 UTC 2016


On 30/04/2016 19:13, Stephen Worthington wrote:
> On Sat, 30 Apr 2016 16:35:39 +0100, you wrote:
>
>> On 30/04/2016 07:43, Stephen Worthington wrote:
>>
>>> On Sat, 30 Apr 2016 01:14:35 +0100, you wrote:
>>>
>>>> On 30/04/2016 00:26, Mark Perkins wrote:
>>>>>> On 29/04/2016 23:13, Damian wrote:
>>>>>>
>>>>>>> On 29/04/2016 23:09, Thomas Mashos wrote:
>>>>>>>
>>>>> ...snip...
>>>>>>> On your backend, is mysql listening on the right addresses?
>>>>>>> -- 
>>>>>>> Thomas Mashos
>>>>>> Hi Thomas,
>>>>>>
>>>>>> I can log in with ...
>>>>>> mysql -u mythtv -p -h 192.168.0.2
>>>>>>
>>>>>> Does that answer your question? If it doesn't, I'm afraid I don't understand the question well enough. Is there a command that I should run to test it?
>>>>>>
>>>>>> Thanks,
>>>>>> Damian
>>>>> To check whether mysql is listening on the right address run this command as root user
>>>>> netstat -tulpn | grep 3306
>>>> Hi Mark,
>>>>
>>>> Here's the output from that:
>>>>
>>>> $ netstat -tulpn | grep 3306
>>>> (Not all processes could be identified, non-owned process info
>>>>    will not be shown, you would have to be root to see it all.)
>>>> tcp6       0      0 :::3306                 :::* LISTEN      -
>>>>
>>>> and with sudo ...
>>>>
>>>> sudo netstat -tulpn | grep 3306
>>>> tcp6       0      0 :::3306                 :::* LISTEN      819/mysqld
>>>>
>>>> I'm guessing, from your comments regarding IP addresses, that this isn't
>>>> right? There are no ip addresses there.
>>>>
>>>> Should I post the output of ifcongig, or would that be a stupid security
>>>> risk to post publicly?
>>>>
>>>>> And post results. If it returns the proper IP address (assuming your machine has been given a proper IP address) of your machine it should be ok but if it returns 127.0.0.1 then it is only listening on the local machine. In which case find your mysqld.cnf file probably /etc/mysql/mysql.conf.d/mysqld.cnf and comment out the line that says bind-address = 127.0.0.1. Recent thread here - http://www.gossamer-threads.com/lists/mythtv/users/58782
>>>> That line is already commented out in that file.
>>>>> If it returns nothing then mysql is probably not running. Check its running
>>>>> systemctl status mysql
>>>> $ systemctl status mysql
>>>> ? mysql.service - MySQL Community Server
>>>>      Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor
>>>> preset: enabled)
>>>>      Active: active (running) since Fri 2016-04-29 23:03:24 BST; 2h 3min ago
>>>>     Process: 820 ExecStartPost=/usr/share/mysql/mysql-systemd-start post
>>>> (code=exited, status=0/SUCCESS)
>>>>     Process: 802 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre
>>>> (code=exited, status=0/SUCCESS)
>>>>    Main PID: 819 (mysqld)
>>>>       Tasks: 48 (limit: 512)
>>>>      CGroup: /system.slice/mysql.service
>>>>              ??819 /usr/sbin/mysqld
>>>>
>>>> Apr 29 23:03:04 gingerserver systemd[1]: Starting MySQL Community Server...
>>>> Apr 29 23:03:24 gingerserver systemd[1]: Started MySQL Community Server.
>>>>
>>>>> I think, I don’t run Mythbuntu.
>>>>>
>>>>> I'm going to guess based on recent posts that it's not running and has errors like:
>>>>> [ERROR] unknown variable 'table_cache=128'
>>>>>
>>>>> In which case edit /etc/mysql/conf.d/mythtv-tweaks.cnf and replace the line
>>>>> table_cache=128
>>>>>
>>>>> with
>>>>> table_open_cache=128
>>>>>
>>>>> or else just comment out the line entirely. Info here - https://bugs.launchpad.net/mythbuntu/+bug/1575864
>>>> I came across that one earlier. That's already hashed out.
>>>>
>>>> What's next? :-)
>>>>
>>>> Thanks,
>>>> Damian
>>> How is your backend box getting its IPv4 address?  If it is by DHCP,
>>> then it is likely that the box will have configured IPv6 before IPv4
>>> and the backend may be starting before the IPv4 address is available.
>>> I always recommend that server boxes (such as mythbackend) should have
>>> static IP address assignments.
>> I have static IP's set up by assigning IP addresses for each machine, in
>> my router settings.
> That is not static.  It is still by DHCP, which is what causes the
> problem as it takes quite a while to get an IP address from the router
> with DHCP packets, compared to how long it takes for a box to get an
> IPv6 address.  A static address is assigned on the box itself, and
> requires no network traffic to set it up so it comes up as soon as the
> ethernet card does.
>
>>> In any case, I think a brute force fix would be to go into the
>>> settings in mysql and MythTV and put in your IPv4 address
>>> (192.168.0.2).  So that would be the bind-address= setting for mysql,
>>> in mythtv-setup, and also in all the config.xml files in /etc/mythtv
>>> and /home/<mythtv-user>/.mythtv on all machines.  That should make
>>> everything talk in the same way.
>> I think I already have 192.168.0.2 in all of the config.xml files on
>> every machine. What else do I need to do?
> Change the bind-address= setting in the /etc/mysql config files to
> 192.168.0.2, and in mythtv-setup, make sure that 192.168.0.2 is
> assigned as the IP address for the backend.
>
> If that does not fix it, then you could try assigning a real static
> address to the box, not a fixed IP address from the router via DHCP. I
> am not sure how you do that in on your system, as I am not using 16.04
> yet.  In 14.04, you can do that using the NetworkManager applet, or
> (my preference), uninstall NetworkManager and set it in the
> /etc/networks/interfaces file:
>
> iface eth0 inet static
>    address 192.168.0.2
>    netmask 255.255.255.0
>    gateway 192.168.0.x   <== Your router's address

OK, so in the absence of any other options, I set static IP's on my 
machines. :-)

It was painless.

But it didn't fix anything. :-( It's all still the same.

One thing I've not mentioned is that the frontend on the headless server 
box (same machine as the backend) is now playing content again. Not 
because of this change, it's been playing it all night. I 'think' that 
that the max_connections change could have been what caused that. Or 
maybe it was just one of the reboots.

So, does anyone have any more tips?

I'm left with turning IPver6 off tomorrow, and it that doesn't work, I 
may just format the drive for the 3rd time in about 3 weeks and install 
the OS again. Really don't want to do that, as I've got things like 
SyncThing, SpiderOak, Dropbox and Private Internet Access all set up 
nicely. I really don't fancy the idea of setting all of them up for the 
3rd time! However, it's getting to the point where that may feel less 
painful!

Cheers,
Damian


More information about the mythtv-users mailing list