[mythtv] Race condition on backend status at system startup?

Stuart Auchterlonie stuarta at squashedfrog.net
Mon Sep 26 09:24:51 UTC 2005


On Mon, Sep 26, 2005 at 08:19:11AM +0800, Joshua King wrote:
> Anyone able to diagnose where to look to fix an issue that I'm having with
> the HTTP backend status (port 6544)? Basically the last thing my system
> startup scripts do is
> 
> curl -o /tmp/bstatus.html http://127.0.0.1:6544
> 
> Which is then e-mailed to me so I know that my system is working (I'm
> frequently remote from the mythbox).
> 
> I was on 0.17 now SVN and I have the issue (example e-mail attached) that
> the Schedule section (possibly also the Job Queue section, but I rarely run
> jobs) comes up as empty when I know I have scheduled shows (and can get them
> to appear when I check the status manually).

It's a timing thing. Immediately after startup there aren't any shows
scheduled. Leave it 10-15secs and it should know about all your shows.

Stuart

> 
> Running on Gentoo, this sits in /etc/conf.d/local.start which runs after
> both mythbackend and mysqld start OK.
> 
> Seems like some database connections aren't up and running yet, but the
> mythfilldatabase status is correct, so there's at least one connection
> already? Perhaps not accept HTTP connections until all of the database
> connections are open?
> 
> Point me at it and I'll try and patch and test it.
> 
> Joshua King
> 

> X-Apparently-To: jking_ok at yahoo.com.au via 68.142.207.108;
> 	Sat, 24 Sep 2005 22:45:55 -0700
> X-Originating-IP: [66.163.169.222]
> Authentication-Results: mta325.mail.scd.yahoo.com
> 	from=yahoo.com.au; domainkeys=pass (ok)
> Date: Sun, 25 Sep 2005 05:45:50 UT
> From: jkingkard-mythbox at yahoo.com.au
> To: jking_ok at yahoo.com.au
> Subject: System Startup Notification
> 
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
> <head>
>   <meta http-equiv="Content-Type"content="text/html; charset=UTF-8" />
>   <style type="text/css" title="Default" media="all">
>   <!--
>   body {
>     background-color:#fff;
>     font:11px verdana, arial, helvetica, sans-serif;
>     margin:20px;
>   }
>   h1 {
>     font-size:28px;
>     font-weight:900;
>     color:#ccc;
>     letter-spacing:0.5em;
>     margin-bottom:30px;
>     width:650px;
>     text-align:center;
>   }
>   h2 {
>     font-size:18px;
>     font-weight:800;
>     color:#360;
>     border:none;
>     letter-spacing:0.3em;
>     padding:0px;
>     margin-bottom:10px;
>     margin-top:0px;
>   }
>   hr {
>     display:none;
>   }
>   div.content {
>     width:650px;
>     border-top:1px solid #000;
>     border-right:1px solid #000;
>     border-bottom:1px solid #000;
>     border-left:10px solid #000;
>     padding:10px;
>     margin-bottom:30px;
>     -moz-border-radius:8px 0px 0px 8px;
>   }
>   div#schedule a {
>     display:block;
>     color:#000;
>     text-decoration:none;
>     padding:.2em .8em;
>     border:thin solid #fff;
>     width:350px;
>   }
>   div#schedule a span {
>     display:none;
>   }
>   div#schedule a:hover {
>     background-color:#F4F4F4;
>     border-top:thin solid #000;
>     border-bottom:thin solid #000;
>     border-left:thin solid #000;
>     cursor:default;
>   }
>   div#schedule a:hover span {
>     display:block;
>     position:absolute;
>     background-color:#F4F4F4;
>     color:#000;
>     left:400px;
>     margin-top:-20px;
>     width:280px;
>     padding:5px;
>     border:thin dashed #000;
>   }
>   div.diskstatus {
>     width:325px;
>     height:7em;
>     float:left;
>   }
>   div.loadstatus {
>     width:325px;
>     height:7em;
>     float:right;
>   }
>   .jobfinished { color: #0000ff; }
>   .jobaborted { color: #7f0000; }
>   .joberrored { color: #ff0000; }
>   .jobrunning { color: #005f00; }
>   .jobqueued  {  }
>   -->
>   </style>
>   <title>MythTV Status - 9/25/2005 1:45 PM - 0.19.20050712-1</title>
> </head>
> <body>
> 
>   <h1>MythTV Status</h1>
>   <div class="content">
>     <h2>Encoder status</h2>
>     Encoder 1 is local on television and is not recording.<br />
>   </div>
> 
>   <div class="content">
>     <h2>Schedule</h2>
>     There are no shows scheduled for recording.
>     </div>
>   <div class="content">
>     <h2>Job Queue</h2>
>     Job Queue is currently empty.
> 
>   </div>
> 
>  <div class="content">
>     <h2>Machine information</h2>
>     <div class="diskstatus">
>       Disk Usage:
>       <ul>
>         <li>Total Space: 100,596 MB </li>
>         <li>Space Used: 63,148 MB </li>
>         <li>Space Free: 37,448 MB </li>
>       </ul>
>     </div>
> 
>     <div class="loadstatus">
>       This machine's load average:
>       <ul>
>         <li>1 Minute: 1.69</li>
>         <li>5 Minutes: 0.6</li>
>         <li>15 Minutes: 0.21</li>
>       </ul>
>     </div>
>     Last mythfilldatabase run started on 2005-09-25 07:48 and ended on 2005-09-25 08:10. Successful.<br />
>     There's guide data until 2005-10-02 04:00 (7 days).
>   </div>
> 
> </body>
> </html>


> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev



More information about the mythtv-dev mailing list