From bb23939b36d0a7d8bd8dd983ada0060a8b42779f Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 2 Apr 2026 18:36:41 -0700 Subject: [PATCH] fix(volume-rust): resolve gRPC bind address from hostname SocketAddr::parse() only accepts numeric IPs, so binding the gRPC server to "localhost:18833" panicked. Use tokio::net::lookup_host() to resolve hostnames before passing to tonic's serve_with_shutdown. --- seaweed-volume/src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/seaweed-volume/src/main.rs b/seaweed-volume/src/main.rs index 427e3b7e5..0b4d24360 100644 --- a/seaweed-volume/src/main.rs +++ b/seaweed-volume/src/main.rs @@ -606,7 +606,11 @@ async fn run( let grpc_tls_acceptor = grpc_tls_acceptor.clone(); let mut shutdown_rx = shutdown_tx.subscribe(); tokio::spawn(async move { - let addr = grpc_addr.parse().expect("Invalid gRPC address"); + let addr = tokio::net::lookup_host(&grpc_addr) + .await + .expect("Failed to resolve gRPC address") + .next() + .expect("No addresses found for gRPC bind address"); let grpc_service = VolumeGrpcService { state: grpc_state.clone(), };