jMQTT icon indicating copy to clipboard operation
jMQTT copied to clipboard

exception thrown by MQTT client: The connection was lost

Open fensoft opened this issue 5 years ago • 6 comments

Salut @domotruc !

J'utilise https://hub.docker.com/_/eclipse-mosquitto en version 1.6.12 et ça ne fonctionne pas:

[2020-11-09 11:33:34][INFO] : démarre le démon
[2020-11-09 11:33:34][DEBUG] : daemon starts, pid is 26258
[2020-11-09 11:33:34][DEBUG] : status cmd id: 7038, topic:
[2020-11-09 11:33:34][INFO] : Connect to mosquitto: Host=10.68.69.24, Port=1883, Id=jeedom
[2020-11-09 11:33:34][DEBUG] : broker msg: Client jeedom sending CONNECT
[2020-11-09 11:33:34][INFO] : Equipment mqtt: subscribes to "jeedom/#" with Qos=1
[2020-11-09 11:33:34][DEBUG] : broker msg: Client jeedom sending SUBSCRIBE (Mid: 1, Topic: jeedom/#, QoS: 1, Options: 0x00)
[2020-11-09 11:33:34][INFO] : Subscribes to the API topic "jeedom/api"
[2020-11-09 11:33:34][DEBUG] : broker msg: Client jeedom sending SUBSCRIBE (Mid: 2, Topic: jeedom/api, QoS: 1, Options: 0x00)
[2020-11-09 11:33:34][DEBUG] : broker msg: Client jeedom received CONNACK (0)
[2020-11-09 11:33:34][DEBUG] : broker msg: connection response is Connection Accepted.
[2020-11-09 11:33:34][DEBUG] : broker msg: Client jeedom sending PUBLISH (d0, q1, r1, m3, 'jeedom/status', ... (6 bytes))
[2020-11-09 11:33:34][DEBUG] : broker msg: Client jeedom received SUBACK
[2020-11-09 11:33:34][DEBUG] : broker msg: topic subscription accepted, mid=1
[2020-11-09 11:33:34][DEBUG] : broker msg: Client jeedom received SUBACK
[2020-11-09 11:33:34][DEBUG] : broker msg: topic subscription accepted, mid=2
[2020-11-09 11:33:34][DEBUG] : broker msg: disconnected unexpectedly
[2020-11-09 11:33:34][WARNING] : exception thrown by MQTT client: The connection was lost.
[2020-11-09 11:33:34][INFO] : relance le démon dans 15s

Je suis sur un mqtt distant (dans un docker sur la même machine). La conf est celle par défaut. Quand je passe sur le mqtt local, ça fonctionne. Sur le distant, mes prises sonoff arrivent bien à publish dedans et mqtt-spy arrive bien a subscribe.

Merci !

fensoft avatar Nov 09 '20 10:11 fensoft

Attention a ne pas utiliser le même clientid plusieurs fois, sinon le broker n'est pas content :-)

Domochip avatar Apr 07 '21 14:04 Domochip

le test a été fait avec un seul et unique client (le plugin jeedom), donc pas de conflit de clientid

fensoft avatar Apr 08 '21 07:04 fensoft

Comment est configuré le docker? (mosquitto) Pour faire un test simple et direct sans authentification : docker run -d --name mosquitto --restart=always -p 1883:1883 eclipse-mosquitto:latest mosquitto -c /mosquitto-no-auth.conf

Domochip avatar Apr 08 '21 08:04 Domochip

le test à été fait avec aucune option, juste la redir de ports

fensoft avatar Apr 17 '21 17:04 fensoft

OK, Quelle est la version de Debian, de Jeedom? Serait-il possible d'avoir le log d'installation de dépendance?

Domochip avatar Apr 17 '21 23:04 Domochip

Je viens de relire le log. Il y a CONNACK et 2 SUBACK. Ce qui veut dire qu'il y a bien communication avec le broker. Ce qui n'est pas normal, c'est qu'ensuite, la connection est coupée d'un coup :

  • broker msg: disconnected unexpectedly
  • The connection was lost.

Domochip avatar Apr 18 '21 17:04 Domochip