[mythtv-users] Rebooting master results in slave not connected

Michael Watson michael at thewatsonfamily.id.au
Sat Feb 11 21:41:01 UTC 2012


On 11/02/2012 10:11 PM, Andy Sheen wrote:
>
> Michael Watson wrote on Sat 11 Feb at 4:44 UK time
>> On 11/02/2012 12:46 PM, Andy Sheen wrote:
>>> Michael Watson wrote on Sat 11 Feb at 1:21 UK time
>>>> The wake command is executed each time the MBE process is started (or
>>>> restarted), in which case the MBE knows that the slave is thus not
>>>> connected, and attempts to restart the SBE process, if both machines are
>>>> 24x7 then you dont need to bother checking if the slave is on, and just
>>>> attempt to restart slave backend process, but I would still atempt to
>>>> check if its actually on first.
>>> But that doesn't account for the time when the SBE is taken offline
>>> after the MBE has been started. It will have checked when it was
>>> restarted, but won't check before it records...
>> Why would it be taken off line after the MBE has started??  (Or do you
>> mean "asleep".  When the SBE is controlled by the MBE, the MBE will put
> This is the crux of the problem... The SBE isn't *controlled* by the MBE
> at all in my system. It is a completely independent computer which is
> normally up 24/7. The only reason it is a slave is because I want the
> MBE to control the distribution of recordings onto available tuners (as
> there are more satellite feeds where the SBE lives).
You might be better reversing the roles of these two machines.
>
>> the SBE to sleep when it is not required (shutdown, marked as asleep,
>> not disconnected).   The scheduler will continue to use the SBE tuners,
>> and power up the SBE using WOL, if configured correctly.
> I don't want the slave to be powered off. Its main use is as a media
> centre powered by xbmc.
>
>> If the SBE is rebooted after the MBE, the slave will connect
>> automatically on startup.
>> If the SBE is marked as Offline (rather than asleep), the scheduler will
>> ignore it, and schedule recordings without the SBE's tuners.
> Exactly. This is the problem I am trying to solve. For example, the MBE
> was offline for a good part of a day as I moved it between cases and
> moved things around here. When I switched it back on, the SBE appeared
> offline. If I hadn't manually restarted the backend on the slave, it
> would have stayed permanently offline and would have missed recordings
> until I noticed this fact. Yes, I know I don't move things around that
> often, but I want to avoid having to check the SBE status after a power
> outage, or a reboot or whatever. I want it to automatically recover.
>
>> Have you looked at the WOL settings in mysql.txt.  I have often (well
>> not that often) rebooted my MBE, and my Slave backend, if its on, will
>> generally reconnect automatically, (if its off, the MBE will wake it up,
>> and then shut it down if its not required).  Rarely do I have to
>> manually restart the SBE service, but I have WOL settings my the
>> mysql.txt on the SBE to wakeup the MBE if it cant connect.  Maybe this
>> is all that you require......
> No, because the SBE is not used with WOL. I have a system where two back
> ends collaborate rather than a single master and subordinate slave.
Using the WOL Settings in mysql.txt will make the SBE continue to retry 
connection to the MBE.  It is worth looking at even though you are not 
using WOL, but IMHO it would be beneficial to use WOL, so that if MBE is 
off for what ever reason, the SBE can wake it up.

WOLsqlReconnectWaitTime=90
WOLsqlConnectRetry=999
WOLsqlCommand='wakeonlan xx:xx:xx:xx:xx:xx'

>
> I think the best way of doing this would be with another table in the
> database which gets written to when the MBE boots and the SBE can read.
> It's the equivalent of the shared file, though neater in that it uses
> the shared database.
Youre main problem appears to be that the SBE has given up trying to 
connect/reconnect to the MBE.  WOL settings in mysql.txt (on SBE) will 
tell the SBE to continue to retry its connection, thus solving this problem.

Youre are configuring your setup in a "non standard" way, we sometimes 
have to resort to hack's to get it to work the way we want it, but I 
believe this is the power of Myth over other equivalent software, 
especially commercial ones.  No need to add a table to the database, 
your system simply needs to be told to continue to retry contacting the 
MBE.  Code already exists to do this.


>
> Andy
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
>



More information about the mythtv-users mailing list