Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Quote:
when I'm running the Dapr application I'm getting the following error

dapr run --app-id testservice --app-port 5001 --dapr-http-port 50001 dotnet run


msg=" error occurred while beginning pubsub pubsub: the server closed connection before returning the first response byte. Make sure the server returns 'Connection: close' response header before closing the connection"



Please help me to resolve the issue.

What I have tried:

I have cleared Uninstall and install again and tried several ways
Posted
Updated 30-Dec-22 17:48pm

1 solution

As mentioned here: Dapr pubsub using rabbitmq · Issue #659 · dapr/dotnet-sdk · GitHub[^]

If you leave the Configure for HTTPS checkbox checked when you created the Project, the generated ASP.NET Core API project includes middleware to redirect client requests to the HTTPS endpoint.
This breaks communication between the Dapr sidecar and your application unless you explicitly configure the use of HTTPS when running your Dapr application.
To enable the Dapr sidecar to communicate over HTTPS, include the --app-ssl flag in the Dapr command to start the application.


Try adding --app-ssl flag and see.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900