Azure / azure-event-hubs-emulator-installer

This repository acts as a central hub for handling issues, collecting feedback, and facilitating discussions related to the Azure Event Hubs emulator.
https://learn.microsoft.com/azure/event-hubs/overview-emulator
MIT License
40 stars 10 forks source link

Connection refused #37

Open alissontenorio opened 2 months ago

alissontenorio commented 2 months ago

Describe the bug Trying to connect to local event hub emulator shows message connection refused

To Reproduce Configured it using python in vs code, the emulator I ran using docker.

Expected behavior Connect sucessfully

Screenshots image

image

image

image

image

Logs

[2024-09-26T21:17:11.087Z] The listener for function 'Functions.eventhub_trigger' was unable to start.
[2024-09-26T21:17:11.087Z] The listener for function 'Functions.eventhub_trigger' was unable to start. System.Private.CoreLib: One or more errors occurred. (Connection refused). System.Private.CoreLib: Connection refused.
[2024-09-26T21:17:24.521Z] EventProcessorHost error (Action='Retrieving list of partition identifiers from a Consumer Client.', HostName='5e9290e9-64b7-45d5-bbc8-df1bf4b75649', PartitionId='').
[2024-09-26T21:17:24.521Z] System.Private.CoreLib: Connection refused.
[2024-09-26T21:17:24.613Z] The listener for function 'Functions.eventhub_trigger' was unable to start.
[2024-09-26T21:17:24.613Z] The listener for function 'Functions.eventhub_trigger' was unable to start. System.Private.CoreLib: One or more errors occurred. (Connection refused). System.Private.CoreLib: Connection refused.
[2024-09-26T21:17:39.686Z] The listener for function 'Functions.eventhub_trigger' was unable to start.
[2024-09-26T21:17:39.686Z] The listener for function 'Functions.eventhub_trigger' was unable to start. System.Private.CoreLib: One or more errors occurred. (Connection refused). System.Private.CoreLib: Connection refused.
2024-09-26 18:04:05 info: a.a.aap[0]
2024-09-26 18:04:05       Emulator Service is Launching On Platform:CBL-Mariner/Linux,X64
2024-09-26 18:04:05 info: a.a.aap[0]
2024-09-26 18:04:05       Instantiating service components
2024-09-26 18:04:06 info: a.a.aap[0]
2024-09-26 18:04:06       Creating namespace, entities and consumer groups
2024-09-26 18:04:06 info: a.a.aaw[0]
2024-09-26 18:04:06       Emulator is launching with config : {"LoggingConfig":{"Type":"File"},"NamespaceConfig":[{"Type":"EventHub","Name":"emulatorns1","Entities":[{"Name":"inbound_eh","PartitionCount":2,"ConsumerGroups":[{"Name":"icg1"},{"Name":"$default"}]},{"Name":"right_eh","PartitionCount":2,"ConsumerGroups":[{"Name":"rcg1"},{"Name":"$default"}]},{"Name":"left_eh","PartitionCount":2,"ConsumerGroups":[{"Name":"lcg1"},{"Name":"$default"}]}]}]}
2024-09-26 18:04:07 info: a.a.aap[0]
2024-09-26 18:04:07       Emulator Service is Successfully Up! ; Use connection string : "Endpoint=sb://localhost;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;"

Desktop:

Image Platform-Architecture Used:

Docker Version:

Arguments && Environment variables to start Emulator:

Emulator Launch Method:

huykon commented 1 month ago

does anyone facing with the issue: Connection string malformed: each part of the connection string must have an=assignment.

bingqiangxiang commented 1 month ago

I also encountered the same issue

Image

Image

krishankumar95 commented 1 month ago

@alissontenorio @bingqiangxiang ; Did we install the Azure Functions extension Microsoft.Azure.WebJobs.Extensions.EventHubs -Version 6.3.3 ; any versions below will not support EH Emulator and result in Connection Refused errors.

krishankumar95 commented 1 month ago

@huykon ; Is this related to Azure Functions + EventHubs ? Can you share the connection sting being used here ?

cawoodm commented 4 days ago

does anyone facing with the issue: Connection string malformed: each part of the connection string must have an=assignment.

Use a proper connection string and not just a FQDN as many examples show.

e.g. this:

const connectionString = "Endpoint=sb://localhost:5672;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;"

and not

const connectionString = "myhost.servicebus.windows.net"