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

exception thrown by MQTT client: The connection was lost #109

Open
fensoft opened this issue Nov 9, 2020 · 6 comments
Open

exception thrown by MQTT client: The connection was lost #109

fensoft opened this issue Nov 9, 2020 · 6 comments

Comments

@fensoft
Copy link

fensoft commented Nov 9, 2020

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 !

@Domochip
Copy link

Domochip commented Apr 7, 2021

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

@fensoft
Copy link
Author

fensoft commented Apr 8, 2021

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

@Domochip
Copy link

Domochip commented Apr 8, 2021

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

@fensoft
Copy link
Author

fensoft commented Apr 17, 2021

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

@Domochip
Copy link

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

@Domochip
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants