[mythtv-users] Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28)

R. G. Newbury newbury at mandamus.org
Thu Apr 21 18:51:52 UTC 2016


On 04/18/2016 09:24 AM, Bill Meek wrote:
> On 04/18/2016 04:30 AM, Roger Siddons wrote:
>> On 18/04/16 03:50, Bill Meek wrote:
>>> Why 192... shows up in ifconfig and not in the
>>> backend log is a mystery, so far.
>>>
>> But it does. The backend just can't resolve it when it starts.
>
> Right, poor choice of words on my part. It finds the address from settings
> BackendServerIP, but when it loops through the NIC's addresses, it isn't
> there. So we end up with the Host is configured to listen on 192.168.1.100,
> but address is not used on any local network interfaces message.
>
> Interestingly, the code that does this logs most all cases of problems,
> but, if the NIC is down, there's just a continue. I'm testing a patch to
> log that too.
>
> Simple test actually, I just took my NIC down and started the backend. Got
> the same errors (plus their IPv6 versions for my machine.)
>
> Fred, if Roger's test works, there's a solution available for the
> mythtv-backend
> .service to prevent the problem. Please confirm if/that the backend can
> be restarted
> after boot and works OK.


I have noticed that even with:

Wants=httpd.service
After=network.target mariadb.service

at the top of the mythbackend.service systemd daemon file, the messages 
scrolling on boot are reporting the the NIC is not yet 'up', but 
mythbackend (and mysql/mariadb) have been started.

To the OP, an answer which will work is to create an rc-local.service 
file for systemd in /lib/systemd/system/ containing:

########################################
# This unit gets pulled automatically into multi-user.target by
# systemd-rc-local-generator if /etc/rc.d/rc.local is executable.
[Unit]
Description=/etc/rc.d/rc.local Compatibility
ConditionFileIsExecutable=/etc/rc.d/rc.local
After=network.target

[Service]
Type=forking
ExecStart=/etc/rc.d/rc.local start
TimeoutSec=0
RemainAfterExit=yes
#########################################

Enable the file using:  systemctl enable rc-local.service

And create an /etc/rc,d/rc.local file containing at least

systemctl restart mythbackend.service

You can re-start mysqld/mariadb too if you want. Also useful to force 
permissions and ownership on any folders which, by default, may turn out 
'wrong'.

REMEMBER TO   chmod 755 /etc/rc.d/rc.local
Reboot.


Then systemd will re-start mythbackend  AFTER the network is stable.

Geoff









-- 
              R. Geoffrey Newbury			



More information about the mythtv-users mailing list