Unable to add second host again

Hi, I’m new to Rancher and RancherOS and have been having some problems getting my servers set up properly. I have 2 home servers, one an existing server with Ubuntu 14.04 w/Docker, and the other a new server that I just put RancherOS on. The first time I installed RancherOS and Rancher onto the same physical system things seemed to go alright until I realized that the IP address of the new system did not match my 192.168.1.xx network and I was unable to access any deployed services.

I removed the Ubuntu server from the hosts in Rancher (purging as well) and killed the Rancher-related Docker containers on that host. On the new server, I deleted all the partitions on the system and re-installed RancherOS. On that server, I re-added the rancher-server container and re-added the host, this time launching the rancher-agent container with the -e CATTLE_AGENT_IP=192.168.1.11 to the docker run command. Now it shows up in the Infrastructure > Hosts panel with the correct IP for the host (192.168.1.11).

However, when I try to re-add the Ubuntu server host (192.168.1.10) to Rancher, it doesn’t show up and when I run a docker logs on the rancher-agent container, it just repeatedly says:
INFO: Starting agent for 0F82E3E0342D333F4D3C

I am running RancherOS 0.4.3 and Rancher 0.63.1. Anything I’m doing incorrectly?

PS. I also tried removing the /var/lib/rancher directory from my Ubuntu host.

Figured out my problem by doing the following:

  • Stopped and removed all Rancher containers on both hosts
  • Deleted /var/lib/rancher on the Ubuntu server and /var/lib/rancher/state directory on the RancherOS server.
  • Reboot both servers

Then, on the RancherOS server, I started the rancher-server container. When Rancher started, I added the RancherOS host, providing the -e CATTLE_AGENT_IP value with the IP of the RancherOS host. After that added, I added the Ubuntu host.