我出现了和前面有个同学一样的错误,但是把使用mysql:5.7同样报错

来源:6-3 Docker Compose的安装和基本使用

vivid_w

2018-07-16

mysql_1      | 2018-07-16T14:50:14.209172Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

mysql_1      | 2018-07-16T14:50:14.210439Z 0 [Note] mysqld (mysqld 5.7.22) starting as process 1 ...

mysql_1      | 2018-07-16T14:50:14.213162Z 0 [Note] InnoDB: PUNCH HOLE support available

mysql_1      | 2018-07-16T14:50:14.213205Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

mysql_1      | 2018-07-16T14:50:14.213214Z 0 [Note] InnoDB: Uses event mutexes

mysql_1      | 2018-07-16T14:50:14.213222Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier

mysql_1      | 2018-07-16T14:50:14.213229Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3

mysql_1      | 2018-07-16T14:50:14.213236Z 0 [Note] InnoDB: Using Linux native AIO

mysql_1      | 2018-07-16T14:50:14.213444Z 0 [Note] InnoDB: Number of pools: 1

mysql_1      | 2018-07-16T14:50:14.213560Z 0 [Note] InnoDB: Using CPU crc32 instructions

mysql_1      | 2018-07-16T14:50:14.215069Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M

mysql_1      | 2018-07-16T14:50:14.221625Z 0 [Note] InnoDB: Completed initialization of buffer pool

mysql_1      | 2018-07-16T14:50:14.223379Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().

mysql_1      | 2018-07-16T14:50:14.234982Z 0 [ERROR] [FATAL] InnoDB: Table flags are 0 in the data dictionary but the flags in file ./ibdata1 are 0x4800!

mysql_1      | 2018-07-16 14:50:14 0x7f71f8fde740  InnoDB: Assertion failure in thread 140127485421376 in file ut0ut.cc line 942

mysql_1      | InnoDB: We intentionally generate a memory trap.

mysql_1      | InnoDB: Submit a detailed bug report to http://bugs.mysql.com.

mysql_1      | InnoDB: If you get repeated assertion failures or crashes, even

mysql_1      | InnoDB: immediately after the mysqld startup, there may be

mysql_1      | InnoDB: corruption in the InnoDB tablespace. Please refer to

mysql_1      | InnoDB: http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html

mysql_1      | InnoDB: about forcing recovery.

mysql_1      | 14:50:14 UTC - mysqld got signal 6 ;

mysql_1      | This could be because you hit a bug. It is also possible that this binary

mysql_1      | or one of the libraries it was linked against is corrupt, improperly built,

mysql_1      | or misconfigured. This error can also be caused by malfunctioning hardware.

mysql_1      | Attempting to collect some information that could help diagnose the problem.

mysql_1      | As this is a crash and something is definitely wrong, the information

mysql_1      | collection process might fail.

mysql_1      |

mysql_1      | key_buffer_size=8388608

mysql_1      | read_buffer_size=131072

mysql_1      | max_used_connections=0

mysql_1      | max_threads=151

mysql_1      | thread_count=0

mysql_1      | connection_count=0

mysql_1      | It is possible that mysqld could use up to

mysql_1      | key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 68195 K  bytes of memory

mysql_1      | Hope that's ok; if not, decrease some variables in the equation.

mysql_1      |

mysql_1      | Thread pointer: 0x0

mysql_1      | Attempting backtrace. You can use the following information to find out

mysql_1      | where mysqld died. If you see no messages after this, something went

mysql_1      | terribly wrong...

mysql_1      | stack_bottom = 0 thread_stack 0x40000

mysql_1      | mysqld(my_print_stacktrace+0x2c)[0x55da208081ec]

mysql_1      | mysqld(handle_fatal_signal+0x479)[0x55da20136e59]

mysql_1      | /lib/x86_64-linux-gnu/libpthread.so.0(+0x110c0)[0x7f71f8bbc0c0]

mysql_1      | /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcf)[0x7f71f7348fff]

mysql_1      | /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f71f734a42a]

mysql_1      | mysqld(+0x628387)[0x55da2010d387]

mysql_1      | mysqld(_ZN2ib5fatalD1Ev+0x12d)[0x55da209d6c8d]

mysql_1      | mysqld(+0xf9ead1)[0x55da20a83ad1]

mysql_1      | mysqld(+0xf9f108)[0x55da20a84108]

