[mythtv-users] Mythfilldatabase fails with xmltv error since 0.22 upgrade, but works when run manually

MarcT myrdhn at gmail.com
Wed Nov 18 03:24:18 UTC 2009

Robert wrote:
> Hi,
> Since upgrading to 0.22 my automated mythfilldatabase run hasn't worked. 
> If I login as the user mythtv runs as and run it manually then it works
> fine.
> In the mythfilldatabase log for an automated run, the errors are:
> 2009-11-13 05:10:51.655 Connected to database 'mythconverg' at host:
> localhost
> Using old-style config file
> config file /var/run/mythtv/.mythtv/DVB-S.xmltv does not exist, run me
> with --configure
> 2009-11-13 05:10:52.267 FillData, Error: xmltv returned error code 512
> 2009-11-13 05:10:52.268 Error in 1:1: unexpected end of file
> So clearly it isn't finding it's config file, mainly because
> /var/run/mythtv/.mythtv/DVB-S.xmltv doesn't exist.
> Mine lives in /home/mythtv/.mythtv/DVB-S.xmltv and always has, and it
> finds this one during a manual run.
> So the question is, how can I tell it to use the config file in it's home
> dir?  I can't find this setting anywhere in my config files, or in the
> Myth setup screens.  It all worked with 0.21...!
> Any pointers welcomed.
> (and yes I know I could just symlink the file, but that's clearly not the
> right fix!)
> I'm running mythtv-0.22-22772 on Gentoo using MarcT's ebuilds from
> git://github.com/MarcT/mt-mythtv.git
> ...
> Oh, I've just worked out what the problem is, but I'm still not sure what
> the correct fix is - in the initscript for mythbackend it clobbers the
> HOME environment variable and sets it to /var/run/mythtv...
> This seems wrong....  Any thoughts as to why it might be doing this?
I would guess that's where the home directory for your mythtv user is, which
the user it's trying to run the automated mythfilldatabase (mfdb) from.

I'm not sure how you fix this, not knowing exactly how gentoo does things,
in this order:

1. symlink it. I got fed up with having information scattered around under 
several users, so I created /etc/mythtv and made sure that every user
~/.mythtv to it.

2. Just copy the file to where mfdb expects it.

3. In my distro, programs started by init, including mythbackend, which
mfdb, set environment variables by using text files in /etc/sysconfig. Try 
investigating there.


Mike Perkins


This is an issue that even the official ebuilds suffer. I modify the config
file on my builds to the following

# Specify which file to use for the backend log.

# Specify in which file to store the backend process id.

This causes the .mythtv folder to goto /etc/conf.d/mythtv/.mythtv


More information about the mythtv-users mailing list