AWS Host ip incorrect in Rancher UI

We just created another Rancher instance and all AWS hosts created through the UI have the private IP. We have another Rancher instance and it works the way we want it to by using the public IP for AWS hosts. The instances are setup the same as far as I can tell. How does the agent determine what IP to use. Agree with @Matt_Welch that SSH’ing into every host to change the IP is not a good option.

Thanks
Mark

If CATTLE_AGENT_IP is not specified then the IP address the registration request from the agent to the server (via host registration URL) is what’s used as the host’s IP. Your registration URL probably resolves to a private IP from the hosts of one installation and public IP in the other.

@vincent I probably should have added we are running HA and the registration URL is pointing to an AWS ELB. Is there a way I can test this? If I ping the registration URL from the host in both installations I get the public IP of the ELB.
Actually after further inspection, the IP isn’t even the private IP of the host. I am not sure what the IP is. Also I created 4 hosts and 3 of them were showing the same IP?

1 Like