I found an issue regarding a failure build-up on a Broker - url: Supposed the url contains a domain and a path like that http://www.example.com/mqtt the port is added to the completed end at the moment.
But it should look like this:
Right: http://www.example.com:1883/mqtt
Wrong: http://www.example.com/mqtt:1883 (as it’s now).
Affects on mqtt - in, mqtt - out and mqtt - config nodes.
first thanks for your reply and sorry for my late answer.
Yes it works for the mqtt over tcp with port 1883. The problem we have is that in most cases the port 1883 is blocked by firewalls (same 8883). So we decided to take wss (port 443) to send data to mqtt broker. Any other ideas?
if you were trying to use websockets, you shouldn’t have been using http:// web sockets url begins with ws:// secure websockets with wss:// not http or https
okay. Again.
My problem is that the broker on cumulocity is availabe over websockets with the path /mqtt.
We need to use websockets because the port 443 (TLS) is free on most firewalls.
The mqtt nodes build the url on the wrong way: wss://[tenant].cumulocity.com/mqtt:443
The url should look like wss://[tenant].cumulocity.com:443/mqtt
If you configure the server field as wss://[tenant].cumulocity.com/mqtt then the node will use exactly that as the url passed to the underlying mqtt client - it doesn’t append the port number.
The node only appends the port number if the server field does not start with ws:// or wss:// (more specifically, if it doesn’t contain ://).
I've seen others get tripped up on the MQTT over Web Sockets configuration. How about we add an additional checkbox "MQTT over Web Sockets" following the same pattern as "TLS"? It looks like there is some dead code indicating that this was the intent at some point in time.
See pull request https://github.com/node-red/node-red/pull/1875.