DB отвалилась - Can't connect to database (2002: No such file or directory)

Проблемы/вопросы, связанные с запуском под различными платформами и конфигурациями.

Модератор: immortal

Ответить
DiminatorDK
Сообщения: 104
Зарегистрирован: Сб фев 20, 2016 12:19 pm
Благодарил (а): 7 раз
Поблагодарили: 2 раза

DB отвалилась - Can't connect to database (2002: No such file or directory)

Сообщение DiminatorDK » Вт мар 17, 2020 5:03 pm

Все отлично работало несколько месяцев с момента установки, сегодня утром встал на экране планшета вот такая замечательная надпись:
Can't connect to database (2002: No such file or directory)

syslog
Mar 17 07:17:43 SmartHouse mysqld[892]: 2020-03-17 7:17:43 1995652912 [Note] /usr/sbin/mysqld (mysqld 10.1.23-MariaDB-9+deb9u1) starting as process 892 ...
Mar 17 07:17:43 SmartHouse systemd[1]: nmbd.service: Supervising process 910 which is not our child. We'll most likely not notice when it exits.
Mar 17 07:17:43 SmartHouse systemd[1]: Started Samba NMB Daemon.
Mar 17 07:17:46 SmartHouse kernel: [ 49.192161] Voltage normalised (0x00000000)
Mar 17 07:17:46 SmartHouse systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Mar 17 07:17:46 SmartHouse systemd[1]: Failed to start MariaDB database server.
Mar 17 07:17:46 SmartHouse systemd[1]: mariadb.service: Unit entered failed state.
Mar 17 07:17:46 SmartHouse systemd[1]: mariadb.service: Failed with result 'exit-code'.
Mar 17 07:17:46 SmartHouse systemd[1]: Starting Real time performance monitoring...
Mar 17 07:17:47 SmartHouse systemd[1]: Started Real time performance monitoring.

majordomo.log
23:00:38 Closing thread: exec php -q ./scripts/cycle_websockets.php --params "a:0:{}" > /dev/null 2>&1
23:00:41 Starting thread: exec php -q ./scripts/cycle_websockets.php --params "a:0:{}" > /dev/null 2>&1
05:00:46 Closing thread: exec php -q ./scripts/cycle_websockets.php --params "a:0:{}" > /dev/null 2>&1
05:00:49 Starting thread: exec php -q ./scripts/cycle_websockets.php --params "a:0:{}" > /dev/null 2>&1

