[mythtv] SOLVED: Systemd expertise needed: systemctl fails to start mythbackend

R. G. Newbury newbury at mandamus.org
Thu Jul 5 23:07:01 UTC 2012


On 07/05/2012 06:28 PM, Gavin Hurlbut wrote:
> On Thu, Jul 5, 2012 at 3:21 PM, R. G. Newbury <newbury at mandamus.org> wrote:
>> Jul 05 18:06:15 tor6.mandamus.org mythbackend[5713]: 2012-07-05
>> 18:06:15.254231 C  mythbackend ve...rg
>> Jul 05 18:06:15 tor6.mandamus.org mythbackend[5713]: 2012-07-05
>> 18:06:15.254269 C  Qt version: co....2
>> Jul 05 18:06:15 tor6.mandamus.org mythbackend[5713]: 2012-07-05
>> 18:06:15.254276 N  Enabled verbos...al
>> Jul 05 18:06:17 tor6.mandamus.org mythbackend[5713]: No UPnP backends found
>> Jul 05 18:06:17 tor6.mandamus.org mythbackend[5713]: Would you like to
>> configure the database con...o]
>> Jul 05 18:06:17 tor6.mandamus.org mythbackend[5713]: [console is not
>> interactive, using default 'no']
>> Jul 05 18:06:17 tor6.mandamus.org mythbackend[5713]: 2012-07-05
>> 18:06:17.317454 C  Failed to init...t.
>
> Ummm, you should probably run at --loglevel debug as it seems you are
> having some issues that aren't being logged at whatever level.  My
> suspicion is that your config.xml file isn't being read, possibly
> because you are using a different user than before?  It's wanting to
> upgrade your database, but without logs...  impossible to say exactly
> why.  This is why we have fairly verbose logs (and why running at
> --loglevel crit is insane when debugging!)
>
> I'm sure the problem will surface soon enough.

Thank you Richard, thank you Bill and thank you Gavin.
It was the reference to config.xml.

I have a user 'mythtv' and mythtv's "home" directory was set to 
/var/log/mythtv, on both this laptop and the mythbox. Prior to the 
change in the user which runs mythbackend, I ran the mythbox at home as 
root. And all copies of config.xml were symlinks to 
/root/.mythtv/config.xml. The mythbox at home had a 'proper' mythtv user 
with /home/mythtv and symlinks for config.xml.

But I changed to /var/log/mythtv at home and on this laptop when 
installing Fedora 17 on Monday (I did not have myth on the laptop since 
installing F17 a month ago). I have a "home" of /var/log/mythtv for the 
mythtv user (set in /etc/sysconfig/mythbackend). And mythbackend runs as 
mythtv, so it looks to /var/log/mythtv/.mythtv, which (you've guessed by 
now) had a bad copy of config,xml. On the laptop, it was looking for the 
mythbox as the mysqld server.

And since I was launching the cli version *as root* AND there is a good 
copy of config.xml in /root/.mythtv *that worked*!

It was/is the fact that systemd changes the user (in midstream) that 
this is not transparent.
Two changes at once, working at cross purposes. And my usual practice of 
getting things working as root, and then changing to a normal user, 
tripped me up, since it was changing when I did not expect it to. (ok, I 
'knew' it was doing that, I just failed to consider the significance of 
that).

I'll add some wording to the wiki as my punishment.

I shall not be stupid
I shall not be stupid
I shall not be stupid
Damn I wish I had had cut and paste when I had to write out verbs as 
punishment in french class when I was a kid...
I shall not be stupid
Damn I wish I had had cut and paste when I had to write out verbs as 
punishment in french class when I was a kid...

Geoff



More information about the mythtv-dev mailing list