https:dashboard error
with version 3.0.1 it works fine.
with version 3.1.x and 3.2.x if I enable https on the dashbord plugin configuration I get this error.
[error] [Plugins] Load plugin emqx_dashboard failed, cannot start plugin emqx_dashboard for {bad_return,
{{emqx_dashboard_app,
start,
[normal,
[]]},
{'EXIT',
{{badmatch,
{error,
no_cert}},
[{minirest,
start_https,
3,
[{file,
"/emqx_temp/emqx_rel/_checkouts/minirest/src/minirest.erl"},
{line,
53}]},
{lists,
foreach,
2,
[{file,
"lists.erl"},
{line,
1338}]},
{emqx_dashboard_app,
start,
2,
[{file,
"/emqx_temp/emqx_rel/_checkouts/emqx_dashboard/src/emqx_dashboard_app.erl"},
{line,
28}]},
{application_master,
start_it_old,
4,
[{file,
"application_master.erl"},
{line,
277}]}]}}}}
What has changed compared to previous versions?
thank you
This log means that you are not setting your certificate path correctly. Could you provide us with your configuration so that we can help you better?
I guess options is missing in emqx_dashboard:
.....
minirest:start_https(listener_name(Proto), ranch_opts(Port, Options), Dispatch).
ranch_opts(Port, Options) ->
NumAcceptors = get_value(num_acceptors, Options, 4),
MaxConnections = get_value(max_connections, Options, 512),
#{num_acceptors => NumAcceptors,
max_connections => MaxConnections,
socket_opts => [{port, Port}]}. <- should be: socket_opts => [{port, Port}|Options]}
better:
ranch_opts(Port, Options0) ->
NumAcceptors = get_value(num_acceptors, Options0, 4),
MaxConnections = get_value(max_connections, Options0, 512),
Options = lists:foldl(fun({K, _V}, Acc) when K =:= max_connections orelse K =:= num_acceptors->
Acc;
({K, V}, Acc)->
[{K, V} | Acc]
end, [], Options0),
Res = #{num_acceptors => NumAcceptors,
max_connections => MaxConnections,
socket_opts => [{port, Port} | Options]},
Res.
@obi458 Yes, you are right. Thank you very much for your feedback. @stefano055415 I'm sorry for the inconvenience, and we will fix this issue in the next release.
Already fixed in v3.2.3, please download the latest version.