Support Questions

Find answers, ask questions, and share your expertise

Getting ConnectionErrorException while reading device status from IOT Hub

avatar
New Contributor

I am preparing the one topology for reading the status of the device from IOT Hub in azure but after reading the status of the device for one min , i am getting the this exception.

I am setting the 4 number of workers.

java.lang.RuntimeException: com.microsoft.eventhubs.client.EventHubException: org.apache.qpid.amqp_1_0.client.ConnectionErrorException: At least one receiver for the endpoint is created with epoch of'12',and so non-epoch receiver isnot allowed. Either reconnect with a higher epoch,or make sure all epoch receivers are closed or disconnected. TrackingId:f650897e-9cda-4b12-86ed-6e0b08cd4d43_B7, SystemTracker:iothub-ns-trinityhub-71157-43d51dd035:EventHub:trinityhub-operationmonitoring~29490, Timestamp:11/29/20167:25:33 AM Reference:0204db86-8f3f-4365-9b8f-bca97e78b3fa, TrackingId:82395b51-0004-4833-ba2e-b16dc308f5db_B7, SystemTracker:iothub-ns-trinityhub-71157-43d51dd035:eventhub:trinityhub-operationmonitoring~29490|$default, Timestamp:11/29/20167:25:33 AM TrackingId:0d6a85ffa5a0494cbec2b2bc309776e5_G4, SystemTracker:gateway6, Timestamp:11/29/20167:25:34 AM
    at org.apache.storm.eventhubs.spout.EventHubSpout.open(EventHubSpout.java:156)~[storm-eventhubs-0.10.0.jar:0.10.0]
    at backtype.storm.daemon.executor$fn__5624$fn__5639.invoke(executor.clj:564)~[storm-core-0.10.0.jar:0.10.0]
    at backtype.storm.util$async_loop$fn__545.invoke(util.clj:477)[storm-core-0.10.0.jar:0.10.0]
    at clojure.lang.AFn.run(AFn.java:22)[clojure-1.6.0.jar:?]
    at java.lang.Thread.run(Thread.java:745)[?:1.8.0_101]
Caused by: com.microsoft.eventhubs.client.EventHubException: org.apache.qpid.amqp_1_0.client.ConnectionErrorException: At least one receiver for the endpoint is created with epoch of'12',and so non-epoch receiver isnot allowed. Either reconnect with a higher epoch,or make sure all epoch receivers are closed or disconnected. TrackingId:f650897e-9cda-4b12-86ed-6e0b08cd4d43_B7, SystemTracker:iothub-ns-trinityhub-71157-43d51dd035:EventHub:trinityhub-operationmonitoring~29490, Timestamp:11/29/20167:25:33 AM Reference:0204db86-8f3f-4365-9b8f-bca97e78b3fa, TrackingId:82395b51-0004-4833-ba2e-b16dc308f5db_B7, SystemTracker:iothub-ns-trinityhub-71157-43d51dd035:eventhub:trinityhub-operationmonitoring~29490|$default, Timestamp:11/29/20167:25:33 AM TrackingId:0d6a85ffa5a0494cbec2b2bc309776e5_G4, SystemTracker:gateway6, Timestamp:11/29/20167:25:34 AM
    at com.microsoft.eventhubs.client.EventHubReceiver.ensureReceiverCreated(EventHubReceiver.java:112)~[eventhubs-client-0.9.1.jar:?]
    at com.microsoft.eventhubs.client.EventHubReceiver.<init>(EventHubReceiver.java:65)~[eventhubs-client-0.9.1.jar:?]
    at com.microsoft.eventhubs.client.EventHubConsumerGroup.createReceiver(EventHubConsumerGroup.java:48)~[eventhubs-client-0.9.1.jar:?]
    at com.microsoft.eventhubs.client.ResilientEventHubReceiver.initialize(ResilientEventHubReceiver.java:63)~[eventhubs-client-0.9.1.jar:?]
    at org.apache.storm.eventhubs.spout.EventHubReceiverImpl.open(EventHubReceiverImpl.java:74)~[storm-eventhubs-0.10.0.jar:0.10.0]
    at org.apache.storm.eventhubs.spout.SimplePartitionManager.open(SimplePartitionManager.java:77)~[storm-eventhubs-0.10.0.jar:0.10.0]
    at org.apache.storm.eventhubs.spout.EventHubSpout.preparePartitions(EventHubSpout.java:134)~[storm-eventhubs-0.10.0.jar:0.10.0]
    at org.apache.storm.eventhubs.spout.EventHubSpout.open(EventHubSpout.java:153)~[storm-eventhubs-0.10.0.jar:0.10.0]...4 more
