Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Paho C Client ssl connection with Azure

 

 

----- Original message -----
From: "Manoj Srinivasan" <manoj.r@xxxxxxxxxxxxxxxxxxx>
Sent by: paho-dev-bounces@xxxxxxxxxxx
To: <paho-dev@xxxxxxxxxxx>
Cc:
Subject: [paho-dev] Paho C Client ssl connection with Azure
Date: Thu, Jun 2, 2016 1:29 PM
 

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. |

 

cid:image001.jpg@01CE2944.02603EE0

like_us_facebook     follow_us_on_linkedin

 

_______________________________________________
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

 

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

I have masked the actual IoT hub name in my mail. If you are really needed that to solve the issue, I can share the actual host name and credentials.

The host name is correct and I have verified its connectivity by paho GUI client app. Only my C client is not able to connect to the host.

 

Thanks

Manoj.

 

From: paho-dev-bounces@xxxxxxxxxxx [mailto:paho-dev-bounces@xxxxxxxxxxx] On Behalf Of James Sutton1
Sent: 02 June 2016 06:09 PM
To: paho-dev@xxxxxxxxxxx
Subject: Re: [paho-dev] Paho C Client ssl connection with Azure

 

Looks like the host xxxxxxxxx.azure-devices.net doesn't exist. Not sure whether you've obfuscated it from the mailing list or if that's what's in your code, but either way you will want to check that you're using the correct hostname.

Kind regards,

 

James Sutton
Software Engineer - IoT Foundation - MQTT Open Source Projects
Ops Team - Wimbledon Project

 


Phone: 01962 815438 | Extension: x372454
E-mail: james.sutton@xxxxxxxxxx
Personal Website: www.jsutton.co.uk
Find me on:      

IBM

Hursley Park
HursleySO212JN
United Kingdom

 


Back to the top