Azure / azure-event-hubs-c

C client library for Azure Event Hubs https://azure.microsoft.com/services/event-hubs
Other
7 stars 18 forks source link

Error on nvidia board #4

Closed vishalguptabit closed 7 years ago

vishalguptabit commented 7 years ago

i have created an event hub, sender and receiver. that code is working on ubuntu. but when i am cross compiling this for nvidia board with yocto setup (using for build custom image of linux) , the sender and receiver is not able to communicate with event hub.

Is any packages i have to add ??

mrohera commented 7 years ago

Hello, This could likely be because your target does not have the appropriate TLS certificates installed on your target. On your Ubuntu host, there is a install base of CA root certificates which is why things worked seamlessly.

Could you try installing the appropriate CA certificate(s) on your target and see if this unblocks you for the moment?

Here is how you can do this: 1) From your Ubuntu host, open up a Chrome or Firefox browser and point it to your EventHub instance using https:// 2) Obtain all the certs in the chain and install them on your target. 3) Retry your code.

Additionally, for your reference, enabling log tracing on your EventHub Sender and Receiver could make debugging easier.

vishalguptabit commented 7 years ago

how to enable log tracing ?? i am also not getting the log when i am cross compiling it for nvidia. only info log is coming .....

vishalguptabit commented 7 years ago

There is nothing like eventHub in certificate tab under firefox in ubuntu ??

vishalguptabit commented 7 years ago

i have debugged this code and found xio_open(connection->io, connection_on_io_open_complete, connection, connection_on_bytes_received, connection, connection_on_io_error, connection)

is returning success.

But none of the registered function is getting called on my nvidia board. but on my desktop machine "connection_on_io_open_complete" is getting called .....

mrohera commented 7 years ago

I am not sure if you have retrieved the certificate or not, all that needs to be done here is point your browser to https://.servicebus.windows.net/ (for example). Obtain any certificates here (there should be three) like you would from any other website.

To enable tracing please do this in your code for a EventHub Receiver: 1) eventHubRxHandle = EventHubReceiver_Create(...) 2) EventHubReceiver_SetConnectionTracing(eventHubRxHandle , true); // this enables connection tracing 3) EventHubReceiver_ReceiveFromStartTimestampWithTimeoutAsync or EventHubReceiver_ReceiveFromStartTimestampAsync depending on what you want to do.

Similarly, to To enable tracing please do this in your code for a EventHub Sender: 1) eventHubTxHandle = EventHubClient_CreateFromConnectionString(...) 2) EventHubClient_SetLogTrace(eventHubTxHandle, true); 3) Add your sender code after this.

Please try this out and send us any logs. Additionally as always please remember to NOT paste your connection string details.

Thank you.

vishalguptabit commented 7 years ago

connection Tracing is enabled in my code. but nothing is coming to the terminal. I have captured Wireshark packet for this. And found my client is not able to verify the server certificate, then after some time, "FIN" packet is coming from Server side.

one more question is azure needed "LDAP" support to communicate ??

I am attaching my Wireshark log with this. image

vishalguptabit commented 7 years ago

finally, it works.... certificate issue is resolved. you can close this issue.... :)