[mythtv-users] Need mythtv-backend startup advice

Don Brett dlbrett at zoominternet.net
Sat Jul 13 18:57:56 UTC 2019


On 7/13/2019 1:29 PM, Stephen Worthington wrote:
> On Sat, 13 Jul 2019 12:56:28 -0400, you wrote:
>
>> I have a new installation of Ubuntu-Mate (18.04).  It works fine, but I
>> just realized the HD Homerun inputs are having a minor problem.  On
>> power-up, or reboot, all the HDHR inputs come up as unavailable.  I
>> restart mythtv-backend and all is well.  Does it sound like a systemd
>> configuration issue?  I'm using the systemd conf, as-installed.
>>
>> Don
>>
>> PS - The Hauppauge HDPVR works fine; this only  happens on the
>> SiliconDust HDHR connect hardware.
>>
>> Restart command:
>> sudo systemctl stop mythtv-backend
>> sudo systemctl start mythtv-backend
>>
>>
> >From /etc/systemd/system/multi-user.target.wants/mythtv-backend.service: 
>> (symlinked to /lib/systemd/system/mythtv-backend.service):
>> [Unit]
>> Description=MythTV Backend
>> Documentation=https://www.mythtv.org/wiki/Mythbackend
>> After=mysql.service network.target
>>
>> [Service]
>> User=mythtv
>> EnvironmentFile=-/etc/mythtv/additional.args
>> ExecStart=/usr/bin/mythbackend --quiet --syslog local7 $ADDITIONAL_ARGS
>> StartLimitBurst=10
>> StartLimitInterval=10m
>> Restart=on-failure
>> RestartSec=1
>>
>> [Install]
>> WantedBy=multi-user.target
> That is caused by mythbackend being started before the network is
> fully available.  So mythbackend can not access the network tuners
> when it tests them at startup and it marks them as unavailable.  There
> are a number of threads on this list about it.  I have a fix on my web
> server, so I will repeat my instructions for installing it:
>
> =====================================================================
> The fix is a bit complicated - you have to make a systemd unit that
> tests for the Ethernet interface actually being up and able to pass
> traffic, and then have mythbackend wait on that unit before it is
> started.  The tools to do this are on my web server.  If you are not
> running a server version of Ubuntu and have not disabled
> NetworkManager, run the following commands to set it all up.  Watch
> out for line wrapping - my email client does that with longer lines
> such as the wget commands, so the wget and the URL after it should be
> on one line.
>
> sudo su
> cd /usr/local/bin
> wget http://www.jsw.gen.nz/mythtv/wait-until-pingable.py
> chmod u=rwx,g=r,o=r wait-until-pingable.py
> systemctl enable NetworkManager-wait-online.service
> systemctl start NetworkManager-wait-online.service
> cd /etc/systemd/system
> mkdir mythtv-backend.service.d
> chmod u=rwx,g=rx,o=rx mythtv-backend.service.d
> cd mythtv-backend.service.d
> wget
> http://www.jsw.gen.nz/mythtv/mythtv-backend-wait-until-pingable.conf
> chmod u=rw,g=r,o=r mythtv-backend-wait-until-pingable.conf
> cd ..
> wget http://www.jsw.gen.nz/mythtv/local-network-pingable.service
> chmod u=rw,g=r,o=r local-network-pingable.service
>
> Here you will need to change the text in
> local-network-pingable.service where it says "switch.jsw.gen.nz" and
> replace that with the IP address or DNS name of your first network
> tuner (if the tuner is pingable), or otherwise something on your
> network such as your switch or router that is normally pingable when
> your MythTV box is booting.
>
> Use nano or your favourite editor:
>
> nano local-network-pingable.service
>
> Then save the change and exit from nano or your editor and do these
> commands:
>
> systemctl enable local-network-pingable.service
> systemctl start local-network-pingable.service
> systemctl status local-network-pingable.service
>
> The systemctl status command should show that the
> local-network-pingable.service has started and the ping worked.  If
> not, fix that before proceeding.  Then do these commands:
>
> systemctl daemon-reload
> exit
>
> After that, on boot mythbackend will wait for either the ping to work,
> or the 30 second timeout specified in the
> local-network-pingable.service file.  If you want to change that
> timeout, it is the "30" after the ping address.
> =====================================================================
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
>
Thanks Stephen, I'll go through it this weekend,

Don


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



More information about the mythtv-users mailing list