Thank you, mrshenli. I tried setting CLOO_SOCKET_IFNAME to eth0 and MASTER_ADDR to inet6 string, it returned a connection error(Timeout). Then I found gn0 might be an Infiniband Interface, so I set CLOO_SOCKET_IFNAME to gn0 and MASTER_ADDR to ipv4 address.
From the code, I think the MASTER_ADDR can be set to ipv6, thanks for your help!