Check if the application needs to be running in a specific subnet of a vnetĬonfirm that your application is running in a virtual network subnet that has access to the namespace. See Virtual network service tags and search for EventHub. If your application is running inside a subnet and there is an associated network security group, confirm whether the internet outbound is allowed or EventHub service tag is allowed. Verify that EventHub service tag is allowed in your network security groups Run nslookup for each one with suffixes s1, s2, and s3 to get the IP addresses of all three instances running in three availability zones,Ĭurrently, it's not possible to determine the source IP of an individual message or event. Note down the name in the non-authoritative answer section, which is in one of the following formats: If you use the zone redundancy for your namespace, you need to do a few extra steps:įirst, you run nslookup on the namespace. Note down the IP address returned in Non-authoritative answer. Run the following command from a command prompt: nslookup. To find the right IP addresses to allow for your connections, follow these steps: For IP addresses used by Azure Event Hubs: see Azure IP Ranges and Service Tags - Public Cloud.Īlso, verify that the IP address for your namespace is allowed. Verify that the traffic is allowed on IP addresses used by Event Hubs. When you are working with Azure, sometimes you have to allow specific IP address ranges or URLs in your corporate firewall or proxy to access all Azure services you are using or trying to use. The following options allow selecting the plain AMQP or AMQP WebSockets mode: LanguageĮventHubConnectionOptions.TransportType property with EventHubsTransportType.AmqpTcp or EventHubsTransportType.AmqpWebSocketsĬom.transporttype with AmqpTransportType.AMQP or AmqpTransportType.AMQP_WEB_SOCKETSĮventHubConsumerClientOptions has a webSocketOptions property.Įansport_type with TransportType.Amqp or TransportType.AmqpOverWebSocket If this mode is selected, TCP port 443 is sufficient for communication. This option has higher initial connection latency because of extra handshake round trips and slightly more overhead as tradeoff for sharing the HTTPS port. The AMQP-over-WebSockets protocol option runs over port TCP 443 just like the HTTP API, but is otherwise functionally identical with plain AMQP. The official Azure SDKs generally use the AMQP protocol for sending and receiving events from Event Hubs. The HTTPS port is required for outbound communication also when AMQP is used over port 5671, because several management operations performed by the client SDKs and the acquisition of tokens from Azure Active Directory (when used) run over HTTPS. See Use Event Hubs from Kafka applications This port is used for the HTTP/REST API and for AMQP-over-WebSockets. See the following table for the outbound ports you need to open to use these protocols to communicate with Azure Event Hubs. Hypertext Transfer Protocol 1.1 with TLS (HTTPS).Advanced Message Queuing Protocol 1.0 (AMQP).You can use the following protocols with Azure Event Hubs to send and receive events: What ports do I need to open on the firewall? For more information, see Send and receive messages with Kafka in Event Hubs. See Get connection string to get the connection string using the Azure portal, CLI, or PowerShell.įor Kafka clients, verify that nfig or nfig files are configured properly. Verify that the connection string you are using is correct. Check if there is a service outageĬheck for the Azure Event Hubs service outage on the Azure service status site. If the application isn't able to connect to the event hub at all, follow steps from this section to troubleshoot the issue. Troubleshoot permanent connectivity issues This article provides tips for troubleshooting connectivity issues with Azure Event Hubs. For transient issues, upgrading to latest version of the SDK, running commands to check dropped packets, and obtaining network traces may help with troubleshooting the issues. If the issue happens all the time (permanent), you may want to check the connection string, your organization's firewall settings, IP firewall settings, network security settings (service endpoints, private endpoints, etc.), and more.
The connectivity issues that you experience may be permanent or transient. There are various reasons for client applications not able to connect to an event hub.