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

can't connect to emqx by DTLS #126

Open
yunanxing opened this issue Aug 9, 2019 · 8 comments
Open

can't connect to emqx by DTLS #126

yunanxing opened this issue Aug 9, 2019 · 8 comments
Assignees
Labels

Comments

@yunanxing
Copy link

yunanxing commented Aug 9, 2019

Environment

  • OS: CentOS7
  • Erlang/OTP: NA
  • EMQ: v3.2.0

Description
I can use libcoap and californium client to connect EMQX_COAP By udp. And terminal was online in EMQX Dashboard, I can publish subscribe topic. But when i use DTLS, I can't get any message from log without any error , but i can't find my terminal in EMQ Dashboard.
I can communicate with californium demo server using the same client by DTLS.
I would like to know how to connect to EMQX using DTLS, thanks!

@frizner
Copy link

frizner commented Apr 3, 2020

Any progress in resolving the bug?

@qingchuwudi
Copy link
Contributor

Is there any messages when using libcoap to send to emqx or recv from emqx?

For example:

coap-client -m put -e 1234 "coaps://127.0.0.1/mqtt/topic1?c=client1&u=tom&p=secret"
Apr 15 16:11:54.659 WARN do_gnutls_handshake: session establish returned -15: 'An unexpected TLS packet was received.'
Apr 15 16:11:55.664 WARN do_gnutls_handshake: session establish returned -10: 'The specified session has been invalidated for some reason.'

If so, you should use ./configure --enable-documentation=no --enable-tests=no --with-openssl instead of ./configure --enable-documentation=no --enable-tests=no. It is the diffrence between diffrent ssl libraries which leads to this error.

@frizner
Copy link

frizner commented Apr 15, 2020

@qingchuwudi :
Thank you for the response.

I rebuilt coaplib but still have the same issue with no any notification from a client or a server.

@terry-xiaoyu
Copy link
Member

terry-xiaoyu commented Apr 16, 2020

@frizner We tested using emqx with 4.0.5 and libcoap with develop branch. It's working as expected.

Could you have a try? And if the same problem repeats, could you please post the Wireshark capture file of the DTLS handshake procedure?

@xianchaoZou
Copy link

Is there any progress on this issue? I'm also paying attention to this problem, because I've never succeeded in creating coups to connect emqx with the California framework. Can you share the Certificate creation command used in the test..

@xianchaoZou
Copy link

@frizner We tested using emqx with 4.0.5 and libcoap with develop branch. It's working as expected.

Could you have a try? And if the same problem repeats, could you please post the Wireshark capture file of the DTLS handshake procedure?

Can you share the Certificate creation command used in the test..

@yunanxing
Copy link
Author

Is there any progress on this issue? I'm also paying attention to this problem, because I've never succeeded in creating coups to connect emqx with the California framework. Can you share the Certificate creation command used in the test..

I use openssl to create certificate, and there is a tool to do it, I can send it to you by email, please left you email

@xianchaoZou
Copy link

Is there any progress on this issue? I'm also paying attention to this problem, because I've never succeeded in creating coups to connect emqx with the California framework. Can you share the Certificate creation command used in the test..

I use openssl to create certificate, and there is a tool to do it, I can send it to you by email, please left you email

Thank you so much. my email : [email protected]

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

6 participants