-
Notifications
You must be signed in to change notification settings - Fork 34
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
coap get returns 5.00 #109
Comments
here is more input with log level set to debug...
./coap-client -m post -e "qos=0&retain=0&message=payload&topic=test" "coap://127.0.0.1/mqtt?c=coco&p=public&u=admin" -v 9 ./coap-client -m post -e "qos=0&retain=0&message=payload&topic=test" "coap://127.0.0.1/mqtt?c=coco&p=public&u=admin" -v 9 console output: |
hi,
while trying to get/put message via coap receving always 5.00 reply. What am I missing?
coap-client: libcoap
emqx broker version 3 rc1
./coap-client -m get -s 100 "coap://127.0.0.1/mqtt/test?c=1&u=admin&p=public" -v 9
Apr 11 10:35:11 DEBG ***127.0.0.1:33665 <-> 127.0.0.1:5683 UDP : new outgoing session
Apr 11 10:35:11 DEBG sending CoAP request:
Apr 11 10:35:11 DEBG * 127.0.0.1:33665 <-> 127.0.0.1:5683 UDP : sent 36 bytes
v:1 t:CON c:GET i:736a {} [ Observe:0, Uri-Path:mqtt, Uri-Path:test, Uri-Query:c=1, Uri-Query:u=admin, Uri-Query:p=public ]
Apr 11 10:35:11 DEBG ** 127.0.0.1:33665 <-> 127.0.0.1:5683 UDP : tid=29546 added to retransmit queue (2313ms)
Apr 11 10:35:11 DEBG timeout is set to 90 seconds
Apr 11 10:35:11 DEBG * 127.0.0.1:33665 <-> 127.0.0.1:5683 UDP : received 4 bytes
v:1 t:ACK c:5.00 i:736a {} [ ]
Apr 11 10:35:11 DEBG ** 127.0.0.1:33665 <-> 127.0.0.1:5683 UDP : tid=29546: removed
Apr 11 10:35:11 DEBG ** process incoming 5.00 response:
5.00
Apr 11 10:35:11 DEBG ***127.0.0.1:33665 <-> 127.0.0.1:5683 UDP : session closed
emqx console output:
([email protected])1>
([email protected])1> 2019-04-11 10:35:11.729 [error] 1 ** Generic server <0.1877.0> terminating
** Last message in was {'EXIT',<0.1875.0>,
{{case_clause,ok},
[{emqx_protocol,send,2,
[{file,"src/emqx_protocol.erl"},{line,682}]},
{emqx_coap_mqtt_adapter,proto_init,5,
[{file,"src/emqx_coap_mqtt_adapter.erl"},
{line,258}]},
{emqx_coap_mqtt_adapter,init,1,
[{file,"src/emqx_coap_mqtt_adapter.erl"},
{line,120}]},
{gen_server,init_it,2,
[{file,"gen_server.erl"},{line,374}]},
{gen_server,init_it,6,
[{file,"gen_server.erl"},{line,342}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,249}]}]}}
** When Server state == {state,30000,true,#Fun<emqx_session.1.64839632>,
<<"1">>,<<"admin">>,undefined,undefined,1,0,
#{},false,
{emqx_inflight,65535,{0,nil}},
0,undefined,
{mqueue,true,1000,0,0,none,0,{queue,[],[],0}},
#{},undefined,undefined,undefined,0,undefined,
true,undefined,undefined,
{1554,971711,726113},
undefined,undefined}
** Reason for termination ==
** {{case_clause,ok},
[{emqx_protocol,send,2,[{file,"src/emqx_protocol.erl"},{line,682}]},
{emqx_coap_mqtt_adapter,proto_init,5,
[{file,"src/emqx_coap_mqtt_adapter.erl"},
{line,258}]},
{emqx_coap_mqtt_adapter,init,1,
[{file,"src/emqx_coap_mqtt_adapter.erl"},
{line,120}]},
{gen_server,init_it,2,[{file,"gen_server.erl"},{line,374}]},
{gen_server,init_it,6,[{file,"gen_server.erl"},{line,342}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}
log output:
2019-04-11 12:47:32.747 [error] 1 crasher:
initial call: emqx_coap_mqtt_adapter:init/1
pid: <0.3599.0>
registered_name: []
exception error: no case clause matching ok
in function emqx_protocol:send/2 (src/emqx_protocol.erl, line 682)
in call from emqx_coap_mqtt_adapter:proto_init/5 (src/emqx_coap_mqtt_adapter.erl, line 258)
in call from emqx_coap_mqtt_adapter:init/1 (src/emqx_coap_mqtt_adapter.erl, line 120)
in call from gen_server:init_it/2 (gen_server.erl, line 374)
in call from gen_server:init_it/6 (gen_server.erl, line 342)
ancestors: [<0.3598.0>,<0.3596.0>,<0.3595.0>,<0.1721.0>,coap_server,
<0.1718.0>]
message_queue_len: 1
messages: [{keepalive,start,90}]
links: [<0.3601.0>]
dictionary: [{'$logger_metadata$',#{client_id => <<"1">>}},
{guid,{1554979652747166,268555715087887,0}}]
trap_exit: false
status: running
heap_size: 2586
stack_size: 27
reductions: 2357
neighbours:
2019-04-11 12:47:32.750 [error] 1 ** Generic server <0.3601.0> terminating
** Last message in was {'EXIT',<0.3599.0>,
{{case_clause,ok},
[{emqx_protocol,send,2,
[{file,"src/emqx_protocol.erl"},{line,682}]},
{emqx_coap_mqtt_adapter,proto_init,5,
[{file,"src/emqx_coap_mqtt_adapter.erl"},
{line,258}]},
{emqx_coap_mqtt_adapter,init,1,
[{file,"src/emqx_coap_mqtt_adapter.erl"},
{line,120}]},
{gen_server,init_it,2,
[{file,"gen_server.erl"},{line,374}]},
{gen_server,init_it,6,
[{file,"gen_server.erl"},{line,342}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,249}]}]}}
** When Server state == {state,30000,true,#Fun<emqx_session.1.64839632>,
<<"1">>,<<"admin">>,undefined,undefined,1,0,
#{},false,
{emqx_inflight,65535,{0,nil}},
0,undefined,
{mqueue,true,1000,0,0,none,0,{queue,[],[],0}},
#{},undefined,undefined,undefined,0,undefined,
true,undefined,undefined,
{1554,979652,746745},
undefined,undefined}
** Reason for termination ==
** {{case_clause,ok},
[{emqx_protocol,send,2,[{file,"src/emqx_protocol.erl"},{line,682}]},
{emqx_coap_mqtt_adapter,proto_init,5,
[{file,"src/emqx_coap_mqtt_adapter.erl"},
{line,258}]},
{emqx_coap_mqtt_adapter,init,1,
[{file,"src/emqx_coap_mqtt_adapter.erl"},
{line,120}]},
{gen_server,init_it,2,[{file,"gen_server.erl"},{line,374}]},
{gen_server,init_it,6,[{file,"gen_server.erl"},{line,342}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,249}]}]}
2019-04-11 12:47:32.762 [error] 1 crasher:
initial call: emqx_session:init/1
pid: <0.3601.0>
registered_name: []
exception exit: {{case_clause,ok},
[{emqx_protocol,send,2,
[{file,"src/emqx_protocol.erl"},{line,682}]},
{emqx_coap_mqtt_adapter,proto_init,5,
[{file,"src/emqx_coap_mqtt_adapter.erl"},
{line,258}]},
{emqx_coap_mqtt_adapter,init,1,
[{file,"src/emqx_coap_mqtt_adapter.erl"},
{line,120}]},
{gen_server,init_it,2,
[{file,"gen_server.erl"},{line,374}]},
{gen_server,init_it,6,
[{file,"gen_server.erl"},{line,342}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,249}]}]}
in function gen_server:handle_common_reply/8 (gen_server.erl, line 751)
ancestors: [emqx_session_sup,emqx_sm_sup,emqx_sup,<0.1382.0>]
message_queue_len: 0
messages: []
links: [<0.1650.0>]
dictionary: [{'$logger_metadata$',#{client_id => <<"1">>}}]
trap_exit: true
status: running
heap_size: 10958
stack_size: 27
reductions: 353733
neighbours:
more emqx_auth_clientid.conf
##--------------------------------------------------------------------
ClientId Authentication Plugin
##--------------------------------------------------------------------
Examples
auth.client.1.clientid = 1
auth.client.1.password = public
Password hash.
Value: plain | md5 | sha | sha256
auth.client.password_hash = sha256
Thanks!
The text was updated successfully, but these errors were encountered: