View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 19 posts ] 
Go to page 1, 2  Next

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Mon Mar 13, 2006 1:39 pm 
Offline
Joined: Sun Dec 04, 2005 1:44 pm
Posts: 403
Location: Central NJ
I can't get my remote frontend to successfully connect to my backend. (Frontend on backend server works fine.) The myth frontend will load properly, but will display a message stating that it cannot connect to the database. After exiting the frontend, I can see this error at the command line:
Code:
Connecting to backend server: localhost:6543 (try 1 of 5)
Connection timed out.


My issue seems to be that the frontend is trying to connect to the database on "localhost" - where it obviously isn't going to find it. The problem is that I can't seem to find the setting to change to correct this. My frontend is running on an Xbox, but at this point I think the problem is on my backend.

My remote frontend general settings are: (Note: 192.168.2.148 is the correct IP of my backend/database)
Code:
Host name: 192.168.2.148
Database: mythconverg
User: mythtv
Password: mythtv
Database type: MySQL


My backend general settings are:
Code:
IP address for mythtv: 192.168.2.148
Port the server runs on: 6543
Port the server shows status on: 6544
Master Server IP address: 192.168.2.148
Port the master server runs on: 6543


If I attempt to log into my backend database from the command line on my frontend with user mythtv, it works successfully, so I don't think it is a permissions thing. The following command works fine from my remote frontend:
Code:
mysql -u mythtv -p -h 192.168.2.148


Another thing that seems strange is that from my backend, I can type: (with a blank password)
Code:
mysql -u root -p -h localhost


....and successfully get in to my db.

But, if I type:
Code:
mysql -u root -p -h 192.168.2.148


It doesn't let me in!!

Where could the frontend be getting the idea that it should connect to "locallost" for the database?

_________________
Currently running: R5.5, HD5000 x 2, PVR150, Athlon 64 3000+, Chaintech VNF4, 1GB RAM, 2 x 250GB in LVM, MSI NX6200TC -> AA 9A60 -> HDTV


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 2:05 pm 
Offline
Joined: Tue Feb 21, 2006 2:25 pm
Posts: 39
First place to look is mysql.txt in <frontend-user-home>/.mythtv, I think I'm right in saying that this is where the frontend looks for db info. As for the mysql to 192.168.2.148 not working, could it be that your root user on that server needs a password?

To avoid confusion, stop the local mysql server on the frontend - /etc/init.d/mysql stop . Remember that when you reboot, the server will start again, so do not reboot until you've fixed the problem. Then search the wiki for update-rc.d to find out how to stop the local mysql for good.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 2:38 pm 
Offline
Joined: Sun Dec 04, 2005 1:44 pm
Posts: 403
Location: Central NJ
My frontend boots with user mce

I believe my /home/mce/.mythtv/mysql.txt is correct:

Code:
DBHostName=192.168.2.148
DBUserName=mythtv
DBPassword=mythtv
DBName=mythconverg
DBType=QMYSQL3


I'll try your suggestion tonight.

_________________
Currently running: R5.5, HD5000 x 2, PVR150, Athlon 64 3000+, Chaintech VNF4, 1GB RAM, 2 x 250GB in LVM, MSI NX6200TC -> AA 9A60 -> HDTV


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 4:35 pm 
Offline
Joined: Tue Feb 21, 2006 2:25 pm
Posts: 39
Well, according to your mysql.txt, you use password 'mythtv', yet when you connect to the backend via the command-line, you don't use a password. Do you have to type a password in after issung the mysql command, or do you press enter on the p/w prompt? I'd double-check that mce is really the frontend user, as all looks well with that file. Try a locate mysql.txt and make sure no other files are stepping in front.

I notice that I have a mysql.txt in /etc/mythtv, change that too to be sure.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 6:09 pm 
Offline
Joined: Sun Dec 04, 2005 1:44 pm
Posts: 403
Location: Central NJ
Yes, I do have to type "mythtv' as the password.

/etc/mythtv/mysql.txt has the correct settings.

_________________
Currently running: R5.5, HD5000 x 2, PVR150, Athlon 64 3000+, Chaintech VNF4, 1GB RAM, 2 x 250GB in LVM, MSI NX6200TC -> AA 9A60 -> HDTV


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 9:38 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Go take a look at Cecil's frontend installation instructions (http://www.mysettopbox.tv/doc.html#frontend). I seem to recall that you have to fix some mysql setting on the backend so that mysql will allow remote network connections... Try searching for "mysql" and "network" as key words...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 11:30 pm 
Offline
Joined: Mon May 10, 2004 8:08 pm
Posts: 1891
Location: Adelaide, Australia
This page on the wiki has the details.
http://knoppmythwiki.org/index.php?page ... nlyInstall


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 13, 2006 11:41 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Actually I was thinking about this bit from "The Pamphlet of KnoppMyth":
Quote:
If you are running KnoppMyth as your backend server, Then on the backend:
    - Edit /etc/mysql/my.cnf, comment out 'skip-networking'. The backend will only accept the mythtv user with a password of mythtv.
    Before:
    skip-networking
    After
    # skip-networking

    - Restart MySQL(as root)
    # /etc/init.d/mysql restart

    - Reconfigure MythTV (as the mythtv user)
    $ mythtv-setup
    On screen 1 change 127.0.0.1(both instances) to the actual IP of the backend server.
    <ESC> out of the myth-setup.
