环境信息:
- emqx版本: 5.0.24
- 操作系统:Centos7 、k8s
问题描述:
使用k8s部署emqx并启动成功后,客户端无法连接到emqx,控制台一直重复打印错误日志,重启emqx节点还是不行,但是在做如下操作后又能正常使用。
日志:
Listener ssl:default on 0.0.0.0:8883 started.
Listener tcp:default on 0.0.0.0:1883 started.
Listener ws:default on 0.0.0.0:8083 started.
Listener wss:default on 0.0.0.0:8084 started.
Listener http:dashboard on :18083 started.
EMQX 5.0.24 is running now!
2023-10-08T07:14:57.135605+00:00 [error] msg: bucket_not_found, mfa: emqx_limiter_server:connect/3, line: 147, id: 'tcp:default', type: messages
2023-10-08T07:14:57.136653+00:00 [error] crasher: initial call: emqx_connection:init/4, pid: <0.3074.0>, registered_name: [], error: {{badmatch,{error,invalid_bucket}},[{emqx_limiter_container,'-get_limiter_by_types/3-fun-0-',4,[{file,"emqx_limiter_container.erl"},{line,80}]},{lists,foldl,3,[{file,"lists.erl"},{line,1267}]},{emqx_limiter_container,get_limiter_by_types,3,[{file,"emqx_limiter_container.erl"},{line,83}]},{emqx_connection,init_state,3,[{file,"emqx_connection.erl"},{line,335}]},{emqx_connection,init,4,[{file,"emqx_connection.erl"},{line,312}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}, ancestors: [<0.2453.0>,<0.2452.0>,esockd_sup,<0.1992.0>], message_queue_len: 0, messages: [], links: [<0.2453.0>,#Port<0.33>], dictionary: [], trap_exit: false, status: running, heap_size: 2586, stack_size: 29, reductions: 23058; neighbours:
2023-10-08T07:14:57.137756+00:00 [error] supervisor: 'esockd_connection_sup - <0.2453.0>', errorContext: connection_crashed, reason: {{badmatch,{error,invalid_bucket}},[{emqx_limiter_container,'-get_limiter_by_types/3-fun-0-',4,[{file,"emqx_limiter_container.erl"},{line,80}]},{lists,foldl,3,[{file,"lists.erl"},{line,1267}]},{emqx_limiter_container,get_limiter_by_types,3,[{file,"emqx_limiter_container.erl"},{line,83}]},{emqx_connection,init_state,3,[{file,"emqx_connection.erl"},{line,335}]},{emqx_connection,init,4,[{file,"emqx_connection.erl"},{line,312}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,226}]}]}, offender: [{pid,<0.3074.0>},{name,connection},{mfargs,{emqx_connection,start_link,[#{enable_authn => true,limiter => #{bytes => #{burst => 0.0,initial => 0,rate => infinity},client => #{bytes => #{burst => 0.0,divisible => false,failure_strategy => force,initial => 0,low_watermark => 0,max_retry_time => 10000,rate => infinity},connection => #{burst => 0.0,divisible => false,failure_strategy => force,initial => 0,low_watermark => 0,max_retry_time => 10000,rate => infinity},message_routing => #{burst => 0.0,divisible => false,failure_strategy => force,initial => 0,low_watermark => 0,max_retry_time => 10000,rate => infinity},messages => #{burst => 0.0,divisible => false,failure_strategy => force,initial => 0,low_watermark => 0,max_retry_time => 10000,rate => infinity}},connection => #{burst => 0.0,initial => 0,rate => infinity},message_routing => #{burst => 0.0,initial => 0,rate => infinity},messages => #{burst => 0.0,initial => 0,rate => infinity}},listener => {tcp,default},zone => default}]}}]