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

emqtt_acl_mysql function_clause error #4

Closed
walcy opened this issue Aug 18, 2015 · 3 comments
Closed

emqtt_acl_mysql function_clause error #4

walcy opened this issue Aug 18, 2015 · 3 comments
Labels

Comments

@walcy
Copy link

walcy commented Aug 18, 2015

使用phoapi能够链接服务器,但是订阅或者发布消息时,连接断开,附上日志

Connect from 192.168.84.1:56451 -> 192.168.84.128:1883
19:58:26.111 <0.330.0> [info] RECV from u_1_1_2@192.168.84.1:56451: CONNECT(Qos=0, Retain=false, Dup=false, ClientId=u_1_1_2, ProtoName=MQTT, ProtoVsn=4, CleanSess=true, KeepAlive=60, Username=jobell, Password=_)
19:58:26.111 <0.190.0> [info] CM register u_1_1_2 with <0.330.0>
19:58:26.111 <0.330.0> [info] SEND to u_1_1_2@192.168.84.1:56451: CONNACK(Qos=0, Retain=false, Dup=false, AckFlags=0, RetainCode=0)
19:58:26.112 <0.331.0> [info] Session u_1_1_2 subscribe [{<<"$Q/client/u_1_1_2">>,0}], Granted QoS: [0]
19:58:38.792 <0.310.0> [info] Dashboard file: GET /clients.html
19:58:38.855 <0.310.0> [info] Dashboard file: POST /api/clients
19:59:19.183 <0.332.0> [info] Connect from 192.168.84.1:56561 -> 192.168.84.128:1883
19:59:19.189 <0.332.0> [info] RECV from u_1_1_2@192.168.84.1:56561: CONNECT(Qos=0, Retain=false, Dup=false, ClientId=u_1_1_2, ProtoName=MQTT, ProtoVsn=4, CleanSess=true, KeepAlive=60, Username=jobell, Password=_
)
19:59:19.189 <0.331.0> [warning] Session u_1_1_2 destroyed
19:59:19.191 <0.332.0> [info] SEND to u_1_1_2@192.168.84.1:56561: CONNACK(Qos=0, Retain=false, Dup=false, AckFlags=0, RetainCode=0)
19:59:19.192 <0.190.0> [info] CM register u_1_1_2 with <0.332.0>
19:59:19.192 <0.190.0> [error] ClientId 'u_1_1_2' is duplicated: pid=<0.332.0>, oldpid=<0.330.0>
19:59:19.193 <0.333.0> [info] Session u_1_1_2 subscribe [{<<"$Q/client/u_1_1_2">>,0}], Granted QoS: [0]
19:59:19.200 <0.332.0> [info] RECV from u_1_1_2@192.168.84.1:56561: SUBSCRIBE(Qos=1, Retain=false, Dup=false, PacketId=1, TopicTable=[{<<"u_msg/topic/u_1_1_2">>,1}])
19:59:19.200 <0.332.0> [info] Client 192.168.84.1:56561 terminated, reason: {function_clause,[{emqttd_acl_mysql,check_acl,[{{mqtt_client,<<"u_1_1_2">>,<0.332.0>,<<"jobell">>,{{192,168,84,1},56561},true,4,60,undefined,{1439,866759,189315}},subscribe,<<"u_msg/topic/u_1_1_2">>},{state,auth_user,auth_acl,username,topic,rw,username,is_superuser}],[{file,"src/emqttd_acl_mysql.erl"},{line,51}]},{emqttd_access_control,check_acl,4,[{file,"src/emqttd_access_control.erl"},{line,104}]},{emqttd_protocol,'-handle/2-lc$^0/1-0-',2,[{file,"src/emqttd_protocol.erl"},{line,228}]},{emqttd_protocol,handle,2,[{file,"src/emqttd_protocol.erl"},{line,228}]},{emqttd_client,received,2,[{file,"src/emqttd_client.erl"},{line,179}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,615}]},{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,681}]},{proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,249}]}]}
19:59:19.201 <0.332.0> [info] Client u_1_1_2@192.168.84.1:56561: shutdown {function_clause,[{emqttd_acl_mysql,check_acl,[{{mqtt_client,<<"u_1_1_2">>,<0.332.0>,<<"jobell">>,{{192,168,84,1},56561},true,4,60,undefined,{1439,866759,189315}},subscribe,<<"u_msg/topic/u_1_1_2">>},{state,auth_user,auth_acl,username,topic,rw,username,is_superuser}],[{file,"src/emqttd_acl_mysql.erl"},{line,51}]},{emqttd_access_control,check_acl,4,[{file,"src/emqttd_access_control.erl"},{line,104}]},{emqttd_protocol,'-handle/2-lc$^0/1-0-',2,[{file,"src/emqttd_protocol.erl"},{line,228}]},{emqttd_protocol,handle,2,[{file,"src/emqttd_protocol.erl"},{line,228}]},{emqttd_client,received,2,[{file,"src/emqttd_client.erl"},{line,179}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,615}]},{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,681}]},{proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,249}]}]}
19:59:19.201 <0.190.0> [info] CM unregister u_1_1_2 with <0.332.0>

@emqplus emqplus changed the title 客户端订阅一个topic后,连接断开 emqtt_acl_mysql function_clause error Aug 18, 2015
@emqplus emqplus added the bug label Aug 18, 2015
@JaceHo
Copy link
Contributor

JaceHo commented Aug 18, 2015

@walcy > [error] ClientId 'u_1_1_2' is duplicated: please verify your clientid

@emqplus
Copy link
Contributor

emqplus commented Nov 3, 2015

The ACL rule should be improved.

@emqplus
Copy link
Contributor

emqplus commented Nov 4, 2015

Support 'and' expression in 0.13.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants