Azure IoT Hub Producer

asked 2020-02-21 09:09:51 -0500

Nightwatch gravatar image

updated 2020-03-31 03:46:05 -0500

Hi all!

I'm trying a simple pipeline that writes data to Microsoft Azure IoT Hub destination. I've correctly create IoT Hub, IoT Device on Azure side. I've configured the producer on destination block with IoT Hub Name (blablabla.azure-devices.net), device name and the Shared Access Key but the pipeline goes in error with:

IOT_HUB_02 - Failed to connect : Unable to connect to serviceMqttException : IoT Hub Name

The Azure IoT hub can be reached successfully with other tools/libs (like python scripts).

2020-02-24 09:37:59,907 [user:admin] [pipeline:From_Safety_to_AzureHUB/FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873] [runner:] [thread:webserver-1557] [stage:] INFO  StandaloneAndClusterRunnerProviderImpl - Pipeline execution mode is: STANDALONE
2020-02-24 09:37:59,908 [user:admin] [pipeline:From_Safety_to_AzureHUB/FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873] [runner:] [thread:webserver-1557] [stage:] INFO  StandaloneRunner - Preparing to start pipeline 'FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873::0'
2020-02-24 09:37:59,913 [user:*admin] [pipeline:From_Safety_to_AzureHUB/FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873] [runner:] [thread:runner-pool-2-thread-16] [stage:] INFO  StandaloneRunner - Starting pipeline FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873 0
2020-02-24 09:37:59,967 [user:*admin] [pipeline:From_Safety_to_AzureHUB/FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873] [runner:] [thread:runner-pool-2-thread-16] [stage:] INFO  ProductionPipelineRunner - Adding error listeners0
2020-02-24 09:38:00,007 [user:*admin] [pipeline:From_Safety_to_AzureHUB/FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873] [runner:] [thread:ProductionPipelineRunnable-FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873-From_Safety_to_AzureHUB] [stage:] INFO  Pipeline - Processing lifecycle start event with stage
2020-02-24 09:38:00,009 [user:*admin] [pipeline:From_Safety_to_AzureHUB/FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873] [runner:0] [thread:ProductionPipelineRunnable-FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873-From_Safety_to_AzureHUB] [stage:AzureIoTHubProducer_01] INFO  IotHubConnectionString - IotHubConnectionString object is created successfully for XXXXXXXXX.azure-devices.net.azure-devices.net, method name is <init>
2020-02-24 09:38:00,009 [user:*admin] [pipeline:From_Safety_to_AzureHUB/FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873] [runner:0] [thread:ProductionPipelineRunnable-FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873-From_Safety_to_AzureHUB] [stage:AzureIoTHubProducer_01] INFO  DeviceClientConfig - DeviceClientConfig object is created successfully with IotHubName=XXXXXXXXX.azure-devices.net.azure-devices.net, deviceID=YYYYYYYY , method name is <init>
2020-02-24 09:38:00,009 [user:*admin] [pipeline:From_Safety_to_AzureHUB/FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873] [runner:0] [thread:ProductionPipelineRunnable-FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873-From_Safety_to_AzureHUB] [stage:AzureIoTHubProducer_01] INFO  DeviceIO - DeviceIO object is created successfully, method name is <init>
2020-02-24 09:38:00,009 [user:*admin] [pipeline:From_Safety_to_AzureHUB/FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873] [runner:0] [thread:ProductionPipelineRunnable-FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873-From_Safety_to_AzureHUB] [stage:AzureIoTHubProducer_01] INFO  DeviceClient - DeviceClient object is created successfully, method name is <init>
2020-02-24 09:38:00,228 [user:*admin] [pipeline:From_Safety_to_AzureHUB/FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873] [runner:] [thread:ProductionPipelineRunnable-FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873-From_Safety_to_AzureHUB] [stage:] INFO  Pipeline - Destroying pipeline with reason=FAILURE
2020-02-24 09:38:00,229 [user:*admin] [pipeline:From_Safety_to_AzureHUB/FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873] [runner:0] [thread:ProductionPipelineRunnable-FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873-From_Safety_to_AzureHUB] [stage:AzureIoTHubProducer_01] INFO  DeviceClient - Connection closed with success, method name is closeNow
2020-02-24 09:38:00,229 [user:*admin] [pipeline:From_Safety_to_AzureHUB/FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873] [runner:] [thread:ProductionPipelineRunnable-FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873-From_Safety_to_AzureHUB] [stage:] INFO  Pipeline - Processing lifecycle stop event
2020-02-24 09:38:00,229 [user:*admin] [pipeline:From_Safety_to_AzureHUB/FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873] [runner:] [thread:ProductionPipelineRunnable-FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873-From_Safety_to_AzureHUB] [stage:] INFO  Pipeline - Pipeline finished destroying with final reason=FAILURE
2020-02-24 09:38:00,239 [user:*admin] [pipeline:From_Safety_to_AzureHUB/FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873] [runner:] [thread:ProductionPipelineRunnable-FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873-From_Safety_to_AzureHUB] [stage:] INFO  AbstractRunner - Scheduling retry in '14990' milliseconds
2020-02-24 09:38:00,240 [user:*admin] [pipeline:From_Safety_to_AzureHUB/FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873] [runner:] [thread:ProductionPipelineRunnable-FromSafetytoAzureHUB6fbc186f-75d9-42d7-abc3-506339106873-From_Safety_to_AzureHUB] [stage:] ERROR ProductionPipelineRunnable - An exception occurred while running the pipeline, com.streamsets.datacollector.runner.PipelineRuntimeException: CONTAINER_0800 - Can't start pipeline due 1 validation error(s). First one: IOT_HUB_02 - Failed to connect : Unable to connect to serviceMqttException
com.streamsets.datacollector.runner.PipelineRuntimeException: CONTAINER_0800 - Can't start pipeline due 1 validation error(s). First one: IOT_HUB_02 - Failed to connect : Unable to connect to serviceMqttException
        at com.streamsets ...
(more)
edit retag flag offensive close merge delete

Comments

Could you edit your question to include the full stack trace from sdc.log?

metadaddy gravatar imagemetadaddy ( 2020-02-21 13:42:10 -0500 )edit

question updated!

Nightwatch gravatar imageNightwatch ( 2020-03-31 03:46:56 -0500 )edit