<br><br><div class="gmail_quote">On Mon, Dec 31, 2012 at 6:38 AM, Michael T. Dean <span dir="ltr"><<a href="mailto:mtdean@thirdcontact.com" target="_blank">mtdean@thirdcontact.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 12/27/2012 02:17 AM, Bill Meek wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On 12/26/2012 11:20 PM, Nick Rout wrote:<br>
...<br>
</div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Quoting Gabe Rubin:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Cannot find (ping) database host 192.168.1.101 on the network<br>
</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>
...<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Actually it has everything to do with mysql. It is the details myth needs<br>
in order to log in to mysql, which it has to do pretty well as soon as it<br>
starts.<br>
</blockquote>
<br>
Hi;<br>
<br>
Sorry, it's not an issue with the database.<br>
<br>
The diagnostic Gabe posted originally, comes from a simple ping<br>
to the box that hosts the database. See:<br>
<br>
<a href="http://code.mythtv.org/cgit/mythtv/tree/mythtv/libs/libmyth/mythcontext.cpp#n630" target="_blank">http://code.mythtv.org/cgit/<u></u>mythtv/tree/mythtv/libs/<u></u>libmyth/mythcontext.cpp#n630</a><br>
<br>
His error message prints below at line 682. I guessing he's running<br>
on 0.25 since he references mysql.txt. Not so subtle hint to everyone<br>
that it's nice to mention the version you're running on.<br>
<br>
The test of the connection to the database happens on line 693. He also<br>
stated that without the ping, the frontend works.<br>
<br>
That's why I suggested running the frontend with -v system --loglevel debug.<br>
It will print what happens when ping() runs the system call. He's already<br>
said he can ping the machine both from itself, and from a remote host.<br>
<br>
So, if the command line ping works, then we need to see what's actually in<br>
the command being executed.<br>
<br>
As to why the ping is even being done at all, I believe it's because<br>
DBHostName=192.168.1.101, rather than 127.0.0.1, localhost or the<br>
value returned by the hostname command. Any one of the three would<br>
prevent the ping.<br>
<br>
</div></div></blockquote>
<br>
Yes, Bill is exactly correct. MythTV uses the ping system utility, not mysqlping, to test to see if some host exists at the address specified. It's a very simple (though not super reliable) test performed since MythTV will not run without a valid database, so it can't run if it can't talk to the host with the database.<br>
<br>
Note, also, that the ping utility is generally something that requires root permission in modern Linux systems. This is generally handled for non-root users either by setting the sticky bit (which is ugly--and can result in an exploit finding a way to get root access to the system) or a capability allowing the process to send arbitrary packets to the network. So, I recommend you check your ping command:<br>
<br>
ls -l /bin/ping<br>
<br>
and if the sticky bit isn't set, try:<br>
<br>
/sbin/getcap /bin/ping<br>
<br>
and if it doesn't show:<br>
<br>
/bin/ping = cap_net_raw+ep<br>
<br>
you should do:<br>
<br>
sudo setcap cap_net_raw=ep /bin/ping<br>
<br>
and if that doesn't work, you need to get your distro to properly fix the ping utility (either by enabling capabilities on the file system or whatever they feel is best :).<br>
<br>
Note, also, that using a DB address that is not localhost, when on the same host, will result in seriously degraded database performance versus localhost. Using Unix sockets (which is done automatically when you specify localhost for the MySQL server) is much faster than using TCP/IP networking (which is done for routable addresses.<br>
<br>
While we say that you cannot have localhost or 127.0.0.1 anywhere in your MythTV system configuration when you're using multiple hosts in a MythTV system, you can use localhost in your MythTV database configuration on the MythTV host that is also the MySQL host--and, generally, may want to for a) much better communications performance, especially for large results, and b) better reliability (because it no longer depends on system networking support--which is especially nice for these distros with "managers" that like to pull the plug on all networking every time there's a blip in the connection or whatever).<br>
<br>
If you have only one system, though--i.e. the database is always at localhost because you run your single combined frontend/backend system on the same host as your MySQL server--you can just change the DBHostName to localhost (or 127.0.0.1) and it will fix the issue and may result in much better performance, too.<br>
<br>
Mike<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br>"Fixing" ping seemed to do the trick. My FE and BE are on a combined system and I don't intend to any more mythboxes to my setup.<br>
<br>I have modified my ~/.mythtv/msql.txt file so it now reads<br>DBHostName=192.168.1.101<br><br>Thanks for the tip.<br></div></div>