MySQL не запускается в Ubuntu 16.04 - PullRequest
0 голосов
/ 06 июня 2018

Наш сервер MySQL, работающий на экземпляре Ubuntu 16.04 EC2, неожиданно вышел из строя вчера вечером.Вот вывод из /var/log/mysql/error.log:

78 2018-06-06T17:08:23.039306Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2018-06-06T17:08:23.039352Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2018-06-06T17:08:23.194918Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-06-06T17:08:23.196510Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.22-0ubuntu0.16.04.1) starting as process 16598 ...
2018-06-06T17:08:23.200501Z 0 [Note] InnoDB: PUNCH HOLE support available
2018-06-06T17:08:23.200521Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-06-06T17:08:23.200526Z 0 [Note] InnoDB: Uses event mutexes
2018-06-06T17:08:23.200530Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-06-06T17:08:23.200534Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2018-06-06T17:08:23.200538Z 0 [Note] InnoDB: Using Linux native AIO
2018-06-06T17:08:23.200766Z 0 [Note] InnoDB: Number of pools: 1
2018-06-06T17:08:23.200872Z 0 [Note] InnoDB: Using CPU crc32 instructions
2018-06-06T17:08:23.202294Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2018-06-06T17:08:23.209380Z 0 [Note] InnoDB: Completed initialization of buffer pool
2018-06-06T17:08:23.211351Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-06-06T17:08:23.222986Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2018-06-06T17:08:23.224194Z 0 [Note] InnoDB: Log scan progressed past the checkpoint lsn 11427398733
2018-06-06T17:08:23.248355Z 0 [Note] InnoDB: Doing recovery: scanned up to log sequence number 11430450856
2018-06-06T17:08:23.248414Z 0 [Note] InnoDB: Database was not shutdown normally!
2018-06-06T17:08:23.248420Z 0 [Note] InnoDB: Starting crash recovery.
2018-06-06T17:08:23.258421Z 0 [Note] InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percent: 3 4 5 6 7 8 9 10 11 12 13 17:08:23 UTC - mysqld got signal 11 ;
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.

key_buffer_size=16777216
read_buffer_size=131072
max_used_connections=0
max_threads=151
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 = 76387 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0
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...
14 stack_bottom = 0 thread_stack 0x30000
15 16 17 18 19 /usr/sbin/mysqld(my_print_stacktrace+0x3b)[0xe907ab]
20 21 22 23 24 25 /usr/sbin/mysqld(handle_fatal_signal+0x489)[0x789b49]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7fd027255390]
26 27 28 29 30 31 32 33 /usr/sbin/mysqld(_Z24page_dir_find_owner_slotPKh+0x4a0)[0x101f970]
34 35 36 37 38 39 40 41 /usr/sbin/mysqld(_Z19page_cur_delete_recP10page_cur_tPK12dict_index_tPKmP5mtr_t+0x68)[0x1017368]
42 43 44 45 46 47 /usr/sbin/mysqld(_Z25page_cur_parse_delete_recPhS_P11buf_block_tP12dict_index_tP5mtr_t+0xae)[0x1017abe]
48 49 50 51 /usr/sbin/mysqld[0xff28d7]
52 53 54 55 56 57 58 59 /usr/sbin/mysqld(_Z22recv_recover_page_funcmP11buf_block_t+0x9ad)[0xff39ad]
60 61 62 63 64 65 66 67 /usr/sbin/mysqld(_Z20buf_page_io_completeP10buf_page_tb+0x3e4)[0x1167544]
68 /usr/sbin/mysqld(_Z12fil_aio_waitm+0x11f)[0x11dda8f]
69 70 71 72 73 74 /usr/sbin/mysqld(io_handler_thread+0xd0)[0x10c8a80]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7fd02724b6ba]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7fd0266e041d]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

Когда я получил предупреждение о сбое, я сразу заметил, что серверу не хватило места на диске.Я очистил несколько каталогов и освободил ~ 2 ГБ места и с тех пор пытался перезапустить.Каждый раз, когда я пытаюсь перезагрузить компьютер, я получаю одну и ту же ошибку (см. Выше).Я гуглил и читал бесчисленные посты, пробовал несколько вещей (включая установку образа на новый экземпляр, чтобы исключить аппаратный сбой).Я в недоумении.Будем благодарны за любые советы.

Обновление (подробнее) Я также вижу это в журналах systemctl при попытке перезапустить MySQL:

Jun 06 17:39:38 ip-172-31-1-74 systemd[1]: Starting MySQL Community Server...
Jun 06 17:39:38 ip-172-31-1-74 systemd[1]: mysql.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jun 06 17:40:04 ip-172-31-1-74 systemd[1]: Stopped MySQL Community Server.
...