The Gloo backend tries to resolve each process’ IP address by looking at the host name. This likely resolves to the loopback address for you, looking at the error message.
You can set GLOO_SOCKET_IFNAME to the network interface name you want to use for communication and it will resolve the right IP address.
Also see the torch.distributed documentation 85.