How to fix following error when enabling emqx exhook

337 Views Asked by At

Im using EMQX 4.4.11 and trying to add a hook following this https://github.com/emqx/emqx-extension-java-sdk

When I start the plugin it gives following error

022-12-15T09:14:32.374558+05:30 [error] [ExHook Svr] CALL emqx_exhook_v_1_hook_provider_client:on_provider_loaded(#{broker => #{datetime => "2022-12-15 09:14:32",sysdescr => "EMQ X Broker",uptime => "1 minutes, 1 seconds",version => "4.4.11"},meta => #{cluster_name => "emqxcl",node => <<"[email protected]">>,sysdescr => "EMQ X Broker",version => "4.4.11"}}, #{channel => "default",key_dispatch => <0.2007.0>,pool_size => 8,timeout => 5000}) error: econnrefused
2022-12-15T09:14:32.376430+05:30 [warning] Failed to reload exhook callback server "default", Reason: econnrefused

enter image description here

Can someone share some tips to identify the root cause?

1

There are 1 best solutions below

0
On BEST ANSWER

The example in this repo (https://github.com/emqx/emqx-extension-java-sdk) are only for version 4.2, the examples for version 4.4 are here: https://github.com/emqx/emqx-extension-examples.

Then there is econnrefused in the log, which means that the server has rejected the connection. It seems that you have not modified the default connection address of EMQX.