I'm using an HDHOMERUN as my recording device.
When mythbackend starts as a service, it appears to run too early and fails to connect to the external HDHOMERUN device.
This causes recordings to fail after rebooting, unless I remember to restart mythbackend, then it's fine.
It used to be that I could change the rc script to "need" net, but that doesn't fix the problem anymore.
Is it unreasonable for the backend to be changed to timeout on network devices and try again?
Or is there some other way to ensure that mythbacked doesn't start too soon?
The issue here is timing.
Thanks much for any suggestions.
Mythtv fails to start because network isn't up.
Moderator: Forum Moderators
Re: Mythtv fails to start because network isn't up.
As a guess as you have not mentioned either mythtv version or operating system.
If running *ubuntu 18.04 see https://lists.gt.net/mythtv/users/625986#625986
This solution is mentioned in Software Install section of https://www.mythtv.org/wiki/Installing_MythTV_on_Ubuntu
Mike
If running *ubuntu 18.04 see https://lists.gt.net/mythtv/users/625986#625986
This solution is mentioned in Software Install section of https://www.mythtv.org/wiki/Installing_MythTV_on_Ubuntu
Mike
Re: Mythtv fails to start because network isn't up.
Yes of cause in an ideal world MythTV would be able to keep trying to connect to the HDHOMERUN if it can't connect at start up but that currently isn't possible.
Your best work around is to fix your setup to delay starting mythbackend until the network is fully up using the tools provided by whatever init system you are using. As Mike said we don't know what your setup is and there are many ways to accomplish this.
There has been many discussions about this on this forum and the mailing lists including this recent one for Ubuntu users (as you can see it's not possible to say do it this way and it will work we can give you hints but you may have to tweak things to work reliably for your particular setup) :-
https://github.com/MythTV/packaging/pull/77
This is the mythtv-backend.service file I use on my own Ubuntu 18.04.4 LTS servers that I run virtualised under VMware ESX that seems to work fine for me and I use several different network tuners including a HDHomeRun Connect Quatro but YMMV .
https://github.com/paul-h/packaging/blo ... nd.service
Your best work around is to fix your setup to delay starting mythbackend until the network is fully up using the tools provided by whatever init system you are using. As Mike said we don't know what your setup is and there are many ways to accomplish this.
There has been many discussions about this on this forum and the mailing lists including this recent one for Ubuntu users (as you can see it's not possible to say do it this way and it will work we can give you hints but you may have to tweak things to work reliably for your particular setup) :-
https://github.com/MythTV/packaging/pull/77
This is the mythtv-backend.service file I use on my own Ubuntu 18.04.4 LTS servers that I run virtualised under VMware ESX that seems to work fine for me and I use several different network tuners including a HDHomeRun Connect Quatro but YMMV .
https://github.com/paul-h/packaging/blo ... nd.service
Re: Mythtv fails to start because network isn't up.
Thanks.
I'm running Gentoo.
needs net mysql isn't working, there must be something else it needs.
I'll keep digging.
I'm running Gentoo.
needs net mysql isn't working, there must be something else it needs.
I'll keep digging.
Re: Mythtv fails to start because network isn't up.
Note: If the HDHOMERUN crashes (and it does periodically) then mythtv loses connection and won't recover without a backend restart. I lose recordings because of this periodically. That is yet another reason to have a timeout in the code.
For those who find this in the future (who use Gentoo):
To ensure that networking is up and running before mythbackend starts:
You must have a fixed IP assigned in /etc/conf.d/net for the device mythtv is using to talk to the hdhomerun.
You must ensure that net.[device] is setup for the boot run level (rc-update add net.[device] boot).
You must change the mythbackend init.d script to say "need net" (default is "use net") to ensure that mythbackend starts after networking is up.
For some reason, if you use dhcp, it won't work. I gave up trying to figure out why.
For those who find this in the future (who use Gentoo):
To ensure that networking is up and running before mythbackend starts:
You must have a fixed IP assigned in /etc/conf.d/net for the device mythtv is using to talk to the hdhomerun.
You must ensure that net.[device] is setup for the boot run level (rc-update add net.[device] boot).
You must change the mythbackend init.d script to say "need net" (default is "use net") to ensure that mythbackend starts after networking is up.
For some reason, if you use dhcp, it won't work. I gave up trying to figure out why.