We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug MQTT client initialization failed. Was working until latest update.
To Reproduce Steps to reproduce the behavior:
image: nicolargo/glances:latest-full container_name: glances_mqtt restart: always pid: host volumes: - /var/run/docker.sock:/var/run/docker.sock - **/glances/data/glances.conf:/glances/conf/glances.conf environment: - "GLANCES_OPT= -C /glances/conf/glances.conf --disable-plugin all --enable-plugin cpu,mem,containers,system,fs,uptime --quiet --export mqtt" networks: - proxy
glances_mqtt | MQTT client initialization failed glances_mqtt | Exception ignored in: <function Client.del at 0x7fea5f6316c0> glances_mqtt | Traceback (most recent call last): glances_mqtt | File "/venv/lib/python3.11/site-packages/paho/mqtt/client.py", line 874, in del glances_mqtt | self._reset_sockets() glances_mqtt | File "/venv/lib/python3.11/site-packages/paho/mqtt/client.py", line 1133, in _reset_sockets glances_mqtt | self._sock_close() glances_mqtt | File "/venv/lib/python3.11/site-packages/paho/mqtt/client.py", line 1119, in _sock_close glances_mqtt | if not self._sock: glances_mqtt | ^^^^^^^^^^ glances_mqtt | AttributeError: 'Client' object has no attribute '_sock' glances_mqtt | Connection to MQTT server mosquitto:1883 failed with error: Client.init() missing 1 required positional argument: 'callback_api_version'
Expected behavior no error.
Environement (please complete the following information)
To be completed with result of: glances -V
You can also pastebin:
The text was updated successfully, but these errors were encountered:
This is due to paho mqtt changing things for their 2.0.0 release. It has broken all MQTT code that used version 1.x
Relevant github discussion: eclipse/paho.mqtt.python#814
Their reference for migration to the new 2.0.0 API usage: https://eclipse.dev/paho/files/paho.mqtt.python/html/migrations.html
The alternative is to rebuild the docker container and in the optional requirements file specify the specific version of paho-mqtt-1.6.1
Sorry, something went wrong.
I downgraded to 3.4.0.3-full for now
Related to #2700
Dev branch should be ok and manage correctly both MQTT API version 1 and version 2.
No branches or pull requests
Describe the bug
MQTT client initialization failed. Was working until latest update.
To Reproduce
Steps to reproduce the behavior:
glances_mqtt | MQTT client initialization failed
glances_mqtt | Exception ignored in: <function Client.del at 0x7fea5f6316c0>
glances_mqtt | Traceback (most recent call last):
glances_mqtt | File "/venv/lib/python3.11/site-packages/paho/mqtt/client.py", line 874, in del
glances_mqtt | self._reset_sockets()
glances_mqtt | File "/venv/lib/python3.11/site-packages/paho/mqtt/client.py", line 1133, in _reset_sockets
glances_mqtt | self._sock_close()
glances_mqtt | File "/venv/lib/python3.11/site-packages/paho/mqtt/client.py", line 1119, in _sock_close
glances_mqtt | if not self._sock:
glances_mqtt | ^^^^^^^^^^
glances_mqtt | AttributeError: 'Client' object has no attribute '_sock'
glances_mqtt | Connection to MQTT server mosquitto:1883 failed with error: Client.init() missing 1 required positional argument: 'callback_api_version'
Expected behavior
no error.
Environement (please complete the following information)
To be completed with result of: glances -V
Glances v3.4.0.5 with PsUtil v5.9.8
You can also pastebin:
[mqtt]
enable=true
host=mosquitto
port=1883
tls=false
user=****
password=****
topic=glances
topic_structure=per-metric
The text was updated successfully, but these errors were encountered: