3

hi I tried to check connection to eventhub using kafkacat in one of my VM in azure I gave the following parametrs(fill my hab name and all):

 kafkacat \
-b <your-hub-name>.servicebus.windows.net:9092 \
-X security.protocol=sasl_ssl \
-X sasl.mechanism=PLAIN \
-X sasl.username='$ConnectionString' \
-X sasl.password='Endpoint=sb://<your-hub-name>.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=<primary-key>' \
-L

but I keep getting: % ERROR: Failed to acquire metadata: Local: Broker transport failure

what can go wrong here ? do I have to create a topic and SAS authentication and take his keys?

NoamiA
  • 521
  • 4
  • 19
  • for -b, you should use [event hub namespace](https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-create#create-an-event-hubs-namespace), not [event hub instance name](https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-create#create-an-event-hub). and for sasl.password, you should follow this [article](https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-get-connection-string#get-connection-string-from-the-portal). – Ivan Glasenberg Jul 07 '20 at 09:21
  • stil not working , I must have an instance for that ? or it probably network issue? – NoamiA Jul 07 '20 at 09:35
  • Please add an eventhub instance. – Ivan Glasenberg Jul 07 '20 at 09:36
  • created should I create a SAS key for it and use this one for connection?, thank you for the help! – NoamiA Jul 07 '20 at 09:55
  • no, you can use the default sas connection string. – Ivan Glasenberg Jul 08 '20 at 00:52
  • I tried this but it didnt worked still same error any suggestion why? – NoamiA Jul 09 '20 at 10:22

1 Answers1

2

The port of eventhub with kafka protocol is 9093.

https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-kafka-connect-tutorial

bootstrap.servers={YOUR.EVENTHUBS.FQDN}:9093 # e.g. namespace.servicebus.windows.net:9093
Mario Petrovic
  • 7,500
  • 14
  • 42
  • 62
SamuelN.
  • 29
  • 3