Issue with Establishing MQTT Connections on Ports 443, 55443 for Solace Broker (WSS, TCPS)
I am currently working on integrating an MQTT client with the Solace Broker, using the CocoaMQTT library for iOS. While I am able to successfully establish connections, publish, and subscribe to topics using port 8883, I am facing issues with ports 443, 55443 (which I am attempting to use for WSS and TCPS protocols).
What I’ve tried:
- Ports:
- Port 8883: Successfully connects and works for MQTT over SSL.
- vbnetCopyCocoaMQTT(debug): socket disconnectedDisconnected with error: Socket closed by remote peer
- I have attempted this with both CocoaMQTT and MQTT5 libraries, but the issue persists.
Specific Questions:
- Is there any specific configuration needed on the Solace dashboard or Solace broker for using ports 443 (WSS) or 55443 (TCPS)?
Could there be any protocol-specific configuration or adjustments I need to make on the Solace Cloud dashboardto support these ports for secure WebSocket (WSS) and MQTT over TCPS? - Solace Documentation or Guidelines:
Is there any documentation available for Solace that outlines the necessary configurations for different protocols(WSS, MQTT over TCP, etc.) or specific client-side configurations for these ports? - TLS/SSL Configuration:
For the secure connections (TCPS, WSS), I have made attempts to configure the MQTT client with SSL settings, but still encounter issues. Could there be any SSL-related configuration settings on the Solace platform that I am missing? For example:- Does Solace require a specific SSL/TLS certificate configuration for these ports?
- Should I disable certain SSL validation parameters when using these ports, especially if I’m testing?
- Error Troubleshooting:
What other factors could be causing theSocket closed by remote peer
error? Is there any way to get more detailed logs from Solace or on the client-side to troubleshoot this further?
Setup Information:
- Solace Cloud Broker: [Solace Cloud Broker URL]
- MQTT Client: CocoaMQTT / MQTT5
- Port Used:
- 8883 (works fine for SSL/MQTT)
- 443 (for WSS)
- 55443 (for TCPS)
Conclusion:
I would appreciate any insight or pointers towards troubleshooting this issue, especially regarding configuration requirements on Solace for different MQTT protocols (WSS, TCPS) and SSL/TLS settings. If there are any additional considerations for using these ports, I would be grateful for your suggestions.
Thank you in advance for your help!
Answers
-
You are using the Solace Cloud broker, so you should be able to find the MQTT SSL and MQTT WSS connection string under
Mission Control > Broker Service Instance > Connect > Eclipse Paho Java Client
The MQTT SSL you should use the port 8883, and for WSS, the port should be 8443
ssl://<solace-cloud-broker-url>:8883
wss://<solace-cloud-broker-url>:8443
Here is some articles, you may find useful:
https://github.com/SolaceLabs/covid19-stream-processors?tab=readme-ov-file#1-connection-information
0