Привет, есть тут кто живой? ))
Столкнулся с проблемой, после 2х выключений электричества, на локальной VMBitrix перестала работать mysql
проверка статуса сервиса дает такой ответ
Попытки перезапустить, активировать\деактивировать, убить процесcы mysql, удаление файлов /var/run/mysqld/mysqld.pid и /var/lib/mysqld/mysqld.sock ни к чему не приводят, сервис не стартует...
Нас странице сайта ошибка выглядит так
часть лог файла полученный по пути
/var/log/mysql/error.log
Есть ли шанс восстановить БД или нет? Если нет то как можно ее переустановить не прибегая к сносу самой VM ?
Столкнулся с проблемой, после 2х выключений электричества, на локальной VMBitrix перестала работать mysql
проверка статуса сервиса дает такой ответ
Код |
---|
[root@bitrix_vm3 ~]# systemctl status mysql ? mysqld.service - MySQL Server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled) Active: failed (Result: start-limit) since Tue 2023-07-25 22:53:02 MSK; 1h 49 min ago Docs: man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html Process: 2479 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=1/FAILURE) Process: 2455 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS) Jul 25 22:53:02 bitrix_vm3 systemd[1]: Failed to start MySQL Server. Jul 25 22:53:02 bitrix_vm3 systemd[1]: Unit mysqld.service entered failed state. Jul 25 22:53:02 bitrix_vm3 systemd[1]: mysqld.service failed. Jul 25 22:53:02 bitrix_vm3 systemd[1]: mysqld.service holdoff time over, sc...t. Jul 25 22:53:02 bitrix_vm3 systemd[1]: Stopped MySQL Server. Jul 25 22:53:02 bitrix_vm3 systemd[1]: start request repeated too quickly f...ce Jul 25 22:53:02 bitrix_vm3 systemd[1]: Failed to start MySQL Server. Jul 25 22:53:02 bitrix_vm3 systemd[1]: Unit mysqld.service entered failed state. Jul 25 22:53:02 bitrix_vm3 systemd[1]: mysqld.service failed. Hint: Some lines were ellipsized, use -l to show in full. |
Попытки перезапустить, активировать\деактивировать, убить процесcы mysql, удаление файлов /var/run/mysqld/mysqld.pid и /var/lib/mysqld/mysqld.sock ни к чему не приводят, сервис не стартует...
Код |
---|
[root@bitrix_vm3 conf.d]# sudo systemctl start mysqld.service Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details. [root@bitrix_vm3 conf.d]# sudo systemctl status mysqld.service ● mysqld.service - MySQL Server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled) Active: activating (start) since Wed 2023-07-26 02:03:50 MSK; 3s ago Docs: man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html Process: 18663 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS) Control: 18687 (mysqld) CGroup: /system.slice/mysqld.service ├─18687 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid └─18690 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid Jul 26 02:03:50 bitrix_vm3 systemd[1]: Starting MySQL Server... |
Нас странице сайта ошибка выглядит так
Код |
---|
[mysqli_sql_exception] No such file or directory (2002) /home/bitrix/ext_www/bx-app-form.ru/bitrix/modules/main/lib/db/mysqliconnection.php:83 #0: mysqli->real_connect /home/bitrix/ext_www/bx-app-form.ru/bitrix/modules/main/lib/db/mysqliconnection.php:83 #1: Bitrix\Main\DB\MysqliConnection->connectInternal /home/bitrix/ext_www/bx-app-form.ru/bitrix/modules/main/lib/data/connection.php:53 #2: Bitrix\Main\Data\Connection->getResource /home/bitrix/ext_www/bx-app-form.ru/bitrix/modules/main/lib/db/mysqlisqlhelper.php:21 #3: Bitrix\Main\DB\MysqliSqlHelper->forSql /home/bitrix/ext_www/bx-app-form.ru/bitrix/modules/main/lib/config/option.php:206 #4: Bitrix\Main\Config\Option::load /home/bitrix/ext_www/bx-app-form.ru/bitrix/modules/main/lib/config/option.php:83 #5: Bitrix\Main\Config\Option::getRealValue /home/bitrix/ext_www/bx-app-form.ru/bitrix/modules/main/lib/config/option.php:32 #6: Bitrix\Main\Config\Option::get /home/bitrix/ext_www/bx-app-form.ru/bitrix/modules/main/lib/httprequest.php:420 #7: Bitrix\Main\HttpRequest->prepareCookie /home/bitrix/ext_www/bx-app-form.ru/bitrix/modules/main/lib/httprequest.php:77 #8: Bitrix\Main\HttpRequest->__construct /home/bitrix/ext_www/bx-app-form.ru/bitrix/modules/main/lib/httpapplication.php:44 #9: Bitrix\Main\HttpApplication->initializeContext /home/bitrix/ext_www/bx-app-form.ru/bitrix/modules/main/lib/application.php:133 #10: Bitrix\Main\Application->initializeExtendedKernel /home/bitrix/ext_www/bx-app-form.ru/bitrix/modules/main/include.php:23 #11: require_once(string) /home/bitrix/ext_www/bx-app-form.ru/bitrix/modules/main/include/prolog_before.php:19 #12: require_once(string) /home/bitrix/ext_www/bx-app-form.ru/bitrix/modules/main/include/prolog.php:10 #13: require_once(string) /home/bitrix/ext_www/bx-app-form.ru/bitrix/header.php:1 #14: require(string) /home/bitrix/ext_www/bx-app-form.ru/index.php:2 ---------- |
часть лог файла полученный по пути
/var/log/mysql/error.log
Код |
---|
2023-07-25T22:29:38.932179Z 0 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html for information about forcing recovery. 2023-07-25T22:29:38.995898Z 0 [Note] InnoDB: 2 transaction(s) which must be rolled back or cleaned up in total 0 row operations to undo 2023-07-25T22:29:38.995921Z 0 [Note] InnoDB: Trx id counter is 3174656 2023-07-25T22:29:39.003107Z 0 [Note] InnoDB: Cleaning up trx with id 3132548 2023-07-25T22:29:39.003128Z 0 [Note] InnoDB: Cleaning up trx with id 3132398 2023-07-25T22:29:39.323692Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1" 2023-07-25T22:29:39.323716Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2023-07-25T22:29:39.323754Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2023-07-25T22:29:39.355900Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB. 2023-07-25T22:29:39.356631Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active. 2023-07-25T22:29:39.356641Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active. 2023-07-25T22:29:39.357943Z 0 [Note] InnoDB: Waiting for purge to start 2023-07-26 01:29:39 0x7f0fb95f5700 InnoDB: Assertion failure in thread 139705511270144 in file fut0lst.ic line 93 InnoDB: Failing assertion: addr.page == FIL_NULL || addr.boffset >= FIL_PAGE_DATA InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to http://bugs.mysql.com. InnoDB: If you get repeated assertion failures or crashes, even InnoDB: immediately after the mysqld startup, there may be InnoDB: corruption in the InnoDB tablespace. Please refer to InnoDB: http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html InnoDB: about forcing recovery. 22:29:39 UTC - mysqld got signal 6 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. Attempting to collect some information that could help diagnose the problem. As this is a crash and something is definitely wrong, the information collection process might fail. Please help us make Percona Server better by reporting any bugs at https://bugs.percona.com/ key_buffer_size=50331648 read_buffer_size=131072 max_used_connections=0 max_threads=44 thread_count=0 connection_count=0 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 407537 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Build ID: f63b7082d764297ccdfd239bd51989633fcefefb Server Version: 5.7.37-40 Percona Server (GPL), Release 40, Revision 3a1347ec0d4 Thread pointer: 0x7f0fa80008c0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 7f0fb95f4cb0 thread_stack 0x20000 /usr/sbin/mysqld(my_print_stacktrace+0x3b)[0xf4624b] /usr/sbin/mysqld(handle_fatal_signal+0x505)[0xd779c5] /lib64/libpthread.so.0(+0xf630)[0x7f1027ebe630] /lib64/libc.so.6(gsignal+0x37)[0x7f1025fbb387] /lib64/libc.so.6(abort+0x148)[0x7f1025fbca78] /usr/sbin/mysqld[0x7824cc] /usr/sbin/mysqld[0x782008] /usr/sbin/mysqld[0x1160265] /usr/sbin/mysqld[0x1162b65] /usr/sbin/mysqld(_Z9trx_purgemmb+0x26b)[0x11659db] /usr/sbin/mysqld(srv_purge_coordinator_thread+0xa47)[0x1137647] /lib64/libpthread.so.0(+0x7ea5)[0x7f1027eb6ea5] /lib64/libc.so.6(clone+0x6d)[0x7f1026083b0d] Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (0): Connection ID (thread ID): 0 Status: NOT_KILLED You may download the Percona Server operations manual by visiting http://www.percona.com/software/percona-server/. You may find information in the manual which will help you identify the cause of the crash. |
С ув. Вячеслав Докукин