ssh
pi@SmartHouse:~ $ sudo service mysql start
sudo: unable to resolve host SmartHouse
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
pi@SmartHouse:~ $ systemctl status mariadb.service
● mariadb.service - MariaDB database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2020-03-17 16:24:39 MSK; 1min 25s ago
Process: 7326 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (co
Process: 7215 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/g
Process: 7194 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited
Process: 7183 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited,
Main PID: 7326 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"

Mar 17 16:24:34 SmartHouse systemd[1]: Starting MariaDB database server...
Mar 17 16:24:36 SmartHouse mysqld[7326]: 2020-03-17 16:24:36 1995468592 [Note] /usr/sbin/mysqld (mysql
Mar 17 16:24:39 SmartHouse systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAI
Mar 17 16:24:39 SmartHouse systemd[1]: Failed to start MariaDB database server.
Mar 17 16:24:39 SmartHouse systemd[1]: mariadb.service: Unit entered failed state.
Mar 17 16:24:39 SmartHouse systemd[1]: mariadb.service: Failed with result 'exit-code'.
...skipping...
● mariadb.service - MariaDB database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2020-03-17 16:24:39 MSK; 1min 25s ago
Process: 7326 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (co
Process: 7215 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/g
Process: 7194 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited
Process: 7183 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited,
Main PID: 7326 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
Mar 17 16:24:34 SmartHouse systemd[1]: Starting MariaDB database server...
Mar 17 16:24:36 SmartHouse mysqld[7326]: 2020-03-17 16:24:36 1995468592 [Note] /usr/sbin/mysqld (mysql
Mar 17 16:24:39 SmartHouse systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAI
Mar 17 16:24:39 SmartHouse systemd[1]: Failed to start MariaDB database server.
Mar 17 16:24:39 SmartHouse systemd[1]: mariadb.service: Unit entered failed state.
Mar 17 16:24:39 SmartHouse systemd[1]: mariadb.service: Failed with result 'exit-code'.
~

Помогите восстановить!
DiminatorDK
Сообщения: 104
Зарегистрирован: Сб фев 20, 2016 12:19 pm
Благодарил (а): 7 раз
Поблагодарили: 2 раза

Re: DB отвалилась - Can't connect to database (2002: No such file or directory)

Сообщение DiminatorDK » Вт мар 17, 2020 6:44 pm

mysql: error.log
Cannot find checkpoint record at LSN (1,0x234b)

2020-03-17 7:17:43 1995652912 [ERROR] mysqld: Aria recovery failed. Please run aria_chk -r on all Aria tables and delete all aria_log.######## files
2020-03-17 7:17:43 1995652912 [ERROR] Plugin 'Aria' init function returned error.
2020-03-17 7:17:43 1995652912 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2020-03-17 7:17:43 1995652912 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2020-03-17 7:17:43 1995652912 [Note] InnoDB: The InnoDB memory heap is disabled
2020-03-17 7:17:43 1995652912 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-03-17 7:17:43 1995652912 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2020-03-17 7:17:43 1995652912 [Note] InnoDB: Compressed tables use zlib 1.2.8
2020-03-17 7:17:43 1995652912 [Note] InnoDB: Using Linux native AIO
2020-03-17 7:17:43 1995652912 [Note] InnoDB: Using generic crc32 instructions
2020-03-17 7:17:43 1995652912 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2020-03-17 7:17:43 1995652912 [Note] InnoDB: Completed initialization of buffer pool
2020-03-17 7:17:43 1995652912 [Note] InnoDB: Highest supported file format is Barracuda.
2020-03-17 7:17:43 1995652912 [Note] InnoDB: The log sequence numbers 0 and 0 in ibdata files do not match the log sequence number 1600899 in the ib_logfiles!
2020-03-17 7:17:43 1995652912 [Note] InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
2020-03-17 7:17:43 1995652912 [Note] InnoDB: 128 rollback segment(s) are active.
2020-03-17 7:17:43 1995652912 [Note] InnoDB: Waiting for purge to start
2020-03-17 7:17:44 1995652912 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.35-80.0 started; log sequence number 1600899
2020-03-17 7:17:44 1442816832 [Note] InnoDB: Dumping buffer pool(s) not yet started
2020-03-17 7:17:44 1995652912 [Note] Plugin 'FEEDBACK' is disabled.
2020-03-17 7:17:44 1995652912 [ERROR] Aria engine is not enabled or did not start. The Aria engine must be enabled to continue as mysqld was configured with --with-aria-tmp-tables
2020-03-17 7:17:44 1995652912 [ERROR] Aborting
DiminatorDK
Сообщения: 104
Зарегистрирован: Сб фев 20, 2016 12:19 pm
Благодарил (а): 7 раз
Поблагодарили: 2 раза

Re: DB отвалилась - Can't connect to database (2002: No such file or directory)

Сообщение DiminatorDK » Вт мар 17, 2020 7:14 pm

DiminatorDK
Сообщения: 104
Зарегистрирован: Сб фев 20, 2016 12:19 pm
Благодарил (а): 7 раз
Поблагодарили: 2 раза

Re: DB отвалилась - Can't connect to database (2002: No such file or directory)

Сообщение DiminatorDK » Вт мар 17, 2020 7:31 pm

в итоге после переименования и ребута все заработало в логах mysql вот такое
Мде. И не понятно как много еще сюрпризов будет и как долго проработает.


2020-03-17 19:13:46 1996246832 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2020-03-17 19:13:46 1996246832 [Note] InnoDB: The InnoDB memory heap is disabled
2020-03-17 19:13:46 1996246832 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-03-17 19:13:46 1996246832 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2020-03-17 19:13:46 1996246832 [Note] InnoDB: Compressed tables use zlib 1.2.8
2020-03-17 19:13:46 1996246832 [Note] InnoDB: Using Linux native AIO
2020-03-17 19:13:46 1996246832 [Note] InnoDB: Using generic crc32 instructions
2020-03-17 19:13:46 1996246832 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2020-03-17 19:13:46 1996246832 [Note] InnoDB: Completed initialization of buffer pool
2020-03-17 19:13:46 1996246832 [Note] InnoDB: Highest supported file format is Barracuda.
2020-03-17 19:13:46 1996246832 [Note] InnoDB: The log sequence numbers 0 and 0 in ibdata files do not match the log sequence number 1600899 in the ib_logfiles!
2020-03-17 19:13:47 1996246832 [Note] InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
2020-03-17 19:13:47 1996246832 [Note] InnoDB: 128 rollback segment(s) are active.
2020-03-17 19:13:47 1996246832 [Note] InnoDB: Waiting for purge to start
2020-03-17 19:13:47 1996246832 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.35-80.0 started; log sequence number 1600899
2020-03-17 19:13:47 1430233920 [Note] InnoDB: Dumping buffer pool(s) not yet started
2020-03-17 19:13:47 1996246832 [Note] Plugin 'FEEDBACK' is disabled.
2020-03-17 19:13:47 1996246832 [Note] Recovering after a crash using tc.log
2020-03-17 19:13:47 1996246832 [Note] Starting crash recovery...
2020-03-17 19:13:47 1996246832 [Note] Crash recovery finished.
2020-03-17 19:13:47 1996246832 [Note] Server socket created on IP: '127.0.0.1'.
2020-03-17 19:13:47 1954538304 [Warning] InnoDB: Cannot open table mysql/gtid_slave_pos from the internal data dictionary of InnoDB though the .frm file for the table exists. See http://dev.mysql.com/doc/refman/5.6/en/ ... oting.html for how you can resolve the problem.
2020-03-17 19:13:47 1954538304 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1932: Table 'mysql.gtid_slave_pos' doesn't exist in engine
2020-03-17 19:13:47 1996246832 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.1.23-MariaDB-9+deb9u1' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Raspbian 9.0
2020-03-17 19:13:47 1954333504 [ERROR] mysqld: Table './db_terminal/project_modules' is marked as crashed and should be repaired
2020-03-17 19:13:47 1954333504 [Warning] Checking table: './db_terminal/project_modules'
2020-03-17 19:13:47 1954333504 [ERROR] mysqld: Table './db_terminal/objects' is marked as crashed and should be repaired
2020-03-17 19:13:47 1954333504 [Warning] Checking table: './db_terminal/objects'
2020-03-17 19:13:47 1954333504 [ERROR] mysqld: Table './db_terminal/properties' is marked as crashed and should be repaired
2020-03-17 19:13:47 1954333504 [Warning] Checking table: './db_terminal/properties'
2020-03-17 19:13:47 1954333504 [ERROR] mysqld: Table './db_terminal/pvalues' is marked as crashed and should be repaired
2020-03-17 19:13:47 1954333504 [Warning] Checking table: './db_terminal/pvalues'
2020-03-17 19:13:47 1954333504 [ERROR] mysqld: Table './db_terminal/phistory' is marked as crashed and should be repaired
2020-03-17 19:13:47 1954333504 [Warning] Checking table: './db_terminal/phistory'
2020-03-17 19:13:48 1954333504 [ERROR] mysqld: Table './db_terminal/phistory_queue' is marked as crashed and should be repaired
2020-03-17 19:13:48 1954333504 [Warning] Checking table: './db_terminal/phistory_queue'
2020-03-17 19:13:48 1954333504 [ERROR] mysqld: Table './db_terminal/methods' is marked as crashed and should be repaired
2020-03-17 19:13:48 1954333504 [Warning] Checking table: './db_terminal/methods'
2020-03-17 19:13:49 1954128704 [ERROR] mysqld: Table './db_terminal/mqtt' is marked as crashed and should be repaired
2020-03-17 19:13:49 1954128704 [Warning] Checking table: './db_terminal/mqtt'
2020-03-17 19:13:49 1954333504 [ERROR] mysqld: Table './db_terminal/jobs' is marked as crashed and should be repaired
2020-03-17 19:13:49 1954333504 [Warning] Checking table: './db_terminal/jobs'
2020-03-17 19:13:49 1954333504 [ERROR] mysqld: Table './db_terminal/actions_log' is marked as crashed and should be repaired
2020-03-17 19:13:49 1954333504 [Warning] Checking table: './db_terminal/actions_log'
2020-03-17 19:13:49 1954333504 [ERROR] mysqld: Table './db_terminal/events' is marked as crashed and should be repaired
2020-03-17 19:13:49 1954333504 [Warning] Checking table: './db_terminal/events'
2020-03-17 19:13:49 1954333504 [ERROR] mysqld: Table './db_terminal/events_params' is marked as crashed and should be repaired
2020-03-17 19:13:49 1954333504 [Warning] Checking table: './db_terminal/events_params'
2020-03-17 19:13:49 1954333504 [ERROR] mysqld: Table './db_terminal/plugins' is marked as crashed and should be repaired
2020-03-17 19:13:49 1954333504 [Warning] Checking table: './db_terminal/plugins'
2020-03-17 19:13:50 1954333504 [ERROR] mysqld: Table './db_terminal/pinghosts' is marked as crashed and should be repaired
2020-03-17 19:13:50 1954333504 [Warning] Checking table: './db_terminal/pinghosts'
2020-03-17 19:13:50 1954333504 [ERROR] mysqld: Table './db_terminal/samsungtv_devices' is marked as crashed and should be repaired
2020-03-17 19:13:50 1954333504 [Warning] Checking table: './db_terminal/samsungtv_devices'
2020-03-17 19:13:50 1954333504 [ERROR] mysqld: Table './db_terminal/samsungtv_data' is marked as crashed and should be repaired
2020-03-17 19:13:50 1954333504 [Warning] Checking table: './db_terminal/samsungtv_data'
2020-03-17 19:13:50 1954333504 [ERROR] mysqld: Table './db_terminal/samsungtv_apps' is marked as crashed and should be repaired
2020-03-17 19:13:50 1954333504 [Warning] Checking table: './db_terminal/samsungtv_apps'
2020-03-17 19:13:50 1954333504 [ERROR] mysqld: Table './db_terminal/elm_states' is marked as crashed and should be repaired
2020-03-17 19:13:50 1954333504 [Warning] Checking table: './db_terminal/elm_states'
2020-03-17 19:13:50 1954333504 [ERROR] mysqld: Table './db_terminal/scripts' is marked as crashed and should be repaired
2020-03-17 19:13:50 1954333504 [Warning] Checking table: './db_terminal/scripts'
2020-03-17 19:13:50 1954333504 [ERROR] mysqld: Table './db_terminal/safe_execs' is marked as crashed and should be repaired
2020-03-17 19:13:50 1954333504 [Warning] Checking table: './db_terminal/safe_execs'
2020-03-17 19:13:50 1954333504 [ERROR] mysqld: Table './db_terminal/shouts' is marked as crashed and should be repaired
2020-03-17 19:13:50 1954333504 [Warning] Checking table: './db_terminal/shouts'
2020-03-17 19:13:50 1954333504 [ERROR] mysqld: Table './db_terminal/system_errors' is marked as crashed and should be repaired
2020-03-17 19:13:50 1954333504 [Warning] Checking table: './db_terminal/system_errors'
2020-03-17 19:13:50 1954333504 [ERROR] mysqld: Table './db_terminal/system_errors_data' is marked as crashed and should be repaired
2020-03-17 19:13:50 1954333504 [Warning] Checking table: './db_terminal/system_errors_data'
2020-03-17 19:13:50 1954333504 [ERROR] mysqld: Table './db_terminal/terminals' is marked as crashed and should be repaired
2020-03-17 19:13:50 1954333504 [Warning] Checking table: './db_terminal/terminals'
2020-03-17 19:13:50 1954333504 [ERROR] mysqld: Table './db_terminal/webvars' is marked as crashed and should be repaired
2020-03-17 19:13:50 1954333504 [Warning] Checking table: './db_terminal/webvars'
2020-03-17 19:13:50 1954333504 [ERROR] mysqld: Table './db_terminal/yaweather_config' is marked as crashed and should be repaired
2020-03-17 19:13:50 1954333504 [Warning] Checking table: './db_terminal/yaweather_config'
2020-03-17 19:13:50 1954333504 [ERROR] mysqld: Table './db_terminal/yaweather_main' is marked as crashed and should be repaired
2020-03-17 19:13:50 1954333504 [Warning] Checking table: './db_terminal/yaweather_main'
2020-03-17 19:13:50 1954333504 [ERROR] mysqld: Table './db_terminal/yaweather_hf' is marked as crashed and should be repaired
2020-03-17 19:13:50 1954333504 [Warning] Checking table: './db_terminal/yaweather_hf'
utax
Сообщения: 118
Зарегистрирован: Пт май 31, 2019 8:24 am
Благодарил (а): 28 раз
Поблагодарили: 3 раза

Re: DB отвалилась - Can't connect to database (2002: No such file or directory)

Сообщение utax » Ср фев 09, 2022 9:12 am

DiminatorDK писал(а):
Вт мар 17, 2020 7:31 pm
в итоге после переименования и ребута все заработало в логах mysql вот такое
Мде. И не понятно как много еще сюрпризов будет и как долго проработает.
Подскажите если не трудно, что вы переименовали?
За это сообщение автора utax поблагодарил:
prmres (Ср фев 09, 2022 6:52 pm)
Рейтинг: 1.16%
Ответить