Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Paho » mqtts protocol?(Connection issues using mqtts protocol)
mqtts protocol? [message #1773176] Fri, 22 September 2017 18:17 Go to next message
Chuck Williams is currently offline Chuck WilliamsFriend
Messages: 2
Registered: August 2017
Junior Member
I have the following connection string from one of my development portals:


I'm trying to use the Sample class in the Java Paho client and I'm getting the following exception:

Exception in thread "main" java.lang.IllegalArgumentException: mqtts://
at org.eclipse.paho.client.mqttv3.MqttConnectOptions.validateURI(
at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(
at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(
at org.eclipse.paho.client.mqttv3.MqttClient.<init>(
at com.rfidcollect.iot.Sample.<init>(
at com.rfidcollect.iot.Sample.main(

I've already modified the sample code to not use tcp: as the protocol. Here are the arguments to the execution of the Sample class:

-a subscribe -t 0514da43-afd0-482b-ba9e-ab61772d3fb3/atom/6081f9fffe000957/rx/# -b mqtts:// -p 28103

Thank you in advance,
Re: mqtts protocol? [message #1773239 is a reply to message #1773176] Mon, 25 September 2017 09:27 Go to previous message
James Sutton is currently offline James SuttonFriend
Messages: 71
Registered: July 2015
Hi Chuck,

mqtt or mqtts isn't an official uri scheme ( so that would be unlikely to work.

If you check the code where the exception was thrown, you'll see that only tcp, ws, wss, ssl and local are valid and accepted URI schemes. (

I imagine that you've got mqtts instead of mqtt to indicate that it's a secure connection? If that's the case, you'll want to use the ssl uri scheme and use the SSL arguments (v / k / w / r)
Previous Topic:Build paho c for iOS
Next Topic:Wondering if this is normal behavior
Goto Forum:

Current Time: Thu Nov 15 16:22:30 GMT 2018

Powered by FUDForum. Page generated in 0.02104 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top