Giter VIP home page Giter VIP logo

Comments (12)

ServerTech avatar ServerTech commented on August 20, 2024

Hi,
I have this issue too. I attempted a rather large series of messages sent and received.

At first, I set the keepalive timeout in the CONNECT packet to 120 seconds. After these 120 seconds have passed, the server disconnects my device automatically, which is not expected as I've been communicating with the server every few seconds. I attempted to also send PINREQs every 10 seconds (but I am not responding to PINGREQ sent by the server---as far as I know it does not send any), this did not fix the issue either.

However, increasing the timeout in the CONNECT packet to 10 minutes works correctly.

EMQX v3.1-rc.3

from emqx-sn.

gilbertwong96 avatar gilbertwong96 commented on August 20, 2024

@pritstift Sorry for late response, the mqtt-sn gateway is in idle state which means that mqtt-sn gateway has not received connect packet of mqtt protocol. The default idle timeout value of this state has been hard coded as 10s. So if you do nothing for a long time which longer than 10s in idle state of emqx-sn gateway. It will log shutdown due to idle_timeout error.

from emqx-sn.

gilbertwong96 avatar gilbertwong96 commented on August 20, 2024

Hi, @ServerTech , is the device you refered is mqtt-sn device rather mqtt device?

from emqx-sn.

saschathiergart avatar saschathiergart commented on August 20, 2024

@gilbert-wong Thanks for the info. What is the reason that an idle timeout is required? Logging shutdown due to idle_timeout every 10 secs is not very helpful if no device does connect using mqtt-sn for some time.
It may be useful to either configure a higher timeout or to turn off logging of this error. What would be the implications of a higher timeout?

from emqx-sn.

pratikguru avatar pratikguru commented on August 20, 2024

@gilbert-wong answering for @ServerTech . Yes, It is an MQTT-SN device.

from emqx-sn.

ServerTech avatar ServerTech commented on August 20, 2024

@gilbert-wong I was presuming that talking to the gateway in any shape or form resets the keepalive timer. Originally set to 120 seconds in the CONNECT packet, I publish and receive subscription messages every 10-15 seconds or so, and the gateway disconnects the device (and does not respond to subsequent PUBLISH messages) after the 120 seconds have passed.

As mentioned in the previous message, I also attempted to send frequent PINGREQs (with successful PINGRESPs from the server). The server still disconnects me once the 120 seconds have passed.

However, I was able to fix this by setting the keepalive timeout in the CONNECT packet to an unreasonably high value of 10 minutes (which means that I'll be able to keep the connection active for 10 minutes).

Am I doing something wrong and misunderstanding the protocol, or is the keepalive bugged?'

P.S. Yes, it's over MQTT-SN.

from emqx-sn.

ServerTech avatar ServerTech commented on August 20, 2024

I believe we are speaking of a slightly different issue. Mine is with the gateway disconnecting the device after the timeout expires (however the timer should have been reset). I will open a new issue. Apologies!

from emqx-sn.

gilbertwong96 avatar gilbertwong96 commented on August 20, 2024

from emqx-sn.

saschathiergart avatar saschathiergart commented on August 20, 2024

@gilbert-wong Are there any updates on this yet?

from emqx-sn.

gilbertwong96 avatar gilbertwong96 commented on August 20, 2024

It would be fixed in emqx-3.2-rc.1

from emqx-sn.

saschathiergart avatar saschathiergart commented on August 20, 2024

from emqx-sn.

gilbertwong96 avatar gilbertwong96 commented on August 20, 2024

Hi, @pritstift, emqx-3.2-rc.1 has been released now. Welcome to try it.

from emqx-sn.

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.