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

fix: /listeners API crash when there are nodes still in initial conf #9002

Merged
merged 3 commits into from Sep 20, 2022

Conversation

zhongwencool
Copy link
Member

@zhongwencool zhongwencool commented Sep 19, 2022

Fix GET /listeners API crashes when some nodes are still in init configuration.

{"code":"INTERNAL_ERROR","message":"error, {badmatch,{error,{'EXIT',{{badkey,<<\"listeners\">>},
[{erlang,map_get,[<<\"listeners\">>,#{}],[{error_info,#{module => erl_erts_errors}}]},{emqx_config,get_schema_mod,1,
[{file,\"emqx_config.erl\"},{line,505}]},{emqx_listeners,do_list_raw,0,[{file,\"emqx_listeners.erl\"},{line,92}]},
{emqx_listeners,list_raw,0,[{file,\"emqx_listeners.erl\"},{line,71}]},{emqx_mgmt_api_listeners,do_list_listeners,0,
[{file,\"emqx_mgmt_api_listeners.erl\"},{line,519}]}]}}}}, [{emqx_mgmt_api_listeners,listener_status_by_id,2,
[{file,\"emqx_mgmt_api_listeners.erl\"},{line,496}]},{emqx_mgmt_api_listeners,listener_status_by_id,1,
[{file,\"emqx_mgmt_api_listeners.erl\"},{line,472}]},{emqx_mgmt_api_listeners,list_listeners,2,
[{file,\"emqx_mgmt_api_listeners.erl\"},{line,342}]},{minirest_handler,apply_callback,3,[{file,\"minirest_handler.erl\"},
{line,111}]},{minirest_handler,handle,2,[{file,\"minirest_handler.erl\"},{line,44}]},{minirest_handler,init,2,
[{file,\"minirest_handler.erl\"},{line,27}]},{cowboy_handler,execute,2,[{file,\"cowboy_handler.erl\"},{line,41}]},
{cowboy_stream_h,execute,3,[{file,\"cowboy_stream_h.erl\"},{line,318}]},{cowboy_stream_h,request_process,3,
[{file,\"cowboy_stream_h.erl\"},{line,302}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,226}]}]"}

@zhongwencool zhongwencool changed the title fix: /listeners API crash When there are nodes still in initial conf fix: /listeners API crash when there are nodes still in initial conf Sep 19, 2022
@zhongwencool zhongwencool requested a review from a team September 19, 2022 07:22
zmstone
zmstone previously approved these changes Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants