emqx/emqx-auth-mysql

connect to mysql server timeout

zorohu opened this issue · 0 comments

zorohu commented
  • emqx version: 4.3.8
  • mysql version:5.7.42-log

在机器上使用ping和telnet都可以证明mysql是可以连接上的,而且最奇怪的就是 之前还是好的。仅仅重启了一次之后就在也连接不上了(
并没有修改过任何配置)

并且我的问题很类似与 https://askemq.com/t/topic/1840/9

2023-07-11T22:31:34.673549+08:00 [error] crasher: initial call: mysql_conn:init/1, pid: <0.1756.0>, registered_name: [], exit: {timeout,[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,401}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}, ancestors: [<0.1755.0>,<0.1754.0>,<0.1752.0>,emqx_auth_mysql_sup,<0.1750.0>], message_queue_len: 0, messages: [], links: [<0.1755.0>], dictionary: [], trap_exit: false, status: running, heap_size: 376, stack_size: 28, reductions: 370; neighbours:
2023-07-11T22:31:34.674144+08:00 [error] [MySQL] Can't connect to MySQL server: timeout
2023-07-11T22:31:34.674395+08:00 [error] Supervisor: {<0.1754.0>,ecpool_worker_sup}. Context: start_error. Reason: timeout. Offender: id={worker,1},pid=undefined.
2023-07-11T22:31:34.674543+08:00 [error] crasher: initial call: ecpool_worker:init/1, pid: <0.1755.0>, registered_name: [], exit: {timeout,[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,401}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}, ancestors: [<0.1754.0>,<0.1752.0>,emqx_auth_mysql_sup,<0.1750.0>], message_queue_len: 1, messages: [{'EXIT',<0.1756.0>,timeout}], links: [<0.1754.0>], dictionary: [], trap_exit: true, status: running, heap_size: 987, stack_size: 28, reductions: 4352; neighbours:
2023-07-11T22:31:34.674972+08:00 [error] Supervisor: {<0.1752.0>,ecpool_pool_sup}. Context: start_error. Reason: {shutdown,{failed_to_start_child,{worker,1},timeout}}. Offender: id=worker_sup,pid=undefined.
2023-07-11T22:31:34.675771+08:00 [error] Supervisor: {local,emqx_auth_mysql_sup}. Context: start_error. Reason: {shutdown,{failed_to_start_child,worker_sup,{shutdown,{failed_to_start_child,{worker,1},timeout}}}}. Offender: id=emqx_auth_mysql,pid=undefined.
2023-07-11T22:31:34.675999+08:00 [error] crasher: initial call: application_master:init/4, pid: <0.1749.0>, registered_name: [], exit: {{bad_return,{{emqx_auth_mysql_app,start,[normal,[]]},{'EXIT',{{badmatch,{error,{shutdown,{failed_to_start_child,emqx_auth_mysql,{shutdown,{failed_to_start_child,worker_sup,{shutdown,{failed_to_start_child,{worker,1},timeout}}}}}}}},[{emqx_auth_mysql_app,start,2,[{file,"emqx_auth_mysql_app.erl"},{line,38}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,277}]}]}}}},[{application_master,init,4,[{file,"application_master.erl"},{line,138}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}, ancestors: [<0.1748.0>], message_queue_len: 1, messages: [{'EXIT',<0.1750.0>,normal}], links: [<0.1748.0>,<0.1433.0>], dictionary: [], trap_exit: true, status: running, heap_size: 610, stack_size: 28, reductions: 235; neighbours:
2023-07-11T22:31:34.679355+08:00 [error] [Plugins] Load plugin emqx_auth_mysql failed, cannot start plugin emqx_auth_mysql for {bad_return,{{emqx_auth_mysql_app,start,[normal,[]]},{'EXIT',{{badmatch,{error,{shutdown,{failed_to_start_child,emqx_auth_mysql,{shutdown,{failed_to_start_child,worker_sup,{shutdown,{failed_to_start_child,{worker,1},timeout}}}}}}}},[{emqx_auth_mysql_app,start,2,[{file,"emqx_auth_mysql_app.erl"},{line,38}]},{application_master,start_it_old,4,[{file,"application_master.erl"},{line,277}]}]}}}}