Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hi All,
I've been working on getting this Azure IoT Hub Connector started for a while now, and it finally seemed like it was going to work however, when I enter the 'azure-iot.bat' command there's no output in my command prompt but the connection server appears in my ThingWorx platform. While the command prompt is open, the cxserver file grows rapidly. Then, if the command prompt is closed the connection server disappears from ThingWorx.
Is this normal behavior for the connector? Everything I've read says it should start to process data after entering the 'azure-iot.bat' command but I get no output in command prompt. The images contain the different errors I am getting in my cxserver file.
Solved! Go to Solution.
Hi @Laurak9.
To answer your questions, when you execute the azure-iot.bat command, you are in fact starting the connector. This window will need to remain open otherwise the connector shuts down. This is by design. This explains why you only see the connector in ThingWorx when the command prompt window is open.
In regard to the errors from the cxserver.log, are you still seeing the "entity does not exist error" or are you now seeing different errors? If the former, please make sure you have followed the instructions from the ThingWorx Help Center for creating the thing. The connector will not create the thing automatically--you will need to do so.
Regards.
--Sharon
Hi @Laurak9.
The behavior you are seeing is not normal.
We would need the following to troubleshoot:
Regards.
--Sharon
Hi Sharon,
I attached the azure-iot.conf file. When I tried to output azure-iot.bat to a file, there is no output in the file.
Could you give some clarification on what you mean by configuration in Azure?
Hi @Laurak9.
Thank you for your follow-up.
Did you scrub the azure-iot.conf file before sending? It's hard to tell if some of the fields were scrubbed or not.
I am attaching the .conf file from an installation I tested a few months ago. It hasn't been scrubbed since the values are no longer valid. You can use this to see what kind of information is needed. Also, in case you're not aware, this page from the ThingWorx Help Center provides detailed set up instructions including the configuration needed on the Azure side.
Something to note, however, is that the instructions are incorrect regarding the consumerGroup. Don't use $Default. You will need to set up a consumerGroup in Azure specifically for this connection.
Also, in the .conf file, you have some other parms that I'm not familiar with, so I recommend doing a comparison to the .conf I'm providing.
Once you have reviewed the instructions and made the needed updates to your configuration, please let me know if you still have issues.
Regards.
--Sharon
Hi,
I compared the conf files and changed the consumer group, but I'm still getting the same error message.
The link you provided to the installation guide is what I have been using throughout this process to setup the connector, is there something specific in Azure that you think may need to be checked?
What version of Java are you using ? The latest builds of Java 8 are not compatible with the IoT hub JAR used by the ThingWorx Azure IoT Hub Connector
I am using the newest version and those are the errors I'm seeing! I installed 1.8.131 and those errors are gone thanks so much!
But I now have the following in my cxserver file, in image attached, and no output in my command prompt.
Hi @slangley
I am looking through the information you provided, however, is it supposed to be completed before or after the connector is started? If the ThingWorx components need to be completed before, maybe I'm misunderstanding the guide as to what the connector is supposed to do.
These issues are still present:
Again, would you be able to clarify what it is you would like to see from our Azure environment?
I just removed the extra lines I had commented out in the conf file, but I attached it again, along with the cxserver.log file.
Thanks.
Hi @Laurak9.
Within the ThingWorx Help Center documentation, look for Configuring the Azure IoT Hub Connector.
This page shows the information that needs to be captured from the Azure IoT Hub for configuring the Connector. Keep in mind that step 8 regarding use of the $Default consumer group is incorrect. You need to create a consumer group to be used only by the Azure IoT Hub to avoid issues.
Did you complete these steps from the online help:
If so, was your test successful? Assuming it was, proceed to Interacting with Azure Edge Devices through ThingWorx section of the online help for additional details in setting up your environment.
Also, did you scrub the azure-iot config file before sending it? If not, it's missing all the configuration settings from your Azure IoT Hub instance.
Please let me know if you have further questions
Regards.
--Sharon
Okay, you meant the information needed for the configuration file for the connector, not just a configuration within our Azure environment. Thank you for clarifying.
Yes, I've gone through all these steps, they are successful up until starting the connector when I have the following issues:
Yes, I had to scrub the conf file before posting here.
I'm still unsure if the issues I have mentioned are normal when starting the connector as they don't align with what I have read in the documentation.
Hi @Laurak9.
To answer your questions, when you execute the azure-iot.bat command, you are in fact starting the connector. This window will need to remain open otherwise the connector shuts down. This is by design. This explains why you only see the connector in ThingWorx when the command prompt window is open.
In regard to the errors from the cxserver.log, are you still seeing the "entity does not exist error" or are you now seeing different errors? If the former, please make sure you have followed the instructions from the ThingWorx Help Center for creating the thing. The connector will not create the thing automatically--you will need to do so.
Regards.
--Sharon
Hi @Laurak9.
If one of the previous responses helped to resolve your issue, please mark the appropriate one as the Accepted Solution for the benefit of others with the same issue.
Regards.
--Sharon