End of backend section.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 14, 2006 9:09 am 
Offline
Joined: Sun Dec 04, 2005 1:44 pm
Posts: 403
Location: Central NJ
tjc wrote:
Actually I was thinking about this bit from "The Pamphlet of KnoppMyth":
Quote:
If you are running KnoppMyth as your backend server, Then on the backend:
    - Edit /etc/mysql/my.cnf, comment out 'skip-networking'. The backend will only accept the mythtv user with a password of mythtv.
    Before:
    skip-networking
    After
    # skip-networking

    - Restart MySQL(as root)
    # /etc/init.d/mysql restart

    - Reconfigure MythTV (as the mythtv user)
    $ mythtv-setup
    On screen 1 change 127.0.0.1(both instances) to the actual IP of the backend server.
    <ESC> out of the myth-setup.
End of backend section.


I've actually already commented out skip-networking. I've also changed the IP address in the general setting on the backend. (I noted that in the original post.)

_________________
Currently running: R5.5, HD5000 x 2, PVR150, Athlon 64 3000+, Chaintech VNF4, 1GB RAM, 2 x 250GB in LVM, MSI NX6200TC -> AA 9A60 -> HDTV


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 15, 2006 12:32 am 
Offline
Joined: Tue Jul 12, 2005 8:01 am
Posts: 670
Location: Salem, MA
This has already been posted, but let me re-iterate:
change/create the file /etc/mysql.txt to reflect what you've already done for /home/mce/.mythtv/mysql.txt

Easiest way is to cp /home/mce/.mythtv/mysql.txt /etc/mysql.txt

if that doesn't work, follow these instructions:
http://knoppmythwiki.org/index.php?page ... nlyInstall

They work, trust me!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 16, 2006 8:17 am 
Offline
Joined: Sun Dec 04, 2005 1:44 pm
Posts: 403
Location: Central NJ
I did the copy, and then I ran through the commands on the linked install. Still no dice. :(

_________________
Currently running: R5.5, HD5000 x 2, PVR150, Athlon 64 3000+, Chaintech VNF4, 1GB RAM, 2 x 250GB in LVM, MSI NX6200TC -> AA 9A60 -> HDTV


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 16, 2006 3:57 pm 
Offline
Joined: Tue Feb 21, 2006 2:25 pm
Posts: 39
I know what's wrong with your mysql commands. I just tried the same on my server - mysql ... -h localhost let me in fine. But mysql ... -h <the server IP> refused. That's down to the mysql privileges - there is an entry for root@localhost, but not root@<ip>. So it refuses entry because effectively the user I tried doesn't exist.

Though that doesn't explain why your frontend tries to connect to localhost instead of the IP. Now you've copied the mysql.txt file, that could be fixed. So, run this bit of SQL on your backend:

Code:
GRANT ALL PRIVILEGES ON * . * TO "mythtv"@ "192.168.2.148" WITH GRANT OPTION ;


Even better, replace the IP above with %, that should ensure that any host can connect with username mythtv.

Only do this if your mysql server is protected by your LAN, and not exposed to the Internet.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 17, 2006 1:09 pm 
Offline
Joined: Sun Dec 04, 2005 1:44 pm
Posts: 403
Location: Central NJ
Code:
GRANT ALL PRIVILEGES ON *.* TO 'mythtv'@ '192.168.2.148' WITH GRANT OPTION ;


I ran the command both with and without the %. Unfortunately it didn't fix the problem.

I keep seeing this every time I try to connect:

Code:
2006-03-17 20:00:48.285 Connecting to backend server: localhost:6543 (try 1 of 5)
2006-03-17 20:00:48.286 Connection timed out.         
                        You probably should modify the Master Server
                        settings in the setup program and set the   
                        proper IP address.


Can anyone tell me why I'm seeing localhost:6543 when I have the backend IP address listed in the General Setup of both my backend and frontend, as well at my mysql.txt file? I think that is the root of this problem.

_________________
Currently running: R5.5, HD5000 x 2, PVR150, Athlon 64 3000+, Chaintech VNF4, 1GB RAM, 2 x 250GB in LVM, MSI NX6200TC -> AA 9A60 -> HDTV


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 17, 2006 4:14 pm 
Offline
Joined: Tue Feb 21, 2006 2:25 pm
Posts: 39
Well, I'm mystified. I just looked at my setup, I notice that each user who runs the frontend has their own mysql.txt in <home>/.mythtv. I changed my database setting (on a screen titled "Database Configuration 1/2" and after choosing Next all the way through, it updated mysql.txt in that user's home. Other users were not affected. So I 'll ask to double-check that the user you think is running the frontend really is doing so. In the frontend do an alt-x and type 'whoami'. Sorry to task in such basic terms but I can't think what else could be causing the problem.

Also try ll $(locate mysql.txt) and find all your mysql.txt files. View them all and see if any mention localhost.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 20, 2006 9:09 am 
Offline
Joined: Tue Jul 12, 2005 8:01 am
Posts: 670
Location: Salem, MA
I just thought of something. Are you using the ip address in the mysql.txt file, or the name of the server? If you are using the name of the server, you may want to edit your /etc/hosts file to match the name of the server to the ip.

Or, you could try this (may break other stuff, though):
If your machine insists on trying to connect to the database through localhost, change localhost in your /etc/hosts file from 127.0.0.1 to the ip of your backend.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ] 
Go to page 1, 2  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 27 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu