hdinsight storm无法使用示例应用程序读/写eventhubs

z5btuh9x  于 2021-06-21  发布在  Storm
关注(0)|答案(1)|浏览(346)

我试图实现这里给出的示例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

事件作者:

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类。
有人知道如何让它工作吗?

kcrjzv8t

kcrjzv8t1#

回答我自己的问题以防其他人遇到同样的问题。原来storm eventhubs库有个bug。
https://issues.apache.org/jira/browse/storm-2371?jql=project%20=%20storm%20and%20component%20=%20storm-eventhubs%20and%20resolution%20=%20unresolved%20order%20by%20priority%20desc,%20键%20描述

相关问题