[mythtv-users] Untraceable error message from Mythfilldatabase

R. G. Newbury newbury at mandamus.org
Mon May 5 01:54:05 UTC 2008


Michael T. Dean wrote:
> On 05/04/2008 08:25 PM, R. G. Newbury wrote:
>> 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, ...).
>> 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
> 
> Did you do the "chmod 1777 /tmp" (yes, that 1 /should be/ there--it's 
> actually critical, not a typo--and is probably the missing piece).

Yes, chmod 1777 to get the sticky bit and the 't' at the end of the 
drwxrwxrwx*t*.

Interestingly, I did that the tried a run of mfdb....which failed 
because mfdb could not find the /tmp/mysql/mythtv_media 
sub-dir....because /tmp/mysql no longer existed. I was not aware the 
/tmp got cleaned up so often, since I created /tmp/mysql last night!

Since that happens, putting a 'mysql' into datadirect.cpp is a waste and 
counterproductive...especially if it CAUSES a different error. So I took 
it out and re-compiled...but I can't do the install until Dexter 
finishes at 11:00. Priorities!
So I will test then and post some results..

But in the meantime, the grab error ONLY seems to occur for the 
completely empty days (last 3 in my case...it will be 4 tomorrow when I 
drop down to 10 days of listings available).

Geoff


More information about the mythtv-users mailing list