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

Robert RobertCL at iname.com
Wed Nov 18 07:44:37 UTC 2009

On Wed, November 18, 2009 3:24 am, MarcT wrote:
> 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
> is
> 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,
> but
> 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
> symlinks
> ~/.mythtv to it.
> 2. Just copy the file to where mfdb expects it.
> 3. In my distro, programs started by init, including mythbackend, which
> spawns
> 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.
> MYTH_LOG=/var/log/mythtv/mythbackend.log
> # Specify in which file to store the backend process id.
> MYTH_PID=/etc/conf.d/mythtv/mythbackend.pid
> This causes the .mythtv folder to goto /etc/conf.d/mythtv/.mythtv
> MarcT

Thats interesting.  Yes, I set MYTH_PID to be
/var/run/mythtv/mythbackend.pid, so that's why mythtv is trying to look
there for it's homedir.

I've not done anything about it yet (apart from running mfd manually a few

I think I'll try editing the init script to stop it changing the HOME
variable and see where I get to...


More information about the mythtv-users mailing list