question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dapr extension pub/sub error: no pubsub is configured

See original GitHub issue

When running Type with the Dapr extension using pub/sub, I got an exception with daprClient.PublishEventAsync("pubsub", "weather", weather):

Message=Publish operation failed: the Dapr endpoint indicated a failure.
Source=Dapr.Client
Inner Exception: RpcException: Status(StatusCode="FailedPrecondition", Detail="no pubsub is configured")

I do not get the exception when running dapr directly: dapr run --app-id publisher -- dotnet run

I can verify in the Components tab of the Dapr Dashboard that pubsub is configured properly.

_Originally posted by @tonysneed in https://github.com/dotnet/tye/issues/984#issuecomment-800631405_

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
tonysneedcommented, Apr 25, 2021

@jkotalik Are you able to reproduce the error using the steps I provided? This is preventing me from using Tye to debug Dapr pub/sub using Visual Studio. Thanks.

1reaction
philliphoffcommented, Oct 21, 2021

@tonysneed I believe this is/was expected behavior. At the time this issue was filed, Tye invoked the sidecar (daprd) directly. daprd would not load any components if no --components-path was specified (which is the case if no components-path exists in the tye.yaml). However, dapr run invokes the sidecar and passes a default --components-path argument (~/.dapr/components) if not given a specific value. Since Dapr initialization typically scaffolds a default pubsub component, your application likely worked, despite actually using a different component configuration than expected (the one in your repo). By adding the components-path to tye.yaml, daprd ends up with a specific --components-path.

In any case, Tye now uses dapr run rather than daprd directly, so applications will use the default Dapr components (just like they would on the command line) unless redirected by a components-path property set in tye.yaml. In other words, if you have specific Dapr component configuration in your repo, you should set components-path in tye.yaml.

Let me know if that makes sense; if so, I’ll close this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot Pub/Sub with the .NET SDK
The pub/sub endpoints are registered with Dapr, but the request is not reaching the desired endpoint. Step 1: Turn up the logs. This...
Read more >
Tutorial: Configure state store and pub/sub message broker
For this tutorial, we describe how to get up and running with Redis. Step 1: Create a Redis store. Dapr can use any...
Read more >
Configure Pub/Sub components with multiple namespaces
In this case, the PubSub component must be provisioned on each namespace. Note. Namespaces are a Dapr concept used for scoping applications and...
Read more >
Publish and subscribe overview
Publish and subscribe (pub/sub) enables microservices to communicate with each other using messages for event-driven architectures.
Read more >
How to: Set up pub/sub namespace consumer groups
Dapr solves multi-tenancy at-scale with its pub/sub namespace consumer groups construct. Without namespace consumer groups. Let's say you have a Kubernetes ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found