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

LWT not sent on exceeded timeout #1297

Closed
copyrights opened this issue May 28, 2019 · 2 comments
Closed

LWT not sent on exceeded timeout #1297

copyrights opened this issue May 28, 2019 · 2 comments

Comments

@copyrights
Copy link

I have a similar issue to #1143 with 1.6.2

My client connects with:

MQ Telemetry Transport Protocol, Connect Command
    Header Flags: 0x10, Message Type: Connect Command
    Msg Len: 64
    Protocol Name Length: 4
    Protocol Name: MQTT
    Version: MQTT v3.1.1 (4)
    Connect Flags: 0xe4, User Name Flag, Password Flag, Will Retain, QoS Level: At most once delivery (Fire and Forget), Will Flag
        1... .... = User Name Flag: Set
        .1.. .... = Password Flag: Set
        ..1. .... = Will Retain: Set
        ...0 0... = QoS Level: At most once delivery (Fire and Forget) (0)
        .... .1.. = Will Flag: Set
        .... ..0. = Clean Session Flag: Not set
        .... ...0 = (Reserved): Not set
    Keep Alive: 60
    Client ID Length: 8
    Client ID: QuinLED4
    Will Topic Length: 15
    Will Topic: QuinLED4/status
    Will Message Length: 1
    Will Message: 0
    User Name Length: 8
    User Name: quinled4
    Password Length: 13
    Password: NotMyPassword

Then I unplug the client device and wait. As expected log shows:

1559035151: Client QuinLED4 has exceeded timeout, disconnecting.

But the LWT is not sent.

Here the full session with one subscriber from mosquitto log:

