diff --git a/src/postgres-util/src/lib.rs b/src/postgres-util/src/lib.rs index 3835342fdd210..450e91b12ea8f 100644 --- a/src/postgres-util/src/lib.rs +++ b/src/postgres-util/src/lib.rs @@ -46,7 +46,10 @@ pub enum PostgresError { Ssh(#[source] anyhow::Error), /// Error doing io to setup an ssh connection. #[error("error communicating with ssh tunnel: {0}")] - SshIo(#[from] std::io::Error), + SshIo(std::io::Error), + /// Error doing io to setup a connection. + #[error("IO error in connection: {0}")] + Io(#[from] std::io::Error), /// A postgres error. #[error(transparent)] Postgres(#[from] tokio_postgres::Error), diff --git a/src/postgres-util/src/tunnel.rs b/src/postgres-util/src/tunnel.rs index 42f1aa81ab51d..d5fca35d7268e 100644 --- a/src/postgres-util/src/tunnel.rs +++ b/src/postgres-util/src/tunnel.rs @@ -303,7 +303,9 @@ impl Config { // the singular host in place. let privatelink_host = mz_cloud_resources::vpc_endpoint_name(*connection_id); - let privatelink_addrs = tokio::net::lookup_host(privatelink_host).await?; + // `net::lookup_host` requires a port to be specified, but the port has no effect + // on the lookup so use a dummy one + let privatelink_addrs = tokio::net::lookup_host((privatelink_host, 11111)).await?; // Override the actual IPs to connect to for the TCP connection, leaving the original host in-place // for TLS verification