Error Connecting using MQTT client


(David G) #1

Hi
I have tried using the HiveMQ & the Eclipse Paho clients to connect to TTN but get an error on both: Failed to connect: AMQJS0007E Socket error:undefined.
I am using the Application ID as username and the Application Access key as password. The host is set to: eu.thethings.network and port is 1883.
Is there something that I should be doing in the TTN console before trying to connect.
Am I correct in assuming that TTN is acting as an MQTT broker?


(Arjan) #2

Any chance you’re trying to use web sockets? TTN’s MQTT broker does not support those. (And brokers that do, probably won’t expose those on port 1883?)


(David G) #3

Yes those clients are using web sockets.
I have seen brokers using 1883 for web sockets. There does not seem to be a port defined for web sockets specifically…https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=mqtt
But thanks for the info. I guess that is why it does not work