Mailing List Archive

0.19 - local frontend working great , remote frontend not (localhost:6543)
Hi,
With folks help (THANKS!) and a few recompiles I managed to get the
0.19 server upgrade done and working yesterday. As a test I had the
backend record 18 jobs yesterday afternoon and evening using both
tuners. (PVR-150 & PVR-250) It appears that all recorded correctly.
Great results. Thanks again to those that helped.

My last problem now is to get my remote frontends to connect. They
currently do not connect to the backend server, but they are able to
connect to the mysql server. For instance here is remote frontend on
Lightning connecting to backend server dragonfly @ 192.168.1.55. MySQL
connects, but when the frontend want to access listing info it is
asking for localhost:6543 not 192.168.1.55:6543. Why? All my 4 of my
remote frontends are acting this way right now.

mark@lightning ~ $ mythfrontend
2006-07-19 06:24:25.773 Using runtime prefix = /usr
2006-07-19 06:24:25.812 New DB connection, total: 1
2006-07-19 06:24:25.823 Connected to database 'mythconverg' at host:
192.168.1.55
2006-07-19 06:24:25.825 Total desktop dim: 1280x1024, with 1 screen[s].
2006-07-19 06:24:25.829 Using screen 0, 1280x1024 at 0,0
2006-07-19 06:24:25.843 Current Schema Version: 1123
2006-07-19 06:24:25.844 mythfrontend version: 0.19.20060121-2 www.mythtv.org
2006-07-19 06:24:25.844 Enabled verbose msgs: important general
2006-07-19 06:24:26.155 lang0: aar
2006-07-19 06:24:26.155 lang: aar
2006-07-19 06:24:26.162 lang1: aar
2006-07-19 06:24:26.162 lang: aar
2006-07-19 06:24:26.351 Total desktop dim: 1280x1024, with 1 screen[s].
2006-07-19 06:24:26.354 Using screen 0, 1280x1024 at 0,0
2006-07-19 06:24:26.356 Switching to square mode (blue)
2006-07-19 06:24:27.054 Registering Internal as a media playback plugin.
2006-07-19 06:24:41.027 Connecting to backend server: localhost:6543
(try 1 of 5)
2006-07-19 06:24:41.028 Connection timed out.
You probably should modify the Master Server
settings in the setup program and set the
proper IP address.
2006-07-19 06:24:41.964 ProgramList::FromScheduler(): Error querying master.
2006-07-19 06:25:19.057 Connecting to backend server: localhost:6543
(try 1 of 5)
2006-07-19 06:25:19.058 Connection timed out.
You probably should modify the Master Server
settings in the setup program and set the
proper IP address.
2006-07-19 06:25:30.412 Connecting to backend server: localhost:6543
(try 1 of 5)
2006-07-19 06:25:30.412 Connection timed out.
You probably should modify the Master Server
settings in the setup program and set the
proper IP address.
mark@lightning ~ $

My question is where is mythfrontend getting this instruction to
connect to localhost:6543? Internal to the frontend on Lightning it
says the server is at 192.168.1.55 which is Dragonfly's IP address.
I've been searching for a config file that might still have this but I
cannot find it.

mark@lightning ~ $ cat .mythtv/mysql.txt
DBHostName=192.168.1.55
DBUserName=mythtv
DBPassword=mythtv
DBName=mythconverg
DBType=QMYSQL3
<SNIP>

mark@lightning ~ $ ls -al /etc/mythtv/
total 8
drwxr-xr-x 2 root root 4096 Feb 13 14:14 .
drwxr-xr-x 71 root root 4096 Jul 18 20:01 ..
-rw-r--r-- 1 root root 0 Jul 18 16:45 .keep
mark@lightning ~ $

Where else can I look for what is causing this?

Thanks,
Mark
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: 0.19 - local frontend working great , remote frontend not (localhost:6543) [ In reply to ]
Go on your backend computer (Dragonfly) and fire up Mythfrontend.
There's a Settings menu. Somewhere in there (pardon me, I'm not at my
mythbox) there's an option for "Myth Backend" that's going to say
"localhost". Change that to the IP of Dragonfly.

Basically, what's happening is your Mysql table lists "MythBackend" as
"localhost". When Dragonfly starts up mythfrontend, it connects and
queries for "MythBackend". All works fine on Dragonfly, because
"localhost" resolves. However, when Lightningbug connects to mysql,
it asks for the value of "MythBackend" and gets the response
"localhost", which resolves to "Lightning".... which has no backend
service running.

