Skip to content

usbrelayd mqtt connection issue #127

@dezanche

Description

@dezanche

Hello,

Decided to get this working again after an update to my OpenMediaVault system broke the daemon.

I'm getting issues connecting to the MQTT broker. I pulled the latest and build the daemon. Verified broker settings in /etc/usbrelayd.conf look correct (same settings I use in MQTT Explorer) and replacing hostname with IP address doesn't change the error:

root@rock64:~/usbrelay# python3 usbrelayd rock64
MQTT Broker:  192.168.0.114
MQTT Client:  MyUSBRelay
Modules Connected:  1
Traceback (most recent call last):
  File "/root/usbrelay/usbrelayd", line 125, in <module>
    client.connect(mqttBroker, port=mqttport) 
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/paho/mqtt/client.py", line 914, in connect
    return self.reconnect()
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/paho/mqtt/client.py", line 1073, in reconnect
    sock.do_handshake()
  File "/usr/lib/python3.11/ssl.py", line 1379, in do_handshake
    self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer

Of course I get this also when I run it as a service. Upgrading to the latest 'paho-mqtt' (using pip) doesn't fix the errors, but they are slightly different. I don't want to experiment too much with upgrades to Python packages because this is an OpenMediaVault system and it tells me that the environment is externally managed so I don't want to break something else.

Any idea how to fix this connection issue?

The python test script works (BTW in the readme the filename of the script should be updated). I don't know what else to try.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions