Git Product home page Git Product logo

Comments (4)

alsm avatar alsm commented on May 18, 2024

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.

carl-leopard avatar carl-leopard commented on May 18, 2024

It doesn't work. Thanks anyway.

from paho.mqtt.golang.

pshirali avatar pshirali commented on May 18, 2024

@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.

MattBrittan avatar MattBrittan commented on May 18, 2024

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)

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.