Comments (4)
It looks from the trace there as though you might be using an old version of the library, the repository at org.eclipse.paho.mqtt.golang.git is not up to date compared to the github.com hosted one. Please ensure you are have downloaded and are importing "github.com/eclipse/paho.mqtt.golang"
from paho.mqtt.golang.
It doesn't work. Thanks anyway.
from paho.mqtt.golang.
@alsm , I've seen this happen with a v1.1.1 as well (though I'm running a custom mod built on top of v1.1.1). The repro is not as frequent; but may be reproducible on long-running/stressed environments.
I put a deferred recovery around the PingreqPacket.Write()
to dump the packet contents.
I had also enabled logging on all levels and additional log entries on setConnected
, IsConnected
, connectionStatus
, internalConnLost
to track status. Here's a dump of the log:
:mqtt: DEBUG | [client] Connect()
:mqtt: DEBUG | [store] memorystore initialized
:mqtt: DEBUG | ----- setConnected: 1
:mqtt: DEBUG | [client] about to write new connect msg
:mqtt: DEBUG | [client] Connect()
:mqtt: DEBUG | [store] memorystore initialized
:mqtt: DEBUG | ----- setConnected: 1
:mqtt: DEBUG | [client] about to write new connect msg
:mqtt: DEBUG | [client] Connect()
:mqtt: DEBUG | [store] memorystore initialized
:mqtt: DEBUG | ----- setConnected: 1
:mqtt: DEBUG | [client] about to write new connect msg
:mqtt: DEBUG | [client] Connect()
:mqtt: DEBUG | [store] memorystore initialized
:mqtt: DEBUG | ----- setConnected: 1
:mqtt: DEBUG | [client] about to write new connect msg
:mqtt: DEBUG | [client] Connect()
:mqtt: DEBUG | [store] memorystore initialized
:mqtt: DEBUG | ----- setConnected: 1
:mqtt: DEBUG | [client] about to write new connect msg
:mqtt: DEBUG | [client] socket connected to broker
:mqtt: DEBUG | [client] Using MQTT 3.1.1 protocol
:mqtt: DEBUG | [net] connect started
:mqtt: DEBUG | [net] received connack
:mqtt: DEBUG | ----- setConnected: 3
:mqtt: DEBUG | [client] client is connected
:mqtt: DEBUG | [client] Added 4 workers
:mqtt: DEBUG | [client] exit startClient
:mqtt: DEBUG | [net] logic started
:mqtt: DEBUG | [net] logic waiting for msg on ibound
:mqtt: DEBUG | [net] outgoing started
:mqtt: DEBUG | [net] outgoing waiting for an outbound message
:mqtt: DEBUG | [net] incoming started
:mqtt: DEBUG | [pinger] keepalive starting
:mqtt: DEBUG | [net] errorWatch started
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: true
:mqtt: DEBUG | ----- connectionStatus: 3
:mqtt: DEBUG | [client] sending publish message, topic: <<topic>>
:mqtt: DEBUG | [net] obound wrote msg, id: 0
:mqtt: DEBUG | [net] outgoing waiting for an outbound message
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: true
:mqtt: DEBUG | ----- connectionStatus: 3
:mqtt: DEBUG | [client] sending publish message, topic: <<topic>>
:mqtt: DEBUG | [net] obound wrote msg, id: 1
:mqtt: DEBUG | [net] outgoing waiting for an outbound message
:mqtt: DEBUG | [net] Received Message
:mqtt: DEBUG | [net] logic got msg on ibound
:mqtt: DEBUG | [net] received pubrec, id: 1
:mqtt: DEBUG | [net] logic waiting for msg on ibound
:mqtt: DEBUG | [net] obound priority msg to write, type *packets.PubrelPacket
:mqtt: DEBUG | [net] outgoing waiting for an outbound message
:mqtt: DEBUG | [net] Received Message
:mqtt: DEBUG | [net] logic got msg on ibound
:mqtt: DEBUG | [store] memorystore del: message 1 was deleted
:mqtt: DEBUG | [net] received pubcomp, id: 1
:mqtt: DEBUG | [net] logic waiting for msg on ibound
:mqtt: DEBUG | [client] enter Subscribe
:mqtt: DEBUG | ----- IsConnected: true
:mqtt: DEBUG | [client] enter Subscribe
:mqtt: DEBUG | ----- IsConnected: true
:mqtt: DEBUG | [client] SUBSCRIBE: dup: false qos: 1 retain: false rLength: 0 MessageID: 0 topics: [<<topics>>]
:mqtt: DEBUG | [client] exit Subscribe
:mqtt: DEBUG | [net] obound priority msg to write, type *packets.SubscribePacket
:mqtt: DEBUG | [net] outgoing waiting for an outbound message
:mqtt: DEBUG | [client] enter Subscribe
:mqtt: DEBUG | ----- IsConnected: true
:mqtt: DEBUG | [client] SUBSCRIBE: dup: false qos: 1 retain: false rLength: 0 MessageID: 0 topics: [<<topics>>]
:mqtt: DEBUG | [client] exit Subscribe
:mqtt: DEBUG | [client] SUBSCRIBE: dup: false qos: 1 retain: false rLength: 0 MessageID: 0 topics: [<<topics>>]
:mqtt: DEBUG | [net] obound priority msg to write, type *packets.SubscribePacket
:mqtt: DEBUG | [client] exit Subscribe
:mqtt: DEBUG | [net] outgoing waiting for an outbound message
:mqtt: DEBUG | [net] obound priority msg to write, type *packets.SubscribePacket
:mqtt: DEBUG | [net] outgoing waiting for an outbound message
:mqtt: DEBUG | [net] Received Message
:mqtt: DEBUG | [net] logic got msg on ibound
:mqtt: WARN | [store] memorystore del: message 1 not found
:mqtt: DEBUG | [net] received suback, id: 1
:mqtt: DEBUG | [net] granted qoss [0]
:mqtt: DEBUG | [net] logic waiting for msg on ibound
:mqtt: DEBUG | [net] Received Message
:mqtt: DEBUG | [net] Received Message
:mqtt: DEBUG | [net] logic got msg on ibound
:mqtt: WARN | [store] memorystore del: message 2 not found
:mqtt: DEBUG | [net] received suback, id: 2
:mqtt: DEBUG | [net] granted qoss [2]
:mqtt: DEBUG | [net] logic waiting for msg on ibound
:mqtt: DEBUG | [net] logic got msg on ibound
:mqtt: WARN | [store] memorystore del: message 3 not found
:mqtt: DEBUG | [net] received suback, id: 3
:mqtt: DEBUG | [net] granted qoss [2]
:mqtt: DEBUG | [net] logic waiting for msg on ibound
:mqtt: DEBUG | [client] socket connected to broker
:mqtt: DEBUG | [client] Using MQTT 3.1.1 protocol
:mqtt: DEBUG | [net] connect started
:mqtt: ERROR | [net] incoming stopped with error EOF
:mqtt: ERROR | [net] error triggered, stopping
:mqtt: DEBUG | *** entered internalConnLost
:mqtt: DEBUG | ----- IsConnected: true
:mqtt: DEBUG | *** internalConnLost: yes we are connected, so proceed
:mqtt: DEBUG | [net] outgoing stopped
:mqtt: WARN | [net] logic stopped
:mqtt: DEBUG | [pinger] keepalive stopped
:mqtt: DEBUG | [msgids] cleaned up
:mqtt: DEBUG | ----- setConnected: 0
:mqtt: DEBUG | *** internalConnLost: OnConnectionLost handler kicked
:mqtt: ERROR | [net] connect got error read tcp 172.121.3.34:60708->192.168.0.5:22100: use of closed network connection
:mqtt: ERROR | [client] Connecting to ssl://<<address>>:22100 CONNACK was not CONN_ACCEPTED, but rather Connection Error
:mqtt: ERROR | [client] Failed to connect to a broker
:mqtt: DEBUG | ----- setConnected: 0
:mqtt: DEBUG | [store] memorystore closed
:mqtt: ERROR | [client] tls: DialWithDialer timed out
:mqtt: WARN | [client] failed to connect to broker, trying next
:mqtt: ERROR | [client] Failed to connect to a broker
:mqtt: DEBUG | ----- setConnected: 0
:mqtt: ERROR | [store] Trying to close memory store, but not open
:mqtt: DEBUG | [client] socket connected to broker
:mqtt: DEBUG | [client] Using MQTT 3.1.1 protocol
:mqtt: DEBUG | [net] connect started
:mqtt: DEBUG | [net] received connack
:mqtt: DEBUG | ----- setConnected: 3
:mqtt: DEBUG | [client] client is connected
:mqtt: DEBUG | [client] Added 4 workers
:mqtt: DEBUG | [client] exit startClient
:mqtt: DEBUG | [net] incoming started
:mqtt: DEBUG | [pinger] keepalive starting
:mqtt: DEBUG | [net] errorWatch started
:mqtt: DEBUG | [net] outgoing started
:mqtt: DEBUG | [net] outgoing waiting for an outbound message
:mqtt: DEBUG | [net] logic started
:mqtt: DEBUG | [net] logic waiting for msg on ibound
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: true
:mqtt: DEBUG | ----- connectionStatus: 3
:mqtt: DEBUG | [client] sending publish message, topic: <<topic>>
:mqtt: DEBUG | [client] enter Subscribe
:mqtt: DEBUG | ----- IsConnected: true
:mqtt: DEBUG | [client] SUBSCRIBE: dup: false qos: 1 retain: false rLength: 0 MessageID: 0 topics: [<<topics>>]
:mqtt: DEBUG | [client] exit Subscribe
:mqtt: DEBUG | [client] enter Subscribe
:mqtt: DEBUG | ----- IsConnected: true
:mqtt: DEBUG | [net] obound priority msg to write, type *packets.SubscribePacket
:mqtt: DEBUG | [client] SUBSCRIBE: dup: false qos: 1 retain: false rLength: 0 MessageID: 0 topics: [<<topics>>]
:mqtt: DEBUG | [client] exit Subscribe
:mqtt: DEBUG | [client] enter Subscribe
:mqtt: DEBUG | ----- IsConnected: true
:mqtt: DEBUG | [client] SUBSCRIBE: dup: false qos: 1 retain: false rLength: 0 MessageID: 0 topics: [<<topics>>]
:mqtt: DEBUG | [client] exit Subscribe
:mqtt: DEBUG | [net] outgoing waiting for an outbound message
:mqtt: DEBUG | [net] obound priority msg to write, type *packets.SubscribePacket
:mqtt: DEBUG | [net] outgoing waiting for an outbound message
:mqtt: DEBUG | [net] obound priority msg to write, type *packets.SubscribePacket
:mqtt: DEBUG | [net] outgoing waiting for an outbound message
:mqtt: DEBUG | [net] Received Message
:mqtt: DEBUG | [net] logic got msg on ibound
:mqtt: ERROR | [store] Trying to use memory store, but not open
:mqtt: DEBUG | [net] received suback, id: 1
:mqtt: DEBUG | [net] granted qoss [2]
:mqtt: DEBUG | [net] logic waiting for msg on ibound
:mqtt: DEBUG | [net] Received Message
:mqtt: DEBUG | [net] logic got msg on ibound
:mqtt: ERROR | [store] Trying to use memory store, but not open
:mqtt: DEBUG | [net] received suback, id: 2
:mqtt: DEBUG | [net] granted qoss [2]
:mqtt: DEBUG | [net] logic waiting for msg on ibound
:mqtt: DEBUG | [net] Received Message
:mqtt: DEBUG | [net] logic got msg on ibound
:mqtt: ERROR | [store] Trying to use memory store, but not open
:mqtt: DEBUG | [net] received suback, id: 3
:mqtt: DEBUG | [net] granted qoss [0]
:mqtt: DEBUG | [net] logic waiting for msg on ibound
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: true
:mqtt: DEBUG | ----- connectionStatus: 3
:mqtt: DEBUG | [client] sending publish message, topic: <<topic>>
:mqtt: ERROR | [store] Trying to use memory store, but not open
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: true
:mqtt: DEBUG | ----- connectionStatus: 3
:mqtt: DEBUG | [client] sending publish message, topic: <<topic>>
:mqtt: ERROR | [store] Trying to use memory store, but not open
:mqtt: DEBUG | [net] obound wrote msg, id: 2
:mqtt: DEBUG | [net] outgoing waiting for an outbound message
:mqtt: DEBUG | [net] Received Message
:mqtt: DEBUG | [net] logic got msg on ibound
:mqtt: ERROR | [store] Trying to use memory store, but not open
:mqtt: DEBUG | [net] received puback, id: 2
:mqtt: DEBUG | [net] logic waiting for msg on ibound
:mqtt: ERROR | [client] tls: DialWithDialer timed out
:mqtt: WARN | [client] failed to connect to broker, trying next
:mqtt: ERROR | [client] Failed to connect to a broker
:mqtt: DEBUG | ----- setConnected: 0
:mqtt: ERROR | [store] Trying to close memory store, but not open
:mqtt: DEBUG | [pinger] ping check 4
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [pinger] ping check 9
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [pinger] ping check 14
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [pinger] ping check 19
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [pinger] ping check 24
:mqtt: DEBUG | [pinger] keepalive sending ping
:mqtt: ********* PINGREQ **********
:mqtt: Packet: PINGREQ: dup: false qos: 0 retain: false rLength: 0
:mqtt: Packet(s): PINGREQ: dup: false qos: 0 retain: false rLength: 0
:mqtt: FixedHeader: PINGREQ: dup: false qos: 0 retain: false rLength: 0
:mqtt: Packed: {[192 0] 0 [192 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] 0}
:mqtt: ********* PINGREQ **********
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [pinger] ping check 5
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: ERROR | [net] incoming stopped with error EOF
:mqtt: ERROR | [net] error triggered, stopping
:mqtt: DEBUG | *** entered internalConnLost
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [pinger] ping check 10
:mqtt: DEBUG | [client] enter Publish
:mqtt: DEBUG | ----- IsConnected: false (default)
:mqtt: DEBUG | [client] enter Publish
from paho.mqtt.golang.
Closing due to age/inactivity. Please feel free to reopen if this issue is occurring with the current release.
from paho.mqtt.golang.
Related Issues (20)
- MQTTv5: Publish Release encoding is invalid HOT 1
- Duplicate Callback Execution Issue in MQTT Subscription with Wildcard Subscriptions HOT 3
- Why is the release version V1.4.3 and not v1.4.3? HOT 3
- Dual Licensing EDL 1.0 HOT 2
- support of shared subscription in paho.mqtt.golang HOT 5
- No error is returned when I cannot subscribe to a topic. HOT 4
- Understanding DUP messages, and manually set DUP flag. HOT 2
- Feature Request: support json.RawMessage as payload for publishing messages HOT 2
- Any way to retry Publish messages, when QOS is 1 HOT 2
- token.WaitTimeout There is an error missing. HOT 5
- Data race condition HOT 2
- Need to get explicit ACK events HOT 2
- Client.OptionsReader() returns a struct ClientOptionsReader instead of interface which make mocking impossible HOT 4
- Race Condition when subscribing to a topic with a retained message HOT 3
- Unable to recover from "not currently connected and ResumeSubs not set" error HOT 10
- 32 bit bullseye and paho-mqtt 2.0 HOT 2
- MQTT θΏζ₯ε€±θ΄₯: status can only transition to connecting from disconnected HOT 3
- Unable to build using latest version from master HOT 2
- Need a function to get the ClientID of the message sender HOT 4
- goroutine leak when connectionUp(true) return error HOT 3
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 paho.mqtt.golang.