Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Host info inconsistency #112

Closed
usmanismail opened this issue Feb 22, 2015 · 2 comments
Closed

Host info inconsistency #112

usmanismail opened this issue Feb 22, 2015 · 2 comments

Comments

@usmanismail
Copy link

screen shot 2015-02-22 at 1 01 53 pm

The host info sections on my Rancher server are inconsistent. In the agent on the left he host Info IP matches my eth0 interface.
ifconfig
docker0 Link encap:Ethernet HWaddr 56:84:7A:FE:97:99
inet addr:172.17.42.1 Bcast:0.0.0.0 Mask:255.255.0.0
....

eth0      Link encap:Ethernet  HWaddr 0E:66:02:2F:C8:BF
          inet addr:172.30.0.128  Bcast:172.30.0.255  Mask:255.255.255.0
          inet6 addr: fe80::c66:2ff:fe2f:c8bf/64 Scope:Link

However on the agent on the right it matches my docker0 interface:

ifconfig
docker0   Link encap:Ethernet  HWaddr 56:84:7A:FE:97:99
          inet addr:172.17.42.1  Bcast:0.0.0.0  Mask:255.255.0.0
          ....

eth0      Link encap:Ethernet  HWaddr 0E:AE:72:4C:2C:5A
          inet addr:172.30.0.129  Bcast:172.30.0.255  Mask:255.255.255.0
          inet6 addr: fe80::cae:72ff:fe4c:2c5a/64 Scope:Link

How is the Host IP selected and should it list the docker0 interface or the host internet interface?

@ibuildthecloud
Copy link
Contributor

This is most likely related to your problem with #110 too. When a host registers with the server we try to be smart and detect the IP of the host. Unfortunately we just aren't smart enough. The way we do the detection is by looking at the client IP of the TCP connection. What this means is the specific TCP route taken to get to the server impacts the registered IP. So for the server on the right it appears the TCP connection was local, while the server on the left the TCP traffic was private to your VPC.

In the end, the best thing to do is to try forcing the host IP. You don't need to delete the hosts, just rerun the agent registration docker command and add -e CATTLE_AGENT_IP=<YOURIP> to the docker run arguments. It might take 5 minutes and a couple refreshes, but you should see the UI update with the correct IP.

@usmanismail
Copy link
Author

That seems to have fixed it. I had one agent running on the same node as the Rancher Server. This agent used the docker0 interface to communicate with the Rancher server instead of the actual network interface.

JeffersonBledsoe pushed a commit to JeffersonBledsoe/rancher-cli that referenced this issue Apr 28, 2022
Catalog code refactor and new feats
cmurphy added a commit to cmurphy/rancher that referenced this issue Nov 16, 2022
Ensure cattle token secret has unique name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants