Coder Social home page Coder Social logo

CoAP Put error about emqx-coap HOT 5 CLOSED

Zengpeng21 avatar Zengpeng21 commented on June 20, 2024
CoAP Put error

from emqx-coap.

Comments (5)

grutabow avatar grutabow commented on June 20, 2024

What is your coap client? libcoap?

from emqx-coap.

grutabow avatar grutabow commented on June 20, 2024

Please share your emqtt log, such as log/error.log, log/erlang.log.1. Thanks!

And what is your emqttd version?

from emqx-coap.

Zengpeng21 avatar Zengpeng21 commented on June 20, 2024

coap client: californium

log/error.log:
2017-11-05 19:34:16.529 [error] <0.482.0>@emq_coap_resource:coap_put:76 CoAP-RES: put has error, Prefix=[<<"mqtt">>], Name=[<<"topic1">>,<<"toic2">>], Content={coap_content,undefined,60,<<"text/plain">>,[],<<"helloworld!">>}
2017-11-05 19:34:36.530 [error] <0.360.0> Supervisor {<0.360.0>,coap_channel_sup_sup} had child {{127,0,0,1},49988} started with {coap_channel_sup,start_link,undefined} at <0.479.0> exit with reason killed in context child_terminated
2017-11-05 19:34:36.530 [error] <0.480.0> gen_server <0.480.0> terminated with reason: killed
2017-11-05 19:34:36.530 [error] <0.480.0> CRASH REPORT Process <0.480.0> with 0 neighbours exited with reason: killed in gen_server:terminate/7 line 812

Other log files are not recorded.

from emqx-coap.

Zengpeng21 avatar Zengpeng21 commented on June 20, 2024

emqttd version: 2.3

from emqx-coap.

justina111 avatar justina111 commented on June 20, 2024

You can change your url to "coap://localhost/mqtt?c=client1", and set the uri_path option of "topic1/topic2" separately by the method "addUriPath", then the uri_path won't be split by "/". For example, you can make your put like,
String resourcePath = "topic1/topic2";
String uri = "coap://localhost/mqtt?c=client1”;
Request request = Request.newPut();
request.setURI(uri);
request.getOptions().addUriPath(resourcePath);

Hope it will help you.

from emqx-coap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.