Cant connect to Enterprise MQTT broker

Hi, When we try to connect to our Enterprise MQTT broker using MQTT Browser Client using port 8083 we get the error Socket error: Connect failed: AMQJSC0001E Connect timed out.
We are using the Microsoft Edge browser and it works with the your public MQTT Broker on port 8000.
Do you have any idea where we are going wrong? Thanks Ian

Hi @Ian,

before we can help there are some points that need clarification:

  • Enterprise MQTT broker, do you mean the HiveMQ broker?
  • if yes, did you configure a websocket listener?
  • can your broker be reached from the outside?

Little teaser, you could try out the mqtt cli to test a local deployment. Here is an example how to do that:

Websocket configuration in config.xml:

<websocket-listener>
   <port>8000</port>
   <bind-address>0.0.0.0</bind-address>
   <path>/mqtt</path>
</websocket-listener>
  1. Install mqtt cli
  2. Start HiveMQ (with websocket configured, you should see the line INFO - Started Websocket Listener on address 0.0.0.0 and on port 8000 in the logs).
  3. In a terminal/shell use command mqtt sub -t test -ws -p 8000 -d to connect a subscriber over the websocker listener, you should see similar lines:
Client 'UNKNOWN@localhost' sending CONNECT MqttConnect{keepAlive=60, cleanStart=true, sessionExpiryInterval=0}
Client 'UNKNOWN@localhost' received CONNACK MqttConnAck{reasonCode=SUCCESS, sessionPresent=false, assignedClientIdentifier=hmq_KSAHg_3_fc2972c0fbe3937ec7ae5e167d504a8e, restrictions=MqttConnAckRestrictions{receiveMaximum=10, maximumPacketSize=268435460, topicAliasMaximum=5, maximumQos=EXACTLY_ONCE, retainAvailable=true, wildcardSubscriptionAvailable=true, sharedSubscriptionAvailable=true, subscriptionIdentifiersAvailable=true}}
Client 'hmq_KSAHg_3_fc2972c0fbe3937ec7ae5e167d504a8e@localhost' sending SUBSCRIBE MqttSubscribe{subscriptions=[MqttSubscription{topicFilter=test, qos=EXACTLY_ONCE, noLocal=false, retainHandling=SEND, retainAsPublished=false}]}
Client 'hmq_KSAHg_3_fc2972c0fbe3937ec7ae5e167d504a8e@localhost' received SUBACK MqttSubAck{reasonCodes=[GRANTED_QOS_2], packetIdentifier=65526}

Greetings,
Michael from the HiveMQ team

Hi Michael, Just to clarify I think we are on the HiveMQ Cloud.
Just to be sure I’ve included a picture.

So I’m assuming this is you cloud based broker. Does this have a websocket listener?
We are trying to connect to it from an iOS application using CocoaMQTT.

Thanks,

Ian

Hi Ian,

At the moment HiveMQ cloud does not support a websocket listener. This feature is on our future roadmap with no definite timeline as of yet.
Would it be ok for you, if one of our product managers reaches out to you to discuss your specific requirements?

Thanks,
Florian

Hi Florian, do you have any service that we could publish to from iOS and then verify by subscribing from a web interface?

Also with 8883 TLS are certificates need to connect?

Yes please ask one of your product managers to call…

Thanks

Ian

Hi @Ian ,

HiveMQ cloud basic now supports websockets see https://www.hivemq.com/blog/websocket-support-for-hivemq-cloud-basic/.

Kind regards,
Michael