[mythtv-users] Best Way to Run Commercial Detection Jobs Not On Master Backend

Drew Tomlinson drew at mykitchentable.net
Tue Jan 28 17:43:10 UTC 2014


On 1/28/2014 6:02 AM, Michael T. Dean wrote:
> On 01/27/2014 08:43 PM, Drew Tomlinson wrote:
>> On 1/27/2014 3:10 PM, Hika van den Hoven wrote:
>>> Hoi Drew,
>>>
>>> This is the backend adres, not the database adres. The top should be
>>> local 127.0.0.1, the bottom your master IP.
>>> If you still have problems connecting to mysql, you have to configure
>>> mysql to not only listen locally on 127.0.0.1
>>> in /etc/mysql/my.cnf (or where yours is located) on your master
>>> change bind-address from 127.0.0.1 to 192.168.1.26 and restart mysql.
>> Thank you for your reply.
>>
>> I believe my mythconverg database does listen on 192.168.1.26 as I 
>> can access it remotely using MySQL Workbench and also with a remote 
>> frontend on my laptop.  In my my.cnf file, I do not specify 
>> bind-address which by default, binds to all available addresses I think.
>>
>> From my mythbackend.log file, I have this snippet.  I don't 
>> understand it 100% but why is it trying to connect though 
>> mysqld.sock?  That seems weird to me.  I have no mysqld running (or 
>> even installed) on the slave backend.  It's a standard mythbuntu 
>> "backend only" install.
>>
>> Jan 27 17:34:07 mythbuntu mythbackend: mythbackend[3213]: N 
>> thread_unknown mythdirs.cpp:68 (InitializeMythDirs) Using 
>> configuration directory = /home/mythtv/.mythtv
>> Jan 27 17:34:07 mythbuntu mythbackend: mythbackend[3213]: I 
>> CoreContext mythcorecontext.cpp:249 (Init) Assumed character 
>> encoding: en_US.UTF-8
>> Jan 27 17:34:07 mythbuntu mythbackend: mythbackend[3213]: E 
>> CoreContext mythdbparams.cpp:39 (IsValid) DBHostName is not set in 
>> config.xml
>> Jan 27 17:34:07 mythbuntu mythbackend: mythbackend[3213]: N 
>> CoreContext mythcontext.cpp:504 (LoadDatabaseSettings) Empty 
>> LocalHostName.
>> Jan 27 17:34:07 mythbuntu mythbackend: mythbackend[3213]: I 
>> CoreContext mythcontext.cpp:512 (LoadDatabaseSettings) Using 
>> localhost value of mythbuntu
>> Jan 27 17:34:07 mythbuntu mythbackend: mythbackend[3213]: E 
>> CoreContext mythdbcon.cpp:216 (OpenDatabase) Unable to connect to 
>> database!
>> Jan 27 17:34:07 mythbuntu mythbackend: mythbackend[3213]: E 
>> CoreContext mythdbcon.cpp:217 (OpenDatabase) Driver error was 
>> [1/2002]:#012QMYSQL: Unable to connect#012Database error 
>> was:#012Can't connect to local MySQL server through socket 
>> '/var/run/mysqld/mysqld.sock' (2)
>> Jan 27 17:34:07 mythbuntu mythbackend: mythbackend[3213]: C 
>> CoreContext main.cpp:116 (main) Failed to init MythContext.
>
> You're cutting out a lot of the log, so it's hard to figure out 
> exactly what's happening (and where this appeared during the run), but 
> attempting to connect to a local database is a fallback that's 
> performed when there's no config.xml (or an invalid one) and we can't 
> find a master backend on the network from which to get database 
> connection information (or there are multiple and we can't ask which).
>
> You just need to properly configure your backend settings--including 
> "this server" and "master server" IP address information.  You must 
> also ensure that you do not use 127.0.0.1 /anywhere/ in your MythTV 
> configuration--including on your master backend.
>
> See, also, http://www.mythtv.org/wiki/Posting_Logs (and note the 
> "without trimming any information from the log file" part... :) 
Thank you for your reply.  A complete log is here:

http://pastebin.com/ZXVnswVD

However with the other comments, I found /etc/mythtv/config.xml and 
edited it by hand to something reasonable for my system.  Here are the 
contents now:

<Configuration>
   <UPnP>
     <MythFrontend>
       <DefaultBackend>
<!--
Set the <LocalHostName> hostname override below only if you want to use
something other than the machine's real hostname for identifying settings
in the database.  This is useful if your hostname changes often, as
otherwise you'll need to reconfigure mythtv every time.

NO TWO HOSTS MAY USE THE SAME VALUE
-->
         <DBHostName>mythfe01</DBHostName>
         <DBUserName>mythtv</DBUserName>
         <DBPassword>mythtv</DBPassword>
         <DBName>mythconverg</DBName>
         <DBPort>3306</DBPort>
       </DefaultBackend>
     </MythFrontend>
   </UPnP>
</Configuration>

Then I restarted my backend (a couple of times before I got it right) 
and it seems to be working.  Here's a link to the backend log file now:

http://paste.ubuntu.com/6833227/

If you scroll to the bottom and then move up to the beginning of the 
last restart, it seems I've solved my issue and connected successfully.  
However how will I know?  All I really want to do here is offload the 
commercial flagging jobs from my main front/backend combo machine to 
this slave backend.  And I'm aware that I really only need to run 
mythjobqueue for this and I will once I know it's working properly.

Thanks for all of the help!

Cheers,

Drew





More information about the mythtv-users mailing list