Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k3s 使用mysql 8.0.20 版本存储kine表,启动k3s后,mysql进程会反复重启,k3s报错连接被拒绝 #10092

Closed
yujun4464 opened this issue May 13, 2024 · 1 comment

Comments

@yujun4464
Copy link

k3s kine会写入到 mysql 中,但是k3s和mysql 都会报错

k3s报错:
024-05-13 16:26:32.333 ERROR modules/k3s.go:250 Ping datastore endpoint error: dial tcp 10.0.0.96:3306: connect: connection refused

mysql 8.0.20 版本报错:
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.
2024-05-13T08:19:04.952666Z 0 [System] [MY-010116] [Server] /data/mysql/bin/mysqld (mysqld 8.0.20) starting as process 13314
2024-05-13T08:19:04.960406Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-05-13T08:19:05.767119Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-05-13T08:19:05.841499Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/tmp/mysqlx.sock' bind-address: '::' port: 33060
2024-05-13T08:19:05.853146Z 0 [System] [MY-010229] [Server] Starting XA crash recovery...
2024-05-13T08:19:05.862496Z 0 [System] [MY-010232] [Server] XA crash recovery finished.
2024-05-13T08:19:05.932794Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-05-13T08:19:05.948552Z 0 [System] [MY-010931] [Server] /data/mysql/bin/mysqld: ready for connections. Version: '8.0.20' socket: '/tmp/mysql.sock' port: 3306 MySQL Community Server - GPL.
08:19:07 UTC - mysqld got signal 11 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x7f137c000c20
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 = 7f13f4131d80 thread_stack 0x46000
/data/mysql/bin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x2e) [0x1edf6fe]
/data/mysql/bin/mysqld(handle_fatal_signal+0x323) [0xfa2ef3]
/lib64/libpthread.so.0(+0xf5d0) [0x7f141fcae5d0]
/data/mysql/bin/mysqld() [0xe684d9]
/data/mysql/bin/mysqld() [0xe6eeff]
/data/mysql/bin/mysqld(build_equal_items(THD*, Item*, Item**, COND_EQUAL*, bool, mem_root_deque<TABLE_LIST*>, COND_EQUAL**)+0x3d) [0xe6f51d]
/data/mysql/bin/mysqld(optimize_cond(THD
, Item**, COND_EQUAL**, mem_root_deque<TABLE_LIST*>, Item::cond_result)+0x237) [0xe6f9c7]
/data/mysql/bin/mysqld(JOIN::optimize()+0x36b) [0xe72f2b]
/data/mysql/bin/mysqld(SELECT_LEX::optimize(THD*)+0xdc) [0xeccb1c]
/data/mysql/bin/mysqld(SELECT_LEX_UNIT::optimize(THD*, TABLE*)+0x5b) [0xf3b3fb]
/data/mysql/bin/mysqld(SELECT_LEX::optimize(THD*)+0x133) [0xeccb73]
/data/mysql/bin/mysqld(SELECT_LEX_UNIT::optimize(THD*, TABLE*)+0x5b) [0xf3b3fb]
/data/mysql/bin/mysqld(Sql_cmd_dml::execute_inner(THD*)+0x29) [0xecb539]
/data/mysql/bin/mysqld(Sql_cmd_dml::execute(THD*)+0x5a9) [0xed5869]
/data/mysql/bin/mysqld(mysql_execute_command(THD*, bool)+0x37f2) [0xe7fa52]
/data/mysql/bin/mysqld(Prepared_statement::execute(String*, bool)+0x949) [0xea9e49]
/data/mysql/bin/mysqld(Prepared_statement::execute_loop(String*, bool)+0xa4) [0xeac514]
/data/mysql/bin/mysqld(mysqld_stmt_execute(THD*, Prepared_statement*, bool, unsigned long, PS_PARAM*)+0x179) [0xeadb79]
/data/mysql/bin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x22a9) [0xe840a9]
/data/mysql/bin/mysqld(do_command(THD*)+0x174) [0xe848e4]
/data/mysql/bin/mysqld() [0xf94db8]
/data/mysql/bin/mysqld() [0x23e2abc]
/lib64/libpthread.so.0(+0x7dd5) [0x7f141fca6dd5]
/lib64/libc.so.6(clone+0x6d) [0x7f141ddc802d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f137c02ef38): SELECT ( SELECT MAX(rkv.id) AS id FROM kine AS rkv), COUNT(c.theid) FROM ( SELECT * FROM ( SELECT ( SELECT MAX(rkv.id) AS id FROM kine AS rkv), ( SELECT MAX(crkv.prev_revision) AS prev_revision FROM kine AS crkv WHERE crkv.name = 'compact_rev_key'), kv.id AS theid, kv.name, kv.created, kv.deleted, kv.create_revision, kv.prev_revision, kv.lease, kv.value, kv.old_value FROM kine AS kv JOIN ( SELECT MAX(mkv.id) AS id FROM kine AS mkv WHERE mkv.name LIKE '/registry/k3s.cattle.io/addons/%' GROUP BY mkv.name) AS maxkv ON maxkv.id = kv.id WHERE kv.deleted = 0 OR 0 ) AS lkv ORDER BY lkv.theid ASC ) c
Connection ID (thread ID): 16
Status: NOT_KILLED

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.
2024-05-13T08:19:07.916325Z 0 [System] [MY-010116] [Server] /data/mysql/bin/mysqld (mysqld 8.0.20) starting as process 13547
2024-05-13T08:19:07.922851Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

更换成 mysql 8.0.23 版本后,k3s正常运行

@brandond
Copy link
Contributor

08:19:07 UTC - mysqld got signal 11

mysql is crashing with SIGSEGV. This doesn't seem to be a k3s problem; you'll need to get a stable mysql server running before you can use it with k3s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done Issue
Development

No branches or pull requests

2 participants