View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 10 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sat Nov 13, 2010 8:36 am 
Offline
Joined: Wed May 09, 2007 8:47 pm
Posts: 367
Location: Minnesota- Brrrrr!
My forum search was not fruitful. I have had LinHES 6.2 working for a few months. Yesterday, all recorded TV shows disappeared from the list. I rebooted the machine and that’s when the trouble really started. I am stuck in the Database Configuration screens.

The reboot sequence is different now:

1) it asks for your preferred language.
2) Message: No UPnP backends found
3) Database Configuration pp. 1 of 2
“Myth could not connect to the database. Please verify your database settings”:

• Hostname = localhost
• Ping test Server = checked
• Port = blank (blank is default = 3306)
• Database name = mythconverg
• User: mythtv
• Password: mythtv

Database Configuration pp. 2 of 2

Settings:
• Use Custom Identifier for frontend preferences = Unchecked
• Enable Database Server wakeup = Unchecked

I have attempted to login to mySQL from the command line:
Code:
[root@mythtv ~]# mysql -u root mythconverg
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)
[root@mythtv ~]# mysql -u mythtv  mythconverg
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)


QUESTIONS
==========
1) If you have seen this problem before (database logon?) , what is the trouble shooting procedure? I think this is DB logon problem but not 100% sure.
2) What happened? I would like to prevent this from happening again.

Thanks in advance for actionable insight.

_________________
R7.3: 0.22.20091023-1, Hauppauge PVR-500 (Philips FQ1236A MK4), Gigabyte Gigabyte EG45M-UD2H, E5200 2.4Ghz, 2GB RAM, NVIDIA GEFORCE 256MB


Last edited by gatorback on Sat Nov 13, 2010 3:33 pm, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 13, 2010 3:11 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Make sure that "localhost" is one word (no spaces), or use the loopback address 127.0.0.1 that it should be mapped too.

Other things to check:

- Use pgrep to see if the db server is running.
Code:
[root@black2 ~]# pgrep -fl mysql
4343 runsv mysql
4385 /usr/sbin/mysqld --skip-name-resolve -u mysql


- Check that localhost is mapped to the right address
Code:
[root@black2 log]# grep localhost /etc/hosts
127.0.0.1       black2 localhost


- Check your network config
Code:
[root@black2 log]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:04:61:92:7E:F6 
          inet addr:192.168.1.103  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::204:61ff:fe92:7ef6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:9000  Metric:1
          RX packets:650148 errors:0 dropped:0 overruns:0 frame:0
          TX packets:442351 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:757554053 (722.4 Mb)  TX bytes:38646679 (36.8 Mb)
          Interrupt:23 Base address:0x4000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:36586 errors:0 dropped:0 overruns:0 frame:0
          TX packets:36586 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:36609143 (34.9 Mb)  TX bytes:36609143 (34.9 Mb)


- Well, that's enough to get you started.

I ran into a problem after installing R6 where the config was trying to use my host name (black2), but that was bound to the ethernet (eth0) rather than the loopback (lo) device.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 13, 2010 3:32 pm 
Offline
Joined: Wed May 09, 2007 8:47 pm
Posts: 367
Location: Minnesota- Brrrrr!
Thank you for the very specific and actionable guidance.

As you can see my hostname is mythtv (not very original). I verfied that that localhost was one word with (no space). Tried replacing the string with 127.0.0.1. No joy. Replaced 127.0.0.1 with original hostname (mythtv).

System indicates that credentials \ PW are problematic. I am unable to logon into mySQL from the command line. I am hoping to avoid a fresh install.

As prescribed: here are the test results.

Code:
[root@mythtv ~]# pgrep -fl mysql
4547 runsv mysql


Code:
[root@mythtv ~]# grep localhost /etc/hosts
127.0.0.1 mythtv localhost


Code:
[root@mythtv ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
          inet addr:192.168.8.105  Bcast:192.168.8.255  Mask:255.255.255.0
          inet6 addr: fe80::6ef0:49ff:fe05:e6b3/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:14207 errors:0 dropped:0 overruns:0 frame:0
          TX packets:246304 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1495757 (1.4 Mb)  TX bytes:85331825 (81.3 Mb)
          Interrupt:252 Base address:0x4000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:88 errors:0 dropped:0 overruns:0 frame:0
          TX packets:88 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5848 (5.7 Kb)  TX bytes:5848 (5.7 Kb)


Code:
[root@mythtv ~]# ping -c 3 localhost
PING mythtv (127.0.0.1) 56(84) bytes of data.
64 bytes from mythtv (127.0.0.1): icmp_seq=1 ttl=64 time=0.017 ms
64 bytes from mythtv (127.0.0.1): icmp_seq=2 ttl=64 time=0.015 ms
64 bytes from mythtv (127.0.0.1): icmp_seq=3 ttl=64 time=0.031 ms



Code:
[root@mythtv ~]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)

_________________
R7.3: 0.22.20091023-1, Hauppauge PVR-500 (Philips FQ1236A MK4), Gigabyte Gigabyte EG45M-UD2H, E5200 2.4Ghz, 2GB RAM, NVIDIA GEFORCE 256MB


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 13, 2010 10:20 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1343
Location: Orlando FL
try the lan IP for your mythtv box also check to see how much room you have on your root partition my whole system went haywire when I ran out of room.

