From ec289420d36b98aa96e51053ec276e26f5148df1 Mon Sep 17 00:00:00 2001 From: Johan Brandhorst-Satzkorn Date: Wed, 22 May 2024 14:17:30 -0700 Subject: [PATCH] clientagentcmd: use "localhost" to call client agent (#4816) The client agent serves on "localhost:9300" by default. It appears on some systems this resolves to ::1:9300 and on some systems 127.0.0.1:9300. We should use the same address on the client as the server to avoid any incompatibilities between systems. --- internal/cmd/commands/clientagentcmd/clientagentcmd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/cmd/commands/clientagentcmd/clientagentcmd.go b/internal/cmd/commands/clientagentcmd/clientagentcmd.go index e0eff3705c..a014cc96e1 100644 --- a/internal/cmd/commands/clientagentcmd/clientagentcmd.go +++ b/internal/cmd/commands/clientagentcmd/clientagentcmd.go @@ -68,5 +68,5 @@ func (c *ClientAgentCommand) Run(args []string) int { // clientAgentUrl constructs the full URL for a client agent request given a port and path. func clientAgentUrl(port uint, path string) string { - return fmt.Sprintf("http://127.0.0.1:%d/%s", port, path) + return fmt.Sprintf("http://localhost:%d/%s", port, path) }