1559035024: mosquitto version 1.6.2 starting
1559035024: Config loaded from /mosquitto/config/mosquitto.conf.
1559035024: Opening ipv4 listen socket on port 1883.
1559035024: Opening ipv6 listen socket on port 1883.
1559035024: Opening ipv4 listen socket on port 8883.
1559035024: Opening ipv6 listen socket on port 8883.
1559035036: New connection from 192.168.159.28 on port 1883.
1559035037: New client connected from 192.168.159.28 as Monitor (p2, c1, k60, u'mqttfx').
1559035037: No will message specified.
1559035037: Sending CONNACK to Monitor (0, 0)
1559035043: Received SUBSCRIBE from Monitor
1559035043: 	QuinLED4/# (QoS 0)
1559035043: Monitor 0 QuinLED4/#
1559035043: Sending SUBACK to Monitor
1559035056: New connection from 192.168.159.83 on port 1883.
1559035056: New client connected from 192.168.159.83 as QuinLED4 (p2, c0, k60, u'quinled4').
1559035056: Will message specified (1 bytes) (r1, q0).
1559035056: 	QuinLED4/status
1559035056: Sending CONNACK to QuinLED4 (0, 0)
1559035057: Received UNSUBSCRIBE from QuinLED4
1559035057: 	#
1559035057: QuinLED4 #
1559035057: Sending UNSUBACK to QuinLED4
1559035057: Received SUBSCRIBE from QuinLED4
1559035057: 	QuinLED4/brightness/set (QoS 0)
1559035057: QuinLED4 0 QuinLED4/brightness/set
1559035057: Sending SUBACK to QuinLED4
1559035057: Received SUBSCRIBE from QuinLED4
1559035057: 	QuinLED4/mired/set (QoS 0)
1559035057: QuinLED4 0 QuinLED4/mired/set
1559035057: Sending SUBACK to QuinLED4
1559035057: Received SUBSCRIBE from QuinLED4
1559035057: 	QuinLED4/kelvin/set (QoS 0)
1559035057: QuinLED4 0 QuinLED4/kelvin/set
1559035057: Sending SUBACK to QuinLED4
1559035057: Received SUBSCRIBE from QuinLED4
1559035057: 	QuinLED4/channel/+/set (QoS 0)
1559035057: QuinLED4 0 QuinLED4/channel/+/set
1559035057: Sending SUBACK to QuinLED4
1559035057: Received SUBSCRIBE from QuinLED4
1559035057: 	QuinLED4/relay/+/set (QoS 0)
1559035057: QuinLED4 0 QuinLED4/relay/+/set
1559035057: Sending SUBACK to QuinLED4
1559035057: Received SUBSCRIBE from QuinLED4
1559035057: 	QuinLED4/pulse/+/set (QoS 0)
1559035057: QuinLED4 0 QuinLED4/pulse/+/set
1559035057: Sending SUBACK to QuinLED4
1559035057: Received SUBSCRIBE from QuinLED4
1559035057: 	QuinLED4/led/+/set (QoS 0)
1559035057: QuinLED4 0 QuinLED4/led/+/set
1559035057: Sending SUBACK to QuinLED4
1559035057: Received SUBSCRIBE from QuinLED4
1559035057: 	QuinLED4/action/set (QoS 0)
1559035057: QuinLED4 0 QuinLED4/action/set
1559035057: Sending SUBACK to QuinLED4
1559035060: Received PUBLISH from QuinLED4 (d0, q0, r1, m0, 'QuinLED4/app', ... (7 bytes))
1559035060: Sending PUBLISH to Monitor (d0, q0, r0, m0, 'QuinLED4/app', ... (7 bytes))
1559035060: Received PUBLISH from QuinLED4 (d0, q0, r1, m0, 'QuinLED4/version', ... (10 bytes))
1559035060: Sending PUBLISH to Monitor (d0, q0, r0, m0, 'QuinLED4/version', ... (10 bytes))
1559035060: Received PUBLISH from QuinLED4 (d0, q0, r1, m0, 'QuinLED4/board', ... (20 bytes))
1559035060: Sending PUBLISH to Monitor (d0, q0, r0, m0, 'QuinLED4/board', ... (20 bytes))
1559035060: Received PUBLISH from QuinLED4 (d0, q0, r1, m0, 'QuinLED4/host', ... (8 bytes))
1559035060: Sending PUBLISH to Monitor (d0, q0, r0, m0, 'QuinLED4/host', ... (8 bytes))
1559035060: Received PUBLISH from QuinLED4 (d0, q0, r1, m0, 'QuinLED4/ssid', ... (4 bytes))
1559035060: Sending PUBLISH to Monitor (d0, q0, r0, m0, 'QuinLED4/ssid', ... (4 bytes))
1559035060: Received PUBLISH from QuinLED4 (d0, q0, r1, m0, 'QuinLED4/ip', ... (14 bytes))
1559035060: Sending PUBLISH to Monitor (d0, q0, r0, m0, 'QuinLED4/ip', ... (14 bytes))
1559035060: Received PUBLISH from QuinLED4 (d0, q0, r1, m0, 'QuinLED4/mac', ... (17 bytes))
1559035060: Sending PUBLISH to Monitor (d0, q0, r0, m0, 'QuinLED4/mac', ... (17 bytes))
1559035060: Received PUBLISH from QuinLED4 (d0, q0, r1, m0, 'QuinLED4/rssi', ... (3 bytes))
1559035060: Sending PUBLISH to Monitor (d0, q0, r0, m0, 'QuinLED4/rssi', ... (3 bytes))
1559035060: Received PUBLISH from QuinLED4 (d0, q0, r1, m0, 'QuinLED4/uptime', ... (2 bytes))
1559035060: Sending PUBLISH to Monitor (d0, q0, r0, m0, 'QuinLED4/uptime', ... (2 bytes))
1559035060: Received PUBLISH from QuinLED4 (d0, q0, r1, m0, 'QuinLED4/datetime', ... (19 bytes))
1559035060: Sending PUBLISH to Monitor (d0, q0, r0, m0, 'QuinLED4/datetime', ... (19 bytes))
1559035060: Received PUBLISH from QuinLED4 (d0, q0, r1, m0, 'QuinLED4/freeheap', ... (5 bytes))
1559035060: Sending PUBLISH to Monitor (d0, q0, r0, m0, 'QuinLED4/freeheap', ... (5 bytes))
1559035060: Received PUBLISH from QuinLED4 (d0, q0, r1, m0, 'QuinLED4/relay/0', ... (1 bytes))
1559035060: Sending PUBLISH to Monitor (d0, q0, r0, m0, 'QuinLED4/relay/0', ... (1 bytes))
1559035060: Received PUBLISH from QuinLED4 (d0, q0, r1, m0, 'QuinLED4/mired', ... (3 bytes))
1559035060: Sending PUBLISH to Monitor (d0, q0, r0, m0, 'QuinLED4/mired', ... (3 bytes))
1559035060: Received PUBLISH from QuinLED4 (d0, q0, r1, m0, 'QuinLED4/channel/0', ... (1 bytes))
1559035060: Sending PUBLISH to Monitor (d0, q0, r0, m0, 'QuinLED4/channel/0', ... (1 bytes))
1559035060: Received PUBLISH from QuinLED4 (d0, q0, r1, m0, 'QuinLED4/channel/1', ... (3 bytes))
1559035060: Sending PUBLISH to Monitor (d0, q0, r0, m0, 'QuinLED4/channel/1', ... (3 bytes))
1559035060: Received PUBLISH from QuinLED4 (d0, q0, r1, m0, 'QuinLED4/brightness', ... (3 bytes))
1559035060: Sending PUBLISH to Monitor (d0, q0, r0, m0, 'QuinLED4/brightness', ... (3 bytes))
1559035060: Received PUBLISH from QuinLED4 (d0, q0, r1, m0, 'QuinLED4/vcc', ... (4 bytes))
1559035060: Sending PUBLISH to Monitor (d0, q0, r0, m0, 'QuinLED4/vcc', ... (4 bytes))
1559035060: Received PUBLISH from QuinLED4 (d0, q0, r1, m0, 'QuinLED4/status', ... (1 bytes))
1559035060: Sending PUBLISH to Monitor (d0, q0, r0, m0, 'QuinLED4/status', ... (1 bytes))
1559035060: Received PUBLISH from QuinLED4 (d0, q0, r1, m0, 'QuinLED4/loadavg', ... (3 bytes))
1559035060: Sending PUBLISH to Monitor (d0, q0, r0, m0, 'QuinLED4/loadavg', ... (3 bytes))
1559035103: Received PINGREQ from Monitor
1559035103: Sending PINGRESP to Monitor
1559035151: Client QuinLED4 has exceeded timeout, disconnecting.
1559035163: Received PINGREQ from Monitor
1559035163: Sending PINGRESP to Monitor
1559035201: Received DISCONNECT from Monitor
1559035201: Client Monitor disconnected.
1559035207: mosquitto version 1.6.2 terminating
1559035207: Saving in-memory database to /mosquitto/datamosquitto.db.
@ralight
Copy link
Contributor

ralight commented May 29, 2019

I think this is the same issue as reported in #1273. If you want to give the fixed version a try, then have a look at the fixes branch.

@copyrights
Copy link
Author

Tested against HEAD of fixes branch. Works as expected. Thank you.

closed by #1273

@lock lock bot locked as resolved and limited conversation to collaborators Aug 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants