Dapr unable to connect to Azure Service Bus Emulator
Expected Behavior
Dapr's Azure Service Bus binding should be able to connect to the ASB emulator.
Actual Behavior
Dapr reports that it is unable to subscribe to the ASB emulator topics.
WARN[0031] failed to subscribe to topics: failed to subscribe to topic topic-one: could not get topic topic-one: Get "https://localhost:5672/topic-one?api-version=2021-05": EOF failed to subscribe to topic topic-two: could not get topic topic-two: Get "https://localhost:5672/topic-two?api-version=2021-05": EOF
Steps to Reproduce the Problem
- Setup ASB emulator using docker
- Configure Dapr to connect to the emulator
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: example-pub-sub
spec:
type: pubsub.azure.servicebus.topics
version: v1
metadata:
- name: connectionString
value: "Endpoint=sb://localhost:5672;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;"
Dapr runtime version: 1.14.4
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.
I'm getting this issue as well, could it be due to the emulator using a self-signed certificate?
It looks like there's special handling for the emulator in the Azure SDK for Go that was added last year. I'm going to assume that DAPR is using an SDK older than that.
https://github.com/Azure/azure-sdk-for-go/blame/674ac20511182bcf01023ec918d2c7aa88be44d5/sdk/messaging/azservicebus/internal/conn/conn.go#L102
/cc @yaron2
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.
bump
/assign
Hi all — I spent some time digging into this issue and wanted to share what I found:
The root cause of the EOF errors is that Dapr tries to perform entity management (like checking or creating topics/subscriptions) using the azservicebus/admin SDK, which makes HTTPS requests to the Service Bus namespace (e.g. https://localhost:5672/...). When using the Azure Service Bus emulator, this fails because the emulator only exposes AMQP (port 5672) and does not support the Azure Resource Manager (HTTPS) APIs.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.
I'm guessing that this is never going to get sorted?
I’m now going to start working on this since I was off my computer for quite a while.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.