Comments (12)
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.
@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.
Hi, @ServerTech , is the device you refered is mqtt-sn device rather mqtt device?
from emqx-sn.
@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.
@gilbert-wong answering for @ServerTech . Yes, It is an MQTT-SN device.
from emqx-sn.
@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.
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.
from emqx-sn.
@gilbert-wong Are there any updates on this yet?
from emqx-sn.
It would be fixed in emqx-3.2-rc.1
from emqx-sn.
from emqx-sn.
Hi, @pritstift, emqx-3.2-rc.1 has been released now. Welcome to try it.
from emqx-sn.
Related Issues (20)
- mqtt-sn Gateway not working HOT 7
- connection would be destroyed if mqtt-sn client send a 2nd CONNECT in connected state.
- QoS -1 Not Working HOT 1
- Options for transparent and aggregate sn gateway HOT 2
- Empty ClintId on connect HOT 1
- Support of sleeping clients HOT 4
- QoS granted on SUBACK is ignored HOT 2
- Serial port support HOT 1
- Subsequent CONNECTs ignored by gateway
- UNSUBSCRIBE without a payload disconnects the client HOT 4
- qos -1 issue HOT 2
- undefined macro 'SN_RC_MQTT_FAILURE' HOT 7
- Setting the port to ::1:2000 causes error HOT 12
- CONNACK is not always sent to the client HOT 4
- Feature request: Wildcards HOT 4
- Forward to mqtt server HOT 1
- Forwarder encapsulation
- Failure to accept Sn messages with v3 beta HOT 7
- SEARCHGW should always be answered by gateway
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emqx-sn.