[mythtv-users] Untraceable error message from Mythfilldatabase

R. G. Newbury newbury at mandamus.org
Mon May 5 00:25:30 UTC 2008


Michael T. Dean wrote:
> On 05/04/2008 03:07 AM, R. G. Newbury wrote:
>> Somehow Mythfilldatabase has become borken in the last few days.
>> It runs, but reports near the end:
> ...
>> 2008-05-04 02:41:24.845 DataDirect, Error: GrabData: Creating temp post file
>> 2008-05-04 02:41:24.845 Encountered error in grabbing data.
>> 2008-05-04 02:41:24.845
>>
>>
>> It *appears* that either mysql or datadirect.cpp has a permissions 
>> problem. I had not changed any permissions for mysql. In fact, the only 
>> change was to update the SVN level a few days ago, which is when mfdb 
>> started to fail.
>>
>> I grep'ed around and found that this is from /libs/libmyth/datadirect.cpp.
>> That file has tmpdir hardwired as "/tmp" and datadirect.cpp tries to 
>> create temporary subfolders under /tmp. I chowned and chgrped /tmp to 
>> mysql in an attempt to fix things but still got the error. I chmod'ed to 
>> 777: no joy.
> 
> Unless you're running mythbackend as the mysql user, that's the wrong 
> user.  However, you really want /tmp owned by root.  The following 
> should fix it (right, even):
> 
> sudo chown root:root /tmp
> sudo chmod 1777 /tmp
> 
> Also, make sure you have sufficient free space on the partition that 
> includes /tmp (this doesn't take /that/ much space, but if the partition 
> were full, ...).
> 
> Mike

Thanks Mike. Not full: that's one of the first things I thought of, 
having been tagged with a full /var/log partition.

Mythbackend is started as a service...therefore actually root. But the 
daily mfdb 'runs but did not insert...'.
I tried mfdb from a terminal, as *root*, using many variants of:

/tmp as root:root
/tmp as mysql:mysql
both with chmod 666 and 777

then with datadirect.cpp changed to make tmpdir="/tmp/mysql"
and with new subdir /tmp/mysql owned by mysql:mysql and set as 777

Running mfdb in the latter case, datadirect writes a couple of temporary 
files to that directory, BUT I STILL GET THE GRAB ERROR...

Damn, I hate it when that happens...

It appears to be some sort of failure within datadirect.cpp and reading 
the files...at the end of the run, the temp files ARE deleted (by mysql, 
I presume)...

Geoff



More information about the mythtv-users mailing list