[mythtv-users] mythbackend won't start during bootup on fc16

R. G. Newbury newbury at mandamus.org
Thu May 17 22:20:05 UTC 2012


On 05/17/2012 12:32 PM, Richard Shaw wrote:
> On Wed, May 9, 2012 at 2:04 PM, Monkey Pet<monkeypet at gmail.com>  wrote:
>> On Tue, May 8, 2012 at 8:39 PM, R. G. Newbury<newbury at mandamus.org>  wrote:
>>>
>>> On 05/08/2012 09:31 PM, Monkey Pet wrote:
>>>>>
>>>>>  From syslog, why is the behavior different running it from the cmdline?
>>>>
>>>>
>>>> May  8 18:21:12 mythtv mythbackend[1442]: Starting mythbackend: [  OK  ]
>>>> May  8 18:21:14 mythtv mythbackend[1442]: No UPnP backends found
>>>> May  8 18:21:14 mythtv mythbackend[1442]: Would you like to configure the
>>>> database connection now? [no]
>>>> May  8 18:21:14 mythtv mythbackend[1442]: [console is not interactive,
>>>> using default 'no']
>>>
>>>
>>> Brushed 'send'by mistake too early!  The 'would you like to configure'
>>> line means that mythbackend cannot talk to the mysqld server.
>>> First check that it is running. As in the prior message, mysqld may not be
>>> starting properly due to systemd misconfiguration.
>>> Try 'systemctl status mysqld.service'
>
> A "Requires=mysqld.service" could be added to the configuration but
> this might confuse people who are using a mysql server from another
> machine instead of the localhost.

All of the mythbackend.service files floating around use:
After=mysqld.service

Note that mysqld can take some time to start up, if it needs to fix 
crashed files. Thus the mysql provided ExecStartPost line in mysqld.service
ExecStartPost=/usr/libexec/mysqld-wait-ready $MAINPID

(That setup uses type=forking: if you use type=simple, you can remove 
the call to ExecStartPost (and let systemd take care of it).


>> Earlier in the log I see mysqld starting up 4 secs earlier, so I am thinking
>> this might be a race between mysqld starting up and mythbackend starting up.
>>   This might explain why when the system is fully booted, I can launch the
>> mythbackend manually.
>
> This is then a bug in either mysqld or the mysqld service file.
> SystemD should not be told something is "started" until the service if
> fully operational.

If you run 'systemctl status whatever.service' immediately after 'start' 
you can often see an 'initiated' message, but not (yet) and 'active' 
status. Systemd knows what it going on, and will wait until mysqld is 
fully started *before* attempting to start mythbackend.service

Geoff




More information about the mythtv-users mailing list