mysql_1      | mysqld(_Z6fil_ioRK9IORequestbRK9page_id_tRK11page_size_tmmPvS8_+0x2b0)[0x55da20a8d230]

mysql_1      | mysqld(_Z13buf_read_pageRK9page_id_tRK11page_size_t+0xce)[0x55da20a421ee]

mysql_1      | mysqld(_Z16buf_page_get_genRK9page_id_tRK11page_size_tmP11buf_block_tmPKcmP5mtr_tb+0x4aa)[0x55da20a1134a]

mysql_1      | mysqld(_Z31trx_rseg_get_n_undo_tablespacesPm+0x143)[0x55da209b4e23]

mysql_1      | mysqld(+0x6274fb)[0x55da2010c4fb]

mysql_1      | mysqld(_Z34innobase_start_or_create_for_mysqlv+0x2f3d)[0x55da20981cdd]

mysql_1      | mysqld(+0xd69f63)[0x55da2084ef63]

mysql_1      | mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x4f)[0x55da20181bff]

mysql_1      | mysqld(+0xb138e6)[0x55da205f88e6]

mysql_1      | mysqld(_Z40plugin_register_builtin_and_init_core_sePiPPc+0x2f0)[0x55da205fbad0]

mysql_1      | mysqld(+0x64a566)[0x55da2012f566]

mysql_1      | mysqld(_Z11mysqld_mainiPPc+0xc71)[0x55da20131121]

mysql_1      | /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7f71f73362e1]

mysql_1      | mysqld(_start+0x2a)[0x55da2012780a]

mysql_1      | The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains

mysql_1      | information that should help you find out what is causing the crash.

wordpress_mysql_1 exited with code 2

错误也是这样的,macOS下

写回答

4回答

麦兜搞IT

2018-07-18

我大概知道了,您这是在第六章还是第七章呢。第六章的源码docker-compose.yml不是这样的https://gitlab-demo.com/xiaoquwl/docker-k8s-devops/blob/master/chapter6/labs/wordpress/docker-compose.yml    docker-compose并不支持deploy参数,您提供的这个yml文件wordress里有deploy参数,这个参数只能在第七章swarm里用

0
1
vivid_w
是在第六章,通过您给的这个yml文件,docker-compose up之后的结果是一样的,docker-compose ps的信息如下: Name Command State Ports ----------------------------------------------------------------------- wordpress_mysql_1 docker-entrypoint.sh mysqld Exit 2 wordpress_wordpress_1 docker-entrypoint.sh apach ... Exit 1
2018-07-18
共1条回复

麦兜搞IT

2018-07-18

docker ps 能看到wordpress和mysql的两个container么

0
1
vivid_w
docker ps 看不到,docker-compose ps的信息如下: WARNING: Some services (wordpress) use the 'deploy' key, which will be ignored. Compose does not support 'deploy' configuration - use `docker stack deploy` to deploy to a swarm. Name Command State Ports ----------------------------------------------------------------------- wordpress_mysql_1 docker-entrypoint.sh mysqld Exit 2 wordpress_wordpress_1 docker-entrypoint.sh apach ... Exit 1
2018-07-18
共1条回复

麦兜搞IT

2018-07-17

贴到gist里把 https://gist.github.com/

0
1
vivid_w
https://gist.github.com/vividwang/88c36ef23ddfc75a37def820939ad00a
2018-07-17
共1条回复

vivid_w

提问者

2018-07-16

这是yml文件

version: '3'


services:


wordpress:

image: wordpress

ports:

- 8080:80

depends_on:

- mysql

deploy:

update_config:

parallelism: 2

delay: 10s

environment:

WORDPRESS_DB_HOST: mysql:3306

WORDPRESS_DB_PASSWORD: root

networks:

- my-bridge


mysql:

image: mysql:5.7

environment:

MYSQL_ROOT_PASSWORD: root

MYSQL_DATABASE: wordpress

volumes:

- mysql-data:/var/lib/mysql

networks:

- my-bridge


volumes:

mysql-data:


networks:

my-bridge:

driver: bridge                


0
3
vivid_w
回复
麦兜搞IT
不好意思,老师,发过来就变成这样了
2018-07-17
共3条回复

系统学习Docker 践行DevOps理念

无论你是开发、测试还是运维,Docker都是你的必备技能。

3297 学习 · 1895 问题

查看课程