Caused by: org.apache.qpid.amqp_1_0.client.ConnectionErrorException: At least one receiver for the endpoint is created with epoch of'12',and so non-epoch receiver isnot allowed. Either reconnect with a higher epoch,or make sure all epoch receivers are closed or disconnected. TrackingId:f650897e-9cda-4b12-86ed-6e0b08cd4d43_B7, SystemTracker:iothub-ns-trinityhub-71157-43d51dd035:EventHub:trinityhub-operationmonitoring~29490, Timestamp:11/29/20167:25:33 AM Reference:0204db86-8f3f-4365-9b8f-bca97e78b3fa, TrackingId:82395b51-0004-4833-ba2e-b16dc308f5db_B7, SystemTracker:iothub-ns-trinityhub-71157-43d51dd035:eventhub:trinityhub-operationmonitoring~29490|$default, Timestamp:11/29/20167:25:33 AM TrackingId:0d6a85ffa5a0494cbec2b2bc309776e5_G4, SystemTracker:gateway6, Timestamp:11/29/20167:25:34 AM
    at org.apache.qpid.amqp_1_0.client.Receiver.<init>(Receiver.java:223)~[qpid-amqp-1-0-client-0.32.jar:0.32]
    at org.apache.qpid.amqp_1_0.client.Session.createReceiver(Session.java:281)~[qpid-amqp-1-0-client-0.32.jar:0.32]
    at org.apache.qpid.amqp_1_0.client.Session.createReceiver(Session.java:260)~[qpid-amqp-1-0-client-0.32.jar:0.32]
    at org.apache.qpid.amqp_1_0.client.Session.createReceiver(Session.java:185)~[qpid-amqp-1-0-client-0.32.jar:0.32]
    at com.microsoft.eventhubs.client.EventHubReceiver.ensureReceiverCreated(EventHubReceiver.java:108)~[eventhubs-client-0.9.1.jar:?]
    at com.microsoft.eventhubs.client.EventHubReceiver.<init>(EventHubReceiver.java:65)~[eventhubs-client-0.9.1.jar:?]
    at com.microsoft.eventhubs.client.EventHubConsumerGroup.createReceiver(EventHubConsumerGroup.java:48)~[eventhubs-client-0.9.1.jar:?]
    at com.microsoft.eventhubs.client.ResilientEventHubReceiver.initialize(ResilientEventHubReceiver.java:63)~[eventhubs-client-0.9.1.jar:?]
    at org.apache.storm.eventhubs.spout.EventHubReceiverImpl.open(EventHubReceiverImpl.java:74)~[storm-eventhubs-0.10.0.jar:0.10.0]
    at org.apache.storm.eventhubs.spout.SimplePartitionManager.open(SimplePartitionManager.java:77)~[storm-eventhubs-0.10.0.jar:0.10.0]
    at org.apache.storm.eventhubs.spout.EventHubSpout.preparePartitions(EventHubSpout.java:134)~[storm-eventhubs-0.10.0.jar:0.10.0]
    at org.apache.storm.eventhubs.spout.EventHubSpout.open(EventHubSpout.java:153)~[storm-eventhubs-0.10.0.jar:0.10.0]...4 more
1 ACCEPTED SOLUTION

avatar
Rising Star

Do you have another application that reads from the Event Hub using EventProcessorHost? EventProcessorHost sets an epoch on the receiver to ensure that only one active reader for a given consumer group and an event hub partition is active. You can try it with a different consumer group.

Other scenario where this could happen is if you turn on checkpointing on EventProcessorHost.

Here is some guidelines from MS how to use the Epoch settings for asynch receivers:

https://blogs.msdn.microsoft.com/gyan/2014/09/02/event-hubs-receiver-epoch/

View solution in original post

1 REPLY 1

avatar
Rising Star

Do you have another application that reads from the Event Hub using EventProcessorHost? EventProcessorHost sets an epoch on the receiver to ensure that only one active reader for a given consumer group and an event hub partition is active. You can try it with a different consumer group.

Other scenario where this could happen is if you turn on checkpointing on EventProcessorHost.

Here is some guidelines from MS how to use the Epoch settings for asynch receivers:

https://blogs.msdn.microsoft.com/gyan/2014/09/02/event-hubs-receiver-epoch/