You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using emq_web_hook with emqttd 2.3.3.
When client subscribes to topic "$local/$share/group/#" it gets disconnected with error in emqttd log:
2018-01-17 15:04:23.697 [error] <0.4767.0> gen_server <0.4767.0> terminated with reason: no function clause matchin
767.0> terminated with reason: no function clause matchin
g mochijson2:'-json_encode_proplist/2-fun-0-'(local, [44,[34,<<"all">>,34],58,[34,<<"share">>,34],44,"0",58,[34,<<"
qos">>,34],123]) line 206
2018-01-17 15:04:23.697 [error] <0.4767.0> CRASH REPORT Process <0.4767.0> with 0 neighbours exited with reason: no
function clause matching mochijson2:'-json_encode_proplist/2-fun-0-'(local, [44,[34,<<"all">>,34],58,[34,<<"share"
>>,34],44,"0",58,[34,<<"qos">>,34],123]) line 206 in gen_server2:terminate/3 line 1157
2018-01-17 15:04:23.697 [error] <0.4564.0> Supervisor 'esockd_connection_sup - <0.4564.0>' had child connection sta
rted with emqttd_client:start_link([{max_publish_rate,0},{client_idle_timeout,30000},{client_enable_stats,false},{max_clientid_len,...},...]) at <0.4767.0> exit with reason no function clause matching mochijson2:'-json_encode_proplist/2-fun-0-'(local, [44,[34,<<"all">>,34],58,[34,<<"share">>,34],44,"0",58,[34,<<"qos">>,34],123]) line 206 in context connection_crashed
If the topic is "$share/group/#" client subscribes normally.
$local prefix is needed for load-balancing in a cluster mode. @emqplus
The text was updated successfully, but these errors were encountered:
I found out that a problem is in the parsing of payload before issuing http request. Specifically, mochijson2:encode(Params) in send_http_request function.
The params object for basic topic looks like: The params are: [{action,client_subscribe}, {client_id,<<"clientId">>}, {username,<<"user">>}, {topic,<<"topic">>}, {opts,[{qos,0}]}].
While params object for topic with prefix '$local/$share' looks like: The params are: [{action,client_subscribe}, {client_id,<<"clientId">>}, {username,<<"username">>}, {topic,<<"topic">>}, {opts,[{qos,0},{share,<<"udm">>},local]}].
Even tough i'm not familiar to Erlang, it seems that opts object in the latter case is not valid. The property 'local' is not wrapped correctly.
Using emq_web_hook with emqttd 2.3.3.
When client subscribes to topic "$local/$share/group/#" it gets disconnected with error in emqttd log:
If the topic is "$share/group/#" client subscribes normally.
$local prefix is needed for load-balancing in a cluster mode.
@emqplus
The text was updated successfully, but these errors were encountered: