From 76413739372e07664d4710250c0356e58c53723f Mon Sep 17 00:00:00 2001 From: Amit Thakkar Date: Wed, 14 May 2025 09:43:20 +0200 Subject: [PATCH] fix: use 127.0.0.1 instead of localhost as default HostPort for IPv4 consistency The default HostPort value used when connecting to the Temporal server is set to "localhost:7233". However, "localhost" may resolve to ::1 (IPv6) on some systems, while temporal server start-dev binds only to 127.0.0.1 (IPv4). This mismatch leads me to error: > failed reaching server: context deadline exceeded --- internal/grpc_dialer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/grpc_dialer.go b/internal/grpc_dialer.go index 0877a76d8..a62a02151 100644 --- a/internal/grpc_dialer.go +++ b/internal/grpc_dialer.go @@ -32,7 +32,7 @@ const ( // LocalHostPort is a default host:port for worker and client to connect to. // // Exposed as: [go.temporal.io/sdk/client.DefaultHostPort] - LocalHostPort = "localhost:7233" + LocalHostPort = "127.0.0.1:7233" // defaultServiceConfig is a default gRPC connection service config which enables DNS round-robin between IPs. defaultServiceConfig = `{"loadBalancingConfig": [{"round_robin":{}}]}`