[mythtv-users] how to get slaves to automatically reconnect to the master backend

Tom Lichti redpepperracing at gmail.com
Thu Aug 20 15:26:31 UTC 2009


On Thu, Aug 20, 2009 at 11:04 AM, Peter
Abplanalp<pta-myth at psaconsultants.com> wrote:
> On Thu, Aug 20, 2009 at 8:58 AM, Tom Lichti<redpepperracing at gmail.com> wrote:
>> On Thu, Aug 20, 2009 at 10:46 AM, Peter
>> Abplanalp<pta-myth at psaconsultants.com> wrote:
>>> On Thu, Aug 20, 2009 at 8:33 AM, Tom Lichti<redpepperracing at gmail.com> wrote:
>>>> When the master reboots spontaneously, the slaves probably still have
>>>> a socket open to what they think is the master, and when the master
>>>> actually comes back up, the slaves don't know, because they think they
>>>> are still connected to the master. Not sure how to get around that
>>>> without some scripting.
>>>
>>> i think you are probably correct, any ideas on how i might script that?
>>
>> Well....some kind of heartbeat running in cron on the slaves that
>> tries to ping the master server, and if it fails, recycle the
>> mythbackend process. Now you are at the mercy of the network though.
>> You could also try to do some kind of TCP connection from the slave as
>> a test of the backend. Or if you want to get even more fancy, have a
>> cron on the slaves that gets the uptime from the master and if it is
>> less than the previous value, recycle the mythbackend process. As they
>> say in perl, there is more than one way to do it.
>
> thanks for the tips.  i think i may just set up some ssh keys and then
> put an ssh command in rc.local to restart the backend on each slave.
> that way if the master ever reboots, the slaves are bounced.

That would work even better!

Tom


More information about the mythtv-users mailing list