Have you
definitely linked against the SSL enabled libraries and not
the normal ones? I've seen this error caused by that before.
Al
Hi,
I am trying to connect to Azure IoT Hub
using MQTT with Paho C client library. I have installed Paho
GUI client also in my PC for testing purpose.
Establishing a connection to Azure is
explained in the below link.
https://azure.microsoft.com/en-in/documentation/articles/iot-hub-mqtt-support/
IoT hub connection needs only the below
parameters:
URL
:
ssl://xxxxxxxxx.azure-devices.net:8883
Clean
Session :
Enable
Username
:
{iothubhostname}/{device_id}
(Ex:
xxxxxxxxx.azure-devices.net/device0eac6f2a40ef48c89abc10b9be0b9909)
Password
: SAS Token from Azure
If I try connecting with Paho GUI App,
it’s getting connected to Azure.
But if I try with my C client I’m getting
an error message in the log as below.
20160602 151321.135 getaddrinfo failed
for addr ssl:// xxxxxxxxx.azure-devices.net with rc -2
20160602 151321.135 ssl://
xxxxxxxxx.azure-devices.net is not a valid IP address
20160602 151321.135 getaddrinfo failed
for addr ssl:// xxxxxxxxx.azure-devices.net with rc -2
20160602 151322.857 ssl://
xxxxxxxxx.azure-devices.net is not a valid IP address
Failed to connect, return code -1
Please help me to resolve this issue.
Thanks
& Regards,
Manoj
Srinivasan R.
| Team
Lead | Trinity Mobility Pvt. Ltd. |


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev