Author |
Message |
drhood
|
Posted: Sat Feb 22, 2020 8:32 pm |
|
Joined: Mon Jun 05, 2017 8:23 am
Posts: 57
|
Hi All,
After upgrading to larger hard drives, I did a clean re-install of LinHES and restored the last system backup from the MythWeb interface. All was good for about a week (until today). Sign of trouble started after we noticed the entire recent week's of recording were grayed out and mythtv reporting the file was unavailable (older recordings were fine). We found the recent files stored in the system. In case the issue was caused by a broken database table, I did executed the optimize script. However, it was at this moment that the went awry. The system showed the message that the backend was unavailable. I waited 30 minutes and the system did not change. The optimize did not complete, and seemed hung. So, I rebooted and the system refuses to boot up except to a blue screen with the message that the system cannot connect to the backend.
I have restarted mysql (sudo sv start mysql) and the mythbackend (sudo sv start mythbackend); however, the frontend will not boot.
The only thing I could think that changed with the system was a LinHES update had occurred.
Any advice on recovering the system?
Grateful for any suggestions.
|
|
Top |
|
|
knappster
|
Posted: Sun Feb 23, 2020 7:15 am |
|
Joined: Thu Sep 27, 2007 5:44 pm
Posts: 580
|
Have you checked the mythbackend log? It sounds like the system is booting, but that the backend is failing to start. Hopefully the logs would explain why. Perhaps the database is corrupted and you can find more information in the ".err" file in /data/srv/mysql. In looking for the location of that file, I came across a thread (incidentally of yours) with some troubleshooting tips for recovering a corrupted mysql database: viewtopic.php?f=5&t=24761Maybe that will help?
|
|
Top |
|
|
drhood
|
Posted: Sun Mar 01, 2020 12:21 pm |
|
Joined: Mon Jun 05, 2017 8:23 am
Posts: 57
|
knappster wrote: Have you checked the mythbackend log? It sounds like the system is booting, but that the backend is failing to start. Hopefully the logs would explain why. Perhaps the database is corrupted and you can find more information in the ".err" file in /data/srv/mysql. In looking for the location of that file, I came across a thread (incidentally of yours) with some troubleshooting tips for recovering a corrupted mysql database: viewtopic.php?f=5&t=24761Maybe that will help? Thanks knappster for the reply. The linhes_mythbackend.log file did not contain information that gave me a clue. The log file named linhes_myth_mtc.log does seem to contain useful information, which is that the mysql table inuseprograms could not be cleaned and running the optimize script fails with the following error message... "Problem getting tables from the database" I am now stuck as I don't know, cannot recall, or not found, how to resolve a connection issue with mysql. Is it a misconfiguration of usename/password? Is it a locked database table or something similar? Any help troubleshooting mysql will be appreciated. drhood
|
|
Top |
|
|
drhood
|
Posted: Sun Mar 01, 2020 12:36 pm |
|
Joined: Mon Jun 05, 2017 8:23 am
Posts: 57
|
I can add that when I run the command Code: sudo /usr/bin/mysqlcheck mythconverg The following error appears... Code: Got error: 2002: Can't connect to local MySQL server through socket /var/run/mysqld/mysqld.sock' (2) when trying to connect
|
|
Top |
|
|
knappster
|
Posted: Sun Mar 01, 2020 12:48 pm |
|
Joined: Thu Sep 27, 2007 5:44 pm
Posts: 580
|
Can you access the database using the command line? Code: mysql -u mythtv -pmythtv use mythconverg; select * from inuseprograms;
|
|
Top |
|
|
drhood
|
Posted: Sun Mar 01, 2020 12:57 pm |
|
Joined: Mon Jun 05, 2017 8:23 am
Posts: 57
|
knappster wrote: Can you access the database using the command line? Code: mysql -u mythtv -pmythtv use mythconverg; select * from inuseprograms; I can verify that I cannot access the database using the command line. The first command results in the following. Code: $ mysql -u mythtv -pmythtv ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
|
|
Top |
|
|
drhood
|
Posted: Sun Mar 01, 2020 1:02 pm |
|
Joined: Mon Jun 05, 2017 8:23 am
Posts: 57
|
drhood wrote: knappster wrote: Can you access the database using the command line? Code: mysql -u mythtv -pmythtv use mythconverg; select * from inuseprograms; I can verify that I cannot access the database using the command line. The first command results in the following. Code: $ mysql -u mythtv -pmythtv ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) Ooops! I think I can.... When I enter the entire command... Code: mysql -u mythtv -pmythtv use mythconverg; select * from inuseprograms; The following error appears... Code: bash: syntax error near unexpected token 'from'
|
|
Top |
|
|
drhood
|
Posted: Sun Mar 01, 2020 1:10 pm |
|
Joined: Mon Jun 05, 2017 8:23 am
Posts: 57
|
When I use the command Code: mysql -u mythtv -pmythtv use mythconverg The following output appears, Code: show warnings FALSE plugin-dir (No default value) default-auth (No default value) histignore (No default value) binary-mode FALSE connect-expired-password FALSE
|
|
Top |
|
|
drhood
|
Posted: Sun Mar 01, 2020 1:23 pm |
|
Joined: Mon Jun 05, 2017 8:23 am
Posts: 57
|
When I run the following command... Code: ps ax | grep mysql The following appears... Code: 556 ? S 0:00 /bin/sh /usr/bin/mysqld_safe --user=mysql 739 pts/4 R+ 0:00 grep mysql 928 ? Ss 0:01 runsv mysql
Is the first line correct? Any help clue/help will be greatly appreciated.
|
|
Top |
|
|
knappster
|
Posted: Sun Mar 01, 2020 2:22 pm |
|
Joined: Thu Sep 27, 2007 5:44 pm
Posts: 580
|
Mine also includes the following process: Code: 1797 ? Sl 2:32 /usr/bin/mysqld --basedir=/usr --datadir=/data/srv/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=linhes.err --pid-file=linhes.pid --socket=/var/run/mysqld/mysqld.sock --port=3306 What does Code: sudo sv status mysql return? I presume that it will say that it is stopped. You could try Code: sudo sv start mysql and it will most likely error out, but it might be useful data. Do you have a file /etc/mysql/my.cnf?
|
|
Top |
|
|
drhood
|
Posted: Sun Mar 01, 2020 2:52 pm |
|
Joined: Mon Jun 05, 2017 8:23 am
Posts: 57
|
knappster wrote: Mine also includes the following process: Code: 1797 ? Sl 2:32 /usr/bin/mysqld --basedir=/usr --datadir=/data/srv/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=linhes.err --pid-file=linhes.pid --socket=/var/run/mysqld/mysqld.sock --port=3306 What does Code: sudo sv status mysql return? I presume that it will say that it is stopped. You could try Code: sudo sv start mysql and it will most likely error out, but it might be useful data. Do you have a file /etc/mysql/my.cnf? Thank you for the reply. The Code: $ sudo sv status mysql down: mysql: ls, normally up, want up $ sudo sv start mysql ok: run: mysql: (pid 30404) 0s $sudo sv status mysql run: mysql: (pid 31189) ls $ mysql -u mythtv -pmythtv Warning using a password on the command line can be insecure. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) Any help on how to troubleshoot will be appreciated.
|
|
Top |
|
|
knappster
|
Posted: Sun Mar 01, 2020 6:52 pm |
|
Joined: Thu Sep 27, 2007 5:44 pm
Posts: 580
|
Could your database partition be full? What is the output of Code: df -h ?
|
|
Top |
|
|
drhood
|
Posted: Sun Mar 01, 2020 7:49 pm |
|
Joined: Mon Jun 05, 2017 8:23 am
Posts: 57
|
knappster wrote: Could your database partition be full? What is the output of Code: df -h ? There is plenty of available space. The df -h command results in the following 14% used space (19 Gb available) in / 16% used space (2.2 Gb available) in /data/srv/mysql Any assistance will be appreciated.
|
|
Top |
|
|
knappster
|
Posted: Mon Mar 02, 2020 7:08 pm |
|
Joined: Thu Sep 27, 2007 5:44 pm
Posts: 580
|
This may have been overlooked earlier, but have you checked the contents of: /data/srv/mysql/linhes.err
|
|
Top |
|
|
sparks
|
Posted: Wed Mar 11, 2020 8:37 am |
|
Joined: Sun Nov 13, 2005 5:56 pm
Posts: 104
|
Have you checked for the existence of the socket, /var/run/mysqld/mysqld.sock?
s
|
|
Top |
|
|