_________________
My System


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 14, 2010 1:37 pm 
Offline
Joined: Wed May 09, 2007 8:47 pm
Posts: 367
Location: Minnesota- Brrrrr!
@mattbatt: Good call. I do not know what is a reasonable amount of space would be, however, this is my test. If there is another test, please let me know the syntax and will post ther results.

Code:
[root@mythtv ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             4.9G  4.4G  169M  97% /
none                  996M     0  996M   0% /dev/shm
/dev/sda3             181G  128G   44G  75% /myth


97% of the partition one is used. This is the first time I've checked this so the question is what is a reasoable range. If this diskspace is the issue, how did you resolve this problem?

_________________
R7.3: 0.22.20091023-1, Hauppauge PVR-500 (Philips FQ1236A MK4), Gigabyte Gigabyte EG45M-UD2H, E5200 2.4Ghz, 2GB RAM, NVIDIA GEFORCE 256MB


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 14, 2010 5:34 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
This looks like your problem. The start up script is running, but the DB server process is not.. There should be a mysqld process. You need to figure out why that server isn't starting properly.
gatorback wrote:
Code:
[root@mythtv ~]# pgrep -fl mysql
4547 runsv mysql


Try running the server using the command shown in my pgrep output above, but adding the "--verbose" option. That may provide some clues as to what the problem is.


Top
 Profile  
 
 Post subject: Dazed & Confused...
PostPosted: Sun Nov 14, 2010 8:16 pm 
Offline
Joined: Wed May 09, 2007 8:47 pm
Posts: 367
Location: Minnesota- Brrrrr!
OK, I am not complaining because it has somehow booted to a normal screen (there was a brief power failure this morning). I can now see the programs that were recorded.

I ran some tests again

Code:
[root@mythtv ~]# pgrep -fl mysql
4658 runsv mysql
4725 /usr/sbin/mysqld --skip-name-resolve -u mysql
[root@mythtv ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             4.9G  4.5G  158M  97% /
none                  996M     0  996M   0% /dev/shm
/dev/sda3             181G  128G   44G  75% /myth


@tjc: please advise the syntax of the verbose command you would like executed. Thanks.

Code:
[root@mythtv ~]# mysql -u root mythconverg
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 31
Server version: 5.0.75 Source distribution

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

mysql>


I am not sure what was wrong with the database. Any command syntax to probe the database to test theories are appreciated.

_________________
R7.3: 0.22.20091023-1, Hauppauge PVR-500 (Philips FQ1236A MK4), Gigabyte Gigabyte EG45M-UD2H, E5200 2.4Ghz, 2GB RAM, NVIDIA GEFORCE 256MB


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 14, 2010 9:13 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Hmmm... DB server eems to be running now, but your space in the root partition is _really_ low. At a guess you ran out of space while the DB was trying to do some update and "bad stuff" happened.

Can you login as mythtv? Try this (default pw is the same as the user name):
Code:
mysql -u mythtv mythconverg


If that works try running one of the DB repair and optimization scripts to see what they complain about. Either optimize_db.sh or optimize_mythdb.pl should work.

We've see other people lose the mysql management schema which contains all the passwords and other administrative data for the DB. There are ways to fix that up but they're moderately involved.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 15, 2010 11:54 am 
Offline
Joined: Wed May 09, 2007 8:47 pm
Posts: 367
Location: Minnesota- Brrrrr!
I was not successful logging in with my first try. However, I have had success loggin in the past using the mythtv username to create an ERD.

Code:
[root@mythtv ~]# mysql -u mythtv
ERROR 1045 (28000): Access denied for user 'mythtv'@'localhost' (using password: NO)
[root@mythtv ~]#


I did a little homework (Google is my friend) and found that I could login if by appending -p to the command:

Code:
[root@mythtv ~]# mysql -u mythtv -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 70
Server version: 5.0.75 Source distribution

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

mysql> exit
Bye


OK so now let's extend this to mythconverg database.

Code:
[root@mythtv ~]# mysql -u mythtv -p mythconverg
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 72
Server version: 5.0.75 Source distribution

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


Before I run either optimize_db.sh or optimize_mythdb.pl experiment, should we expect that the diskspace be reduced? or is the purely a diagnostic? If you have any recommended syntax for running either command that would be appreciated, as it would be best to get it right on the first try. I have no experience running a .pl script and syntax help be appreciated. I think that the syntax for foo.sh is:

Code:
[root@mythtv ~]#sh foo.sh > logfile.txt


Confirmation before I execute would be appreciated.

As you can see I am up from 97% (yesterday) to 98% (today). Yikes Thank you.

Code:
[root@mythtv ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             4.9G  4.5G  139M  98% /
none                  996M     0  996M   0% /dev/shm
/dev/sda3             181G  113G   59G  66% /myth

_________________
R7.3: 0.22.20091023-1, Hauppauge PVR-500 (Philips FQ1236A MK4), Gigabyte Gigabyte EG45M-UD2H, E5200 2.4Ghz, 2GB RAM, NVIDIA GEFORCE 256MB


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 15, 2010 10:56 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
If the script is set up properly (and those are) you should be able to just run them by typing the name.

It looks like the options out of the box with R6 are optimize_mythdb.py and optimize_mythdb.pl. Both appear to do pretty much the same thing.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 148 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:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu