我正在尝试实现给定here的示例EventHub应用程序,但它给了我错误。我遵循了文档中给出的完全相同的步骤。我在HDInsight 3.5,Storm 1.0.1.2.5.4.0-121
这是EventHubReader的一个,如Storm UI所示。
com.microsoft.eventhubs.client.EventHubException: org.apache.qpid.amqp_1_0.client.ConnectionErrorException: An AMQP error occurred (condition='amqp:unauthorized-access'). TrackingId:53ca4652535f423e5f0049dc08ef9_G22, SystemTracker:gateway2, Timestamp:2/28/2017 7:51:21 AM
at com.microsoft.eventhubs.client.EventHubReceiver.ensureReceiverCreated(EventHubReceiver.java:112) ~[stormjar.jar:?]
at com.microsoft.eventhubs.client.EventHubReceiver.<init>(EventHubReceiver.java:65) ~[stormjar.jar:?]
at com.microsoft.eventhubs.client.EventHubConsumerGroup.createReceiver(EventHubConsumerGroup.java:56) ~[stormjar.jar:?]
at com.microsoft.eventhubs.client.ResilientEventHubReceiver.initialize(ResilientEventHubReceiver.java:63) ~[stormjar.jar:?]
at org.apache.storm.eventhubs.spout.EventHubReceiverImpl.open(EventHubReceiverImpl.java:74) ~[stormjar.jar:?]
...
AMQP error occurred (condition='amqp:unauthorized-access'). TrackingId:53ca4652535f423e825f0049dc08eff9_G22, SystemTracker:gateway2, Timestamp:2/28/2017 7:51:21 AM
at org.apache.qpid.amqp_1_0.client.Receiver.<init>(Receiver.java:223) ~[stormjar.jar:?]
at org.apache.qpid.amqp_1_0.client.Session.createReceiver(Session.java:281) ~[stormjar.jar:?] ... 11 more
EventHubWriter:
com.microsoft.eventhubs.client.EventHubException: An error occurred while sending data.
at com.microsoft.eventhubs.client.EventHubSender.sendCore(EventHubSender.java:93) ~[stormjar.jar:?]
Caused by: org.apache.qpid.amqp_1_0.client.Sender$SenderCreationException: Peer did not create remote endpoint for link, target: my-event-hub
at org.apache.qpid.amqp_1_0.client.Sender.<init>(Sender.java:191) ~[stormjar.jar:?]
的pom.xml
<properties>
<storm.version>1.0.1</storm.version>
<hadoop.version>2.7.3</hadoop.version>
</properties>
...
<dependency>
<groupId>com.microsoft</groupId>
<artifactId>eventhubs</artifactId>
<version>1.0.2</version>
</dependency>
我在EventHubs.properties文件中确保了eventhub连接命名空间和策略键是正确的。我还打开了.jar工件并确保包含了EventHub类。
有谁知道如何让它发挥作用?
答案 0 :(得分:0)