Change the MythBackend Server value on the backend machine
(Dragonfly). There's no reason not to. "localhost" and "<Dragonfly's
IP>" resolve the same way. Hopefully, the next time you fire up
mythfrontend on Lightning, it'll pick up that IP address and run.

--Phill W.

(Hope this isn't too vague, but I'm working from 2-3month old memories
here... and my memory's never good very good. :))
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: 0.19 - local frontend working great , remote frontend not (localhost:6543) [ In reply to ]
Phil,
Thanks. I am sure you are on the right track. However you have
uncovered a problem here with MySQL permissions that I'm not
understanding. I hope you can help.

1) When I change (using mythfrontend or editing .mythtv/mysql.txt) the
backend server value in Dragonfly (the backend) from localhost to
either dragonfly or 192.168.1.55, then local frontend is no longer
able to connect to the server. Change it back to localhost and the
local frontend connect.

2) Since the above implies that the backend machine cannot connect to
mysql on itself, I try the following command sitting on the backend:

mark@dragonfly ~ $ mysql -u mythtv -h dragonfly mythconverg -p
Enter password:
ERROR 1045 (28000): Access denied for user 'mythtv'@'Dragonfly' (using
password: YES)
mark@dragonfly ~ $

So indeed the backend cannot connect to itself through the net. It
only connects when it connects through localhost:

mark@dragonfly ~ $ mysql -u mythtv -h localhost mythconverg -p
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 7 to server version: 4.1.20-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

Bye
mark@dragonfly ~ $

However, if I go to Lightning, one of the remote machines, it will
connect across the network:

mark@lightning ~ $ mysql -u mythtv -h dragonfly mythconverg -p
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 6 to server version: 4.1.20-log

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.


Now, the way I'm trying to grant access is using the commands on this page:

http://www.mythtv.org/docs/mythtv-HOWTO-6.html

<QUOTE>
Finally, if you just want to restrict by IP subnet (in this example,
the 192.168.1. network):

$ mysql -u root mythconverg
identified by "mythtv";
</QUOTE>

Before I did this none of the remote machines could connect, but for
whatever reason the local machine cannot.

Why?

Is there some way to read all the currently installed rules in the
database? I suspect that maybe some rule is overriding this granting
of access for the local machine?

NOTE: I also tried restarting mythbackend and mysql. That wasn't the solution.

Thanks,
Mark


On 7/19/06, Phill Wiggin <alamar@gmail.com> wrote:
> Go on your backend computer (Dragonfly) and fire up Mythfrontend.
> There's a Settings menu. Somewhere in there (pardon me, I'm not at my
> mythbox) there's an option for "Myth Backend" that's going to say
> "localhost". Change that to the IP of Dragonfly.
>
> Basically, what's happening is your Mysql table lists "MythBackend" as
> "localhost". When Dragonfly starts up mythfrontend, it connects and
> queries for "MythBackend". All works fine on Dragonfly, because
> "localhost" resolves. However, when Lightningbug connects to mysql,
> it asks for the value of "MythBackend" and gets the response
> "localhost", which resolves to "Lightning".... which has no backend
> service running.
>
> Change the MythBackend Server value on the backend machine
> (Dragonfly). There's no reason not to. "localhost" and "<Dragonfly's
> IP>" resolve the same way. Hopefully, the next time you fire up
> mythfrontend on Lightning, it'll pick up that IP address and run.
>
> --Phill W.
>
> (Hope this isn't too vague, but I'm working from 2-3month old memories
> here... and my memory's never good very good. :))
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: 0.19 - local frontend working great , remote frontend not (localhost:6543) [ In reply to ]
> -----Original Message-----
> From: mythtv-users-bounces@mythtv.org [mailto:mythtv-users-
> bounces@mythtv.org] On Behalf Of Mark Knecht
> Sent: 19 July 2006 17:01
> To: Discussion about mythtv
> Subject: Re: [mythtv-users] 0.19 - local frontend working great ,remote
> frontend not (localhost:6543)
>
>
> mark@dragonfly ~ $ mysql -u mythtv -h dragonfly mythconverg -p
> Enter password:
> ERROR 1045 (28000): Access denied for user 'mythtv'@'Dragonfly' (using
> password: YES)
> mark@dragonfly ~ $
>
> So indeed the backend cannot connect to itself through the net. It
> only connects when it connects through localhost:
>
> mark@dragonfly ~ $ mysql -u mythtv -h localhost mythconverg -p
> Enter password:
> Reading table information for completion of table and column names
> You can turn off this feature to get a quicker startup with -A
>
<gratuitous-snipping/>
>
> Thanks,
> Mark

Hi Mark,

To check all your permissions for mysql etc, you might try installing
phpmyadmin (or webmin might be worth a looksie, as it can be installed via
yum/smart) and have a good read of the mysql documentation on setting up
permissions.

Using one of the gui tools above makes permission management in mysql a
breeze :-)


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.1/391 - Release Date: 18/07/2006


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: 0.19 - local frontend working great , remote frontend not (localhost:6543) [ In reply to ]
> Phil,
> Thanks. I am sure you are on the right track. However you
> have uncovered a problem here with MySQL permissions that I'm
> not understanding. I hope you can help.

