Skip to main content
1-Visitor
September 4, 2020
Solved

Azure IoT hub connector unable to start

  • September 4, 2020
  • 1 reply
  • 2925 views

Hello guys, 

 

I'm having issues when trying to start the Thingworx Azure IoT hub connector, after following the entire guide (Getting an Azure IoT Hub Connector Up and Running) I having the following error:

 

 

 

 

2020-09-04 19:26:57.478 ERROR Error refilling connections on [channel: null, endpoint ws://localhost:8080/Thingworx/WS, uri: ws://localhost:8080/Thingworx/WS] failed : com.thingworx.sdk.api.exception.AuthenticationException: Connection authentication/registration FAILED [channel: NettyBytesChannel [id=ws://localhost:8080/Thingworx/WS-2, closed=false], code: STATUS_UNAUTHORIZED, reason: Error [context: authenticating connection][cause: Missing application key!]]

 

 

 

 

The current setup I am using is the following:

 

Thingworx version:  ThingWorx 8.5.5-b103

Thingworx Azure IoT Hub connector version: Thingworx-Azure-IoT-Hub-Connector-3.0.0.20

Java version: 1.8.0_251

 

I'm installing the connector in the same server that we are using for Thingworx (as a development environment)

 

Attached a zip file with the azure-iot.con file and the log after executing 

 

 

 

azure-iot.bat > azure-iot.log

 

 

 

 

I looking forward to hearing from you guys,

 

Regads,

 

DJ

 

 

Best answer by hchanana

Hi @DJ_8712454 ,

 

Are you using the encrypted configuration file (azure-iot.conf.encrypted) as the same is mentioned in AZURE_IOT_OPTS. If not please update the environment variable properly.

 

Details are provided in step 9 at the url http://support.ptc.com/help/thingworx_scm_azure/r3.0/en/#page/thingworx_scm_azure%2Fazure_connector%2Fc_azure_connector_set_environment_variable.html%23wwID0ER2HM

 

Also the error might be occurring because of Encryption key used by the ThingWorx Platform does not match the Encryption key used by the Azuire IoT Hub Connector

 

Please follow step 7 in the configuration guide to configure encryption/decryption and validate the issue after that.


You can also refer the following article for details: https://www.ptc.com/en/support/article/CS316173

 

Thanks,

Himanshu

 

1 reply

16-Pearl
September 4, 2020

Hi @DJ_8712454 ,

 

The error message says authentication failed due to application key.

Make sure to use the valid application key (also check expiry date on twx composer) and restart connector again as an Administrator.

This should resolve the authentication issue.

 

Thanks,

Himanshu

1-Visitor
September 4, 2020

Hello @hchanana  

 

The application key is valid and here is expricy date.

 

DJ_8712454_0-1599251800233.png

What else I can review?

 

Regards,

 

DJ

16-Pearl
September 4, 2020

Hi @DJ_8712454 

 

Make sure that you had the AZURE_IOT_OPTS environment variable or it might be due to port conflict between iot hub connector port and tomcat port. If possible, change the tomcat port from 8080 to any other value.

 

Also validate all the steps mentioned in the article https://www.ptc.com/en/support/article/CS316161

 

Thanks,

Himanshu