mariadb docker-compose mysql保持启动

bwleehnv  于 11个月前  发布在  Docker
关注(0)|答案(1)|浏览(216)

从以前故障的服务器备份数据后,尝试在新服务器上工作时遇到以下错误。目录位置配置正确,在没有卷的情况下继续操作时没有错误。
我将Docker从版本24降级到20,并在10.6.8、10.7.4和10.8.2之间更改了MariaDB版本,但这些更改都没有任何影响
docker-compose.yml

services :
  db :
      image : mariadb:10.7.4
      container_name : scep-db
      env_file : .env
      environment :
        - TZ=Asia/Seoul
      restart : always
      ports :
        - "10003:3306"
      volumes :
        # 데이터저장
        - ./db/data:/var/lib/mysql
        # 설정파일 저장
        - ./db/conf.d:/etc/mysql/conf.d

字符串
如果我只使用卷./db/data/:/var/lib/mysql.

2023-11-23 02:27:56+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.8+maria~focal started.
2023-11-23 02:27:56+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2023-11-23 02:27:56+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.8+maria~focal started.
2023-11-23 02:27:56+00:00 [Note] [Entrypoint]: MariaDB upgrade not required
2023-11-23  2:27:56 0 [Note] mariadbd (server 10.6.8-MariaDB-1:10.6.8+maria~focal) starting as process 1 ...
2023-11-23  2:27:56 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2023-11-23  2:27:56 0 [Note] InnoDB: Number of pools: 1
2023-11-23  2:27:56 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2023-11-23  2:27:56 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
2023-11-23  2:27:57 0 [Note] InnoDB: Using Linux native AIO
2023-11-23  2:27:57 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2023-11-23  2:27:57 0 [Note] InnoDB: Completed initialization of buffer pool
2023-11-23  2:27:57 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=9844675,9844675
231123  2:27:57 [ERROR] 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.

To report this bug, see https://mariadb.com/kb/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Server version: 10.6.8-MariaDB-1:10.6.8+maria~focal
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=0
max_threads=153
thread_count=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467959 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...
stack_bottom = 0x0 thread_stack 0x49000
Printing to addr2line failed
mariadbd(my_print_stacktrace+0x32)[0x556b6cf6c222]
mariadbd(handle_fatal_signal+0x485)[0x556b6ca29975]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14420)[0x7fd3145c5420]
mariadbd(+0xd3d5c5)[0x556b6cd875c5]
mariadbd(+0x6c4584)[0x556b6c70e584]
mariadbd(+0xe0c09e)[0x556b6ce5609e]
mariadbd(+0xe0c111)[0x556b6ce56111]
mariadbd(+0xe40bde)[0x556b6ce8abde]
mariadbd(+0xe425c1)[0x556b6ce8c5c1]
mariadbd(+0xe2ded7)[0x556b6ce77ed7]
mariadbd(+0xe26c81)[0x556b6ce70c81]
mariadbd(+0x65da3c)[0x556b6c6a7a3c]
mariadbd(+0xcdf529)[0x556b6cd29529]
mariadbd(_Z24ha_initialize_handlertonP13st_plugin_int+0x82)[0x556b6ca2cb92]
mariadbd(+0x7bc106)[0x556b6c806106]
mariadbd(_Z11plugin_initPiPPci+0x91d)[0x556b6c8072cd]
mariadbd(+0x6d3952)[0x556b6c71d952]
mariadbd(_Z11mysqld_mainiPPc+0x3fd)[0x556b6c72333d]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7fd3140aa083]
mariadbd(_start+0x2e)[0x556b6c7180ae]
The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
information that should help you find out what is causing the crash.
Writing a core file...
Working directory at /var/lib/mysql
Resource Limits:
Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            8388608              unlimited            bytes
Max core file size        unlimited            unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             unlimited            unlimited            processes
Max open files            1048576              1048576              files
Max locked memory         8388608              8388608              bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       62081                62081                signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us
Core pattern: |/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E

flvtvl50

flvtvl501#

当两个容器示例在同一个datadir上启动时,这看起来像是损坏。
假设docker-compose和init系统提供足够的保护,但事实并非如此。
服务器已经在更新的版本中实现了保护(MDEV-31568),但是对于这种情况,需要从备份中恢复。然后我建议开始使用新版本(如10.6.16+)

相关问题