This is detailed in the myth documentation but basically you need to grant
permissions for any user 'mythtv' on your local network. The syntax is
pretty simple.

Bill


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: 0.19 - local frontend working great , remote frontend not (localhost:6543) [ In reply to ]
> 1) When I change (using mythfrontend or editing .mythtv/mysql.txt) the
> backend server value in Dragonfly (the backend) from localhost to
> either dragonfly or 192.168.1.55, then local frontend is no longer
> able to connect to the server. Change it back to localhost and the
> local frontend connect.
>
<snip>
> Is there some way to read all the currently installed rules in the
> database? I suspect that maybe some rule is overriding this granting
> of access for the local machine?
>
> NOTE: I also tried restarting mythbackend and mysql. That wasn't the solution.
>
> Thanks,
> Mark

The permissions are in the mysql database. On my machine, I get something like:

mysql> select host, user from user;
+-----------+---------+
| host | user |
+-----------+---------+
| | mythtv |
| localhost | mythtv |
| localhost | root |
| pvrllama | root |
+-----------+---------+

On this system, all mythtv users get allowed for certain privs. (I
ought to tighten that down, 'eh? ;)) pvrllama is my backend's name.
So, root has privs when connecting from localhost or pvrllama (same
machine), and mythtv has privs from localhost and "any" host.

I think you may be having problems connecting from your backend
possibly from a textual dissimilarity.

Just for giggles, try:

grant all on mythconverg.* to mythtv@"dragonfly" identified by "mythtv";

And see that you have:

mysql> select host, user from user;
+-----------+---------+
| host | user |
+-----------+---------+
| 192.168.1.% | mythtv |
| dragonfly | mythtv |
| localhost | mythtv |
| localhost | root |
+-----------+---------+



--Phill W.

P.S. I love Webmin. it's a swell program, but it may be overkill for
this problem. (it sure does simplify some admin duties though :)) ...
But I don't personally like phpAdmin... personal tastes, no flamewars
please :)
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: 0.19 - local frontend working great , remote frontend not (localhost:6543) [ In reply to ]
Mark Knecht wrote:
> Phil,
> Thanks. I am sure you are on the right track. However you have
> uncovered a problem here with MySQL permissions that I'm not
> understanding. I hope you can help.
>
> 1) When I change (using mythfrontend or editing .mythtv/mysql.txt) the
> backend server value in Dragonfly (the backend) from localhost to
> either dragonfly or 192.168.1.55, then local frontend is no longer
> able to connect to the server. Change it back to localhost and the
> local frontend connect.
>
I think what you need to do is in the settings make sure that 'use a
unique identifier for this frontend' (the wording might be off, but
that's close) is checked, and provide a unique name (preferebly the
hostname) for that frontend. Do this for each frontend, then it will
create separate settings for each frontend, as opposed to trying to
shoehorn each frontend into the same settings. Then you can set the
master backend address/name for each frontend.

Tom

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: 0.19 - local frontend working great , remote frontend not (localhost:6543) [ In reply to ]
On 7/19/06, Phill Wiggin <alamar@gmail.com> wrote:
> > 1) When I change (using mythfrontend or editing .mythtv/mysql.txt) the
> > backend server value in Dragonfly (the backend) from localhost to
> > either dragonfly or 192.168.1.55, then local frontend is no longer
> > able to connect to the server. Change it back to localhost and the
> > local frontend connect.
> >

Alternatively, if fyour frontends are currently working, and your
backend works if you use localhost as the server value in your
mysql.txt (on the backend), you could just leave it like that. :)

--Phill W.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: 0.19 - local frontend working great , remote frontend not (localhost:6543) [ In reply to ]
On 7/19/06, Phill Wiggin <alamar@gmail.com> wrote:
> Go on your backend computer (Dragonfly) and fire up Mythfrontend.
> There's a Settings menu. Somewhere in there (pardon me, I'm not at my
> mythbox) there's an option for "Myth Backend" that's going to say
> "localhost". Change that to the IP of Dragonfly.
>

