Giter Club home page Giter Club logo

Comments (2)

kFYatek avatar kFYatek commented on June 2, 2024

@eabase

The most serious error seem to be this one:

/Anjay/deps/avs_commons/src/net/compat/posix/avs_compat_addrinfo.c:242]: 
getaddrinfo() error: Name or service not known; family == (avs_net_af_t) 2

Also not sure why it is logged as DEBUG when it's clearly an ERROR.

It's an error only on a very low-level layer, but not really an error in the big picture perspective. Anjay is attempting to resolve the hostname as an IPv6 address (that's what (avs_net_af_t) 2 is referring to), and this fails. It then proceeds to resolve the same hostname as IPv4, and that apparently succeeds. That's also why it's logged on the DEBUG level.

The most relevant log message seems to be this one:

2023-08-03 16:01:13.543408 ERROR [avs_net] [/cygdrive/c/mydev/pr_anjay/Anjay/deps/avs_commons/src/net/mbedtls/avs_mbedtls_socket.c:1311]: handshake failed: -26624

I agree that those handshake errors can be cryptic, but the -26624 code refers to a timeout. You can find that by grepping Mbed TLS sources:

kfyatek@kfyatek-pc:/usr/include/mbedtls$ printf '0x%x\n' 26624
0x6800
kfyatek@kfyatek-pc:/usr/include/mbedtls$ grep -r 0x6800
ssl.h:#define MBEDTLS_ERR_SSL_TIMEOUT                           -0x6800

Handshake timeout may mean, well, literally anything ;) but in my experience, the most probable cause is that the DTLS credentials are not recognized by the server. Please double-check that the identity and key are matching on both sides. Please also check that they are in the same format on both sides - since you're using --key-as-string, please make sure that on the server side, the key is also treated as a literal string, as opposed to e.g. encoded as hex or base64.

What kind of server are you trying to connect to? Is it an installation of Coiote DM, or maybe Leshan? We may be able to provide hints on configuring the server in that case.

If you're sure that everything matches and you're still getting this error, then please provide a packet capture (PCAP). It might be helpful in further debugging the issue.

from anjay.

eabase avatar eabase commented on June 2, 2024

Hi @kFYatek

Thank you for that explanation. 💯
Indeed the client was also compiled with IPv6.

From that it seem that some corporate firewall is blocking connections to the coap/s ports, as we're using a CoioteDM provided server.

from anjay.

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.