dapr / dotnet-sdk

Dapr SDK for .NET
Apache License 2.0
1.12k stars 340 forks source link

macOS Sonoma 14.4 - SocketException: Can't assign requested address #1257

Closed borbiuk closed 7 months ago

borbiuk commented 8 months ago

Expected Behavior

Successful operation publishing.

Actual Behavior

I'm running ~8 dotnet APIs locally that use Dapr. Sometimes I have problems with the Internet (ERR_ADDRESS_INVALID) when all services are running, besides this, it happens that the publication of Dapr events fails.

OS: macOS Sonoma 14.4 Dapr version: 1.12.3

Exception:

Dapr.DaprException: Publish operation failed: the Dapr endpoint indicated a failure. See InnerException for details.
 ---> Grpc.Core.RpcException: Status(StatusCode="Unavailable", Detail="Error connecting to subchannel.", DebugException="System.Net.Sockets.SocketException: Can't assign requested address")
 ---> System.Net.Sockets.SocketException (49): Can't assign requested address

I will be very grateful for your help. If you need any additional information, please let me know.

Steps to Reproduce the Problem

Run many dotnet APIs that use Dapr Sidecar. Try to publish a new Dapr operation or open some website in your browser.

Release Note

RELEASE NOTE: FIX Bug in runtime

borbiuk commented 8 months ago

I think I solved the problem.

First, you had to set the environment variable DAPR_HOST_IP (see dapr docs).

Then I uninstalled and reinstalled Dapr: dapr uninstall && dapr init

And maybe you will find this article useful: Resolving service invocation timeout errors with Dapr and mDNS on OSX

philliphoff commented 7 months ago

As this refers to runtime behavior and is not specific to the .NET SDK, I'll close this in favor of dapr/dapr#7383