thor0215 / hassio-xfinity-usage

Fetch Xfinity Internet Service Usage Data and publish it to Home Assistant sensor
Apache License 2.0
11 stars 3 forks source link

Misconfigured mqtt username/password can cause `Protocol Error` or `Connection Reset by Peer` #35

Closed csobrinho closed 2 months ago

csobrinho commented 2 months ago

When running the script outside of HASSIO (eg: docker/kubernetes), it is possible to define a secret that contains the usernames and password in a way that appends a newline to the end of the string. This will have several side effects:

From my side, I spent days following red herrings on the kubernetes network and routing layer because of the Protocol Error. I tried MQTT, MQTTS, tlsv1.2, tlsv1.3, setting certificates, with and without reverse proxy, websockets, running on the same node, NodePort/ClusterIP, etc.

In sum, when creating a new kubernetes secret, use:

To be honest, this is not a bug in the code but rather an issue that will be logged and potentially crawled by google and github in case someone else is hit by this while using this addon so please feel free to immediately close it!