I set up Rancher on Debian8 following the quick start guide. Added another debian8 box as the first host all OK. I then rebooted that 1st host and now under hosts it says “disconnected” and I cant get it to re-connect. How do I get it to reconnect?
I checked on the host, the agent appears to be running OK. There are no firewalls in the way.
Yeah, the only time I’ve been able to install rancher properly is when it’s running on RancherOS. I always got random network issues when I tried setting it up manually.
I set my networking to use dhcp, and I haven’t had an issue with it yet. Use either sudo ros config set network.interfaces.eth0.dhcp true, or modify your /var/lib/rancher/conf/cloud-config.d/user_config.yml to have a reasonable base network config like this:
rancher:
...
network:
dns:
nameservers:
- # your 1st dns server ip
- # your 2nd dns server ip
search:
- example.local # only if you have a local domain
http_proxy: # if you're using an http proxy
https_proxy: # same for https
no_proxy: # etc.
interfaces:
eth0: # Can also use eth* I think
dhcp: true
gateway: # network gateway ip
If modifying that file, make sure to double-check /var/lib/rancher/conf/cloud-config.yml doesn’t interfere, and after any changes, run sudo ros config validate -i /var/lib/rancher/conf/cloud-config.yml (same for the other file).
Right, the docker0 ifconfig entry is immaterial in this case I think. You’re not running multiple daemons on the same machine, are you? If not, have you run the rancher-agent on all the target daemons?
Hmm. That should have worked.
Try it without specifying the ip manually, then check the rancher-agent container logs to see what might be the issue. When I was having trouble, it was because the agent was mysteriously unable to connect to the master.
Ah, also, if you’re not installing Rancher on RancherOS, you’re actually on the wrong subforum. This is for RancherOS issues, not Rancher issues. Easy mistake to make.
In the hosts section should there be a “box” for each host? What I am seeing is there is one box and the name of the host box keeps flicking between host1 and host2
Since the FQDN is flicking back and forth I suspect its not a good idea to try re-adding. Either I have done something wrong or I have hit a bug but a repeatable one.