Hi Phil,
OK. It seems that I finally found what you were talking about. It's
not in the frontend on the backend machine. It's in the application
mythtv-setup. In that app I still had the backend-server address as
localhost. When I changed that to Dragonfly's IP address then the
remote machines started working.

Thanks for the hints and help.

I am still somewhat confused as to why the local frontend must be
set to localhost, and why I cannot seem to grant Dragonfly access
through the network interface, but at least things are starting to
function and the pressure is somewhat off for the next day or two.

Again, thanks for all the help from you and others.

Cheers,
Mark
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: 0.19 - local frontend working great , remote frontend not (localhost:6543) [ In reply to ]
Mark Knecht wrote:
> Phil,
> Thanks. I am sure you are on the right track. However you have
> uncovered a problem here with MySQL permissions that I'm not
> understanding. I hope you can help.


Sounds like you have two concurrent problems going on, both related to
name resolution and authentication. You need to fix both!

You have 3 machines: 1 backend and 2 frontends.
Edit file /etc/hosts on all three machines and make sure that you have
your boxen properly identified. Since I own a proper domain, I have used
a full domain name, but you could just as easily have 'mythbox@my-house'

You need something like:
127.0.0.1 localhost.mandamus.org localhost #Required or things
break!
192.168.1.98 any1.mandamus.org any1
192.168.1.97 any2.mandamus.org any2
192.168.1.96 mythbox.mandamus.org mythbox
192.168.1.95 thinkpad.mandamus.org thinkpad
192.168.1.94 any3.mandamus.org any3
192.168.1.11 netprinter.mandamus.org netprinter
192.168.1.1 linksys.mandamus.org linksys router

Now your machines can resolve each other by name to IP address. Note
that the last two lines allows me to type http://linksys into firefox
and get the admin page of my router. Similarly for the netprinter.

The second problem involves the naming of mysql boxes and the people
allowed to access mysql on the various boxes. This is your other problem.

There are some good pointers deep in the mythtv documentation, as well
as on the wiki. Even better, there is a good explanation of the manner
in which mysql authenticates users in the mysql manual (available as pdf
from mysql)... About Chapter 23... dealing with 'Why can't I sign on?
Access refused' or somesuch.

To look at your setup, log on to mysql at the backend, as the mysql root
user. This gives access to the mysql database which 'mythtv' cannot access.
Then 'use mysql' and 'select host, user, password from user;'
This gives the host and user information kept in the user table. You
will see something like my (very) insecure data:

mysql> select host, user, password from user;
+-------------------+----------+------------------+
| host | user | password |
+-------------------+----------+------------------+
| localhost | root | |
| tor2.mandamus.org | root | |
| %.mandamus.org | mythtv | 0476fc026afffe24 |
| %.mandamus.org | geoffrey | 330040e53766a829 |
| localhost | mythtv | 0476fc026afffe24 |
| localhost | geoffrey | 330040e53766a829 |
+-------------------+----------+------------------+
6 rows in set (0.00 sec)

This is my office desktop machine setup.
Firstly, I should have a password on 'root'. Secondly, I should probably
drop the user 'geoffrey' at localhost access as it is a subset of the
geoffrey@%.mandamus.org' access.

I use this machine as a clone or surrogate for the actual mythbox at
home. Both are BE/FE setups, but this machine has no tuner cards. The
database *thinks* it has tuner cards as the database was originally
copied from the mythbox at a point prior to the first run of
mythfilldatabase. I keep the versions the same. Both have a user
'mythtv' which accesses 'localhost' for the backend That way I can run
mythfilldatabase here and then transfer the progam guide table
information there without problems. (Tables: credits oldprogram people
program programgenres and programrating ONLY).

The line with '%.mandamus.org' is what you want. It will allow user
mythtv database access from any machine (%) in the domain. If you try
access from a frontend machine from the mysql command line, you must
specify the host 'mysql -h backend -u mythtv -pmythtv'

I had problems transferring data if I used the %.mandamus.org setup, as
the mysqldump program tags its output with the host which produced it,
so that you cannot (directly at least) restore onto another host.

A table written on any1.mandamus.org is considered NOT to be the same
table as one on any2.mandamus.org and restoring from file does not work.
Of course, localhost == localhost. ( I suppose I could edit the
mysqldump output instead!)

I used the instruction: "grant all on mythconverg to
'mythtv'@'%.my-house' identified by 'mythtv';"

Try that, and your frontend machines will be differentiated and your
backend will not be confused. Note that you may need to re-set the
backend name in mythtv-setup and the IP. As noted in the thread, you
have been sneaking by, using 'localhost'

Geoff

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users