title: local rancher host not visible on gui
body: <p>I am trying to set up a rancher environment for testing purposes on an ubuntu laptop. I am reproducing the steps that worked on another server (this one with Debian) to get it running but I am having some trouble.</p>
  
  <p>The host is an ubuntu 16.0.4. I have installed docker-ce.</p>
  
  <pre><code>sudo docker version
  Client:
   Version:      18.03.1-ce
   API version:  1.37
   Go version:   go1.9.5
   Git commit:   9ee9f40
   Built:        Thu Apr 26 07:17:20 2018
   OS/Arch:      linux/amd64
   Experimental: false
   Orchestrator: swarm
  
  Server:
   Engine:
    Version:      18.03.1-ce
    API version:  1.37 (minimum version 1.12)
    Go version:   go1.9.5
    Git commit:   9ee9f40
    Built:        Thu Apr 26 07:15:30 2018
    OS/Arch:      linux/amd64
    Experimental: false
  </code></pre>
  
  <p>Once running, I have put rancher to work:</p>
  
  <pre><code>sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server:stable
  </code></pre>
  
  <p>Then I have tried to create the Host on the same machine to be able to create the containers:</p>
  
  <pre><code>sudo docker run --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.10 http://192.168.20.213:8080/v1/scripts/adsasdsaddsa:sadsadasd:p7DSjasdasdsadsad
  </code></pre>
  
  <p>The process runs without any error. I can see this in the syslog:</p>
  
  <pre><code>INFO: Running Agent Registration Process, CATTLE_URL=http://192.168.20.213:8080/v1
  INFO: Attempting to connect to: http://192.168.20.213:8080/v1
  INFO: http://192.168.20.213:8080/v1 is accessible
  INFO: Configured Host Registration URL info: CATTLE_URL=http://192.168.20.213:8080/v1 ENV_URL=http://192.168.20.213:8080/v1
  INFO: Inspecting host capabilities
  INFO: Boot2Docker: false
  INFO: Host writable: true
  INFO: Token: xxxxxxxx
  INFO: Running registration
  INFO: Printing Environment
  INFO: ENV: CATTLE_ACCESS_KEY=6902E1686E18CCA097E6
  INFO: ENV: CATTLE_HOME=/var/lib/cattle
  INFO: ENV: CATTLE_REGISTRATION_ACCESS_KEY=registrationToken
  INFO: ENV: CATTLE_REGISTRATION_SECRET_KEY=xxxxxxx
  INFO: ENV: CATTLE_SECRET_KEY=xxxxxxx
  INFO: ENV: CATTLE_URL=http://192.168.20.213:8080/v1
  INFO: ENV: DETECTED_CATTLE_AGENT_IP=172.17.0.1
  INFO: ENV: RANCHER_AGENT_IMAGE=rancher/agent:v1.2.10
  INFO: Launched Rancher Agent: 974e4f7a9ca831e6cb829fa8c80a67049d479fd724090dbeb97602f1b5022d26
  </code></pre>
  
  <p>When I get back to the rancher gui I cannot see the host. <code>docker container ls</code> shows the client container running.</p>
  
  <p>What am I missing?</p>
  
  <p>UPDATE:</p>
  
  <p>As pointed in the response there could be a problem in the IP address used for the mutual reference between server and client. I have deleted the client and server and relaunched it. I am using the 172.17.0.1, that I believe to be docker defined (not my LAN IP for sure). This is what I see in the logs:</p>
  
  <pre><code>May 31 08:40:20 hostname NetworkManager[1262]: &lt;warn&gt;  [1527748820.3585] device (vethcd45753): failed to find device 19 'vethcd45753' with udev
  May 31 08:40:20 hostname NetworkManager[1262]: &lt;info&gt;  [1527748820.3602] manager: (vethcd45753): new Veth device (/org/freedesktop/NetworkManager/Devices/23)
  May 31 08:40:20 hostname systemd-udevd[1773]: Could not generate persistent MAC address for vethcd45753: No such file or directory
  May 31 08:40:20 hostname systemd-udevd[1774]: Could not generate persistent MAC address for veth6f6f5bc: No such file or directory
  May 31 08:40:20 hostname NetworkManager[1262]: &lt;warn&gt;  [1527748820.3616] device (veth6f6f5bc): failed to find device 20 'veth6f6f5bc' with udev
  May 31 08:40:20 hostname kernel: [58919.966247] docker0: port 2(veth6f6f5bc) entered blocking state
  May 31 08:40:20 hostname kernel: [58919.966250] docker0: port 2(veth6f6f5bc) entered disabled state
  May 31 08:40:20 hostname kernel: [58919.966290] device veth6f6f5bc entered promiscuous mode
  May 31 08:40:20 hostname kernel: [58919.967341] IPv6: ADDRCONF(NETDEV_UP): veth6f6f5bc: link is not ready
  May 31 08:40:20 hostname kernel: [58919.967345] docker0: port 2(veth6f6f5bc) entered blocking state
  May 31 08:40:20 hostname kernel: [58919.967348] docker0: port 2(veth6f6f5bc) entered forwarding state
  May 31 08:40:20 hostname kernel: [58919.970459] docker0: port 2(veth6f6f5bc) entered disabled state
  May 31 08:40:20 hostname NetworkManager[1262]: &lt;info&gt;  [1527748820.3650] manager: (veth6f6f5bc): new Veth device (/org/freedesktop/NetworkManager/Devices/24)
  May 31 08:40:20 hostname NetworkManager[1262]: &lt;info&gt;  [1527748820.3808] devices added (path: /sys/devices/virtual/net/vethcd45753, iface: vethcd45753)
  May 31 08:40:20 hostname NetworkManager[1262]: &lt;info&gt;  [1527748820.3808] device added (path: /sys/devices/virtual/net/vethcd45753, iface: vethcd45753): no ifupdown configuration found.
  May 31 08:40:20 hostname NetworkManager[1262]: &lt;info&gt;  [1527748820.3909] devices added (path: /sys/devices/virtual/net/veth6f6f5bc, iface: veth6f6f5bc)
  May 31 08:40:20 hostname NetworkManager[1262]: &lt;info&gt;  [1527748820.3910] device added (path: /sys/devices/virtual/net/veth6f6f5bc, iface: veth6f6f5bc): no ifupdown configuration found.
  May 31 08:40:20 hostname dockerd[1961]: time="2018-05-31T08:40:20.480191097+02:00" level=info msg="No non-localhost DNS nameservers are left in resolv.conf. Using default external servers: [nameserver 8.8.8.8 nameserver 8.8.4.4]"
  May 31 08:40:20 hostname dockerd[1961]: time="2018-05-31T08:40:20.480238871+02:00" level=info msg="IPv6 enabled; Adding default IPv6 external servers: [nameserver 2001:4860:4860::8888 nameserver 2001:4860:4860::8844]"
  May 31 08:40:20 hostname dockerd[1961]: time="2018-05-31T08:40:20+02:00" level=info msg="shim docker-containerd-shim started" address="/containerd-shim/moby/77f35a0fb4e594bdb7005b8b997bdfd83e6a588cf15d7327bd5ea8dd26dfdffd/shim.sock" debug=false module="containerd/tasks" pid=1812
  May 31 08:40:21 hostname kernel: [58920.702259] eth0: renamed from vethcd45753
  May 31 08:40:21 hostname NetworkManager[1262]: &lt;info&gt;  [1527748821.1226] devices removed (path: /sys/devices/virtual/net/vethcd45753, iface: vethcd45753)
  May 31 08:40:21 hostname NetworkManager[1262]: &lt;info&gt;  [1527748821.1235] device (vethcd45753): driver 'veth' does not support carrier detection.
  May 31 08:40:21 hostname NetworkManager[1262]: &lt;info&gt;  [1527748821.1242] device (veth6f6f5bc): link connected
  May 31 08:40:21 hostname kernel: [58920.730229] IPv6: ADDRCONF(NETDEV_CHANGE): veth6f6f5bc: link becomes ready
  May 31 08:40:21 hostname kernel: [58920.730320] docker0: port 2(veth6f6f5bc) entered blocking state
  May 31 08:40:21 hostname kernel: [58920.730325] docker0: port 2(veth6f6f5bc) entered forwarding state
  May 31 08:40:22 hostname NetworkManager[1262]: &lt;warn&gt;  [1527748822.1365] device (veth909de27): failed to find device 21 'veth909de27' with udev
  May 31 08:40:22 hostname kernel: [58921.744449] docker0: port 3(vethb372dab) entered blocking state
  May 31 08:40:22 hostname kernel: [58921.744452] docker0: port 3(vethb372dab) entered disabled state
  May 31 08:40:22 hostname kernel: [58921.744511] device vethb372dab entered promiscuous mode
  May 31 08:40:22 hostname kernel: [58921.744799] IPv6: ADDRCONF(NETDEV_UP): vethb372dab: link is not ready
  May 31 08:40:22 hostname systemd-udevd[1950]: Could not generate persistent MAC address for veth909de27: No such file or directory
  May 31 08:40:22 hostname systemd-udevd[1951]: Could not generate persistent MAC address for vethb372dab: No such file or directory
  May 31 08:40:22 hostname NetworkManager[1262]: &lt;info&gt;  [1527748822.1391] manager: (veth909de27): new Veth device (/org/freedesktop/NetworkManager/Devices/25)
  May 31 08:40:22 hostname NetworkManager[1262]: &lt;warn&gt;  [1527748822.1396] device (vethb372dab): failed to find device 22 'vethb372dab' with udev
  May 31 08:40:22 hostname NetworkManager[1262]: &lt;info&gt;  [1527748822.1414] manager: (vethb372dab): new Veth device (/org/freedesktop/NetworkManager/Devices/26)
  May 31 08:40:22 hostname NetworkManager[1262]: &lt;info&gt;  [1527748822.1650] devices added (path: /sys/devices/virtual/net/veth909de27, iface: veth909de27)
  May 31 08:40:22 hostname NetworkManager[1262]: &lt;info&gt;  [1527748822.1650] device added (path: /sys/devices/virtual/net/veth909de27, iface: veth909de27): no ifupdown configuration found.
  May 31 08:40:22 hostname NetworkManager[1262]: &lt;info&gt;  [1527748822.1653] devices added (path: /sys/devices/virtual/net/vethb372dab, iface: vethb372dab)
  May 31 08:40:22 hostname NetworkManager[1262]: &lt;info&gt;  [1527748822.1654] device added (path: /sys/devices/virtual/net/vethb372dab, iface: vethb372dab): no ifupdown configuration found.
  May 31 08:40:22 hostname avahi-daemon[970]: Joining mDNS multicast group on interface veth6f6f5bc.IPv6 with address fe80::1cb8:cdff:fed8:86d8.
  May 31 08:40:22 hostname avahi-daemon[970]: New relevant interface veth6f6f5bc.IPv6 for mDNS.
  May 31 08:40:22 hostname avahi-daemon[970]: Registering new address record for fe80::1cb8:cdff:fed8:86d8 on veth6f6f5bc.*.
  May 31 08:40:22 hostname dockerd[1961]: time="2018-05-31T08:40:22.269419748+02:00" level=info msg="No non-localhost DNS nameservers are left in resolv.conf. Using default external servers: [nameserver 8.8.8.8 nameserver 8.8.4.4]"
  May 31 08:40:22 hostname dockerd[1961]: time="2018-05-31T08:40:22.269480537+02:00" level=info msg="IPv6 enabled; Adding default IPv6 external servers: [nameserver 2001:4860:4860::8888 nameserver 2001:4860:4860::8844]"
  May 31 08:40:22 hostname dockerd[1961]: time="2018-05-31T08:40:22+02:00" level=info msg="shim docker-containerd-shim started" address="/containerd-shim/moby/9597151e26d89499c735d9bb8beaa3e9e8c13e1a19f4311eb227fc6a7ec6c936/shim.sock" debug=false module="containerd/tasks" pid=1988
  May 31 08:40:22 hostname kernel: [58922.522818] eth0: renamed from veth909de27
  May 31 08:40:22 hostname NetworkManager[1262]: &lt;info&gt;  [1527748822.9346] devices removed (path: /sys/devices/virtual/net/veth909de27, iface: veth909de27)
  May 31 08:40:22 hostname NetworkManager[1262]: &lt;info&gt;  [1527748822.9354] device (veth909de27): driver 'veth' does not support carrier detection.
  May 31 08:40:22 hostname NetworkManager[1262]: &lt;info&gt;  [1527748822.9359] device (vethb372dab): link connected
  May 31 08:40:22 hostname kernel: [58922.542144] IPv6: ADDRCONF(NETDEV_CHANGE): vethb372dab: link becomes ready
  May 31 08:40:22 hostname kernel: [58922.542234] docker0: port 3(vethb372dab) entered blocking state
  May 31 08:40:22 hostname kernel: [58922.542238] docker0: port 3(vethb372dab) entered forwarding state
  May 31 08:40:23 hostname dockerd[1961]: time="2018-05-31T08:40:23+02:00" level=info msg="shim reaped" id=9597151e26d89499c735d9bb8beaa3e9e8c13e1a19f4311eb227fc6a7ec6c936 module="containerd/tasks"
  May 31 08:40:23 hostname dockerd[1961]: time="2018-05-31T08:40:23.295008937+02:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
  May 31 08:40:23 hostname kernel: [58922.988229] docker0: port 3(vethb372dab) entered disabled state
  May 31 08:40:23 hostname kernel: [58922.988464] veth909de27: renamed from eth0
  May 31 08:40:23 hostname NetworkManager[1262]: &lt;info&gt;  [1527748823.4348] device (vethb372dab): link disconnected
  May 31 08:40:23 hostname NetworkManager[1262]: &lt;warn&gt;  [1527748823.4350] device (veth909de27): failed to find device 21 'veth909de27' with udev
  May 31 08:40:23 hostname NetworkManager[1262]: &lt;info&gt;  [1527748823.4376] manager: (veth909de27): new Veth device (/org/freedesktop/NetworkManager/Devices/27)
  May 31 08:40:23 hostname NetworkManager[1262]: &lt;info&gt;  [1527748823.4658] devices added (path: /sys/devices/virtual/net/veth909de27, iface: veth909de27)
  May 31 08:40:23 hostname NetworkManager[1262]: &lt;info&gt;  [1527748823.4658] device added (path: /sys/devices/virtual/net/veth909de27, iface: veth909de27): no ifupdown configuration found.
  May 31 08:40:23 hostname kernel: [58923.177058] docker0: port 3(vethb372dab) entered disabled state
  May 31 08:40:23 hostname kernel: [58923.179239] device vethb372dab left promiscuous mode
  May 31 08:40:23 hostname kernel: [58923.179244] docker0: port 3(vethb372dab) entered disabled state
  May 31 08:40:23 hostname NetworkManager[1262]: &lt;info&gt;  [1527748823.5996] devices removed (path: /sys/devices/virtual/net/veth909de27, iface: veth909de27)
  May 31 08:40:23 hostname NetworkManager[1262]: &lt;info&gt;  [1527748823.6023] device (veth909de27): driver 'veth' does not support carrier detection.
  May 31 08:40:23 hostname NetworkManager[1262]: &lt;info&gt;  [1527748823.6027] device (vethb372dab): driver 'veth' does not support carrier detection.
  May 31 08:40:23 hostname NetworkManager[1262]: &lt;info&gt;  [1527748823.6096] devices removed (path: /sys/devices/virtual/net/vethb372dab, iface: vethb372dab)
  May 31 08:40:28 hostname dockerd[1961]: time="2018-05-31T08:40:28+02:00" level=info msg="shim docker-containerd-shim started" address="/containerd-shim/moby/b3aef1bac28bd6e5241ca1da4acc83ebb4c0c7f7f9498b1e4461cf7957f21a46/shim.sock" debug=false module="containerd/tasks" pid=2217
  May 31 08:40:28 hostname dockerd[1961]: time="2018-05-31T08:40:28+02:00" level=info msg="shim reaped" id=77f35a0fb4e594bdb7005b8b997bdfd83e6a588cf15d7327bd5ea8dd26dfdffd module="containerd/tasks"
  May 31 08:40:28 hostname dockerd[1961]: time="2018-05-31T08:40:28.794313019+02:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
  May 31 08:40:28 hostname kernel: [58928.524471] docker0: port 2(veth6f6f5bc) entered disabled state
  May 31 08:40:28 hostname kernel: [58928.524586] vethcd45753: renamed from eth0
  May 31 08:40:28 hostname NetworkManager[1262]: &lt;info&gt;  [1527748828.9481] device (veth6f6f5bc): link disconnected
  May 31 08:40:28 hostname NetworkManager[1262]: &lt;warn&gt;  [1527748828.9483] device (vethcd45753): failed to find device 19 'vethcd45753' with udev
  May 31 08:40:28 hostname NetworkManager[1262]: &lt;info&gt;  [1527748828.9501] manager: (vethcd45753): new Veth device (/org/freedesktop/NetworkManager/Devices/28)
  May 31 08:40:28 hostname NetworkManager[1262]: &lt;info&gt;  [1527748828.9704] devices added (path: /sys/devices/virtual/net/vethcd45753, iface: vethcd45753)
  May 31 08:40:28 hostname NetworkManager[1262]: &lt;info&gt;  [1527748828.9704] device added (path: /sys/devices/virtual/net/vethcd45753, iface: vethcd45753): no ifupdown configuration found.
  May 31 08:40:29 hostname avahi-daemon[970]: Interface veth6f6f5bc.IPv6 no longer relevant for mDNS.
  May 31 08:40:29 hostname avahi-daemon[970]: Leaving mDNS multicast group on interface veth6f6f5bc.IPv6 with address fe80::1cb8:cdff:fed8:86d8.
  May 31 08:40:29 hostname kernel: [58928.775150] docker0: port 2(veth6f6f5bc) entered disabled state
  May 31 08:40:29 hostname kernel: [58928.778027] device veth6f6f5bc left promiscuous mode
  May 31 08:40:29 hostname kernel: [58928.778032] docker0: port 2(veth6f6f5bc) entered disabled state
  May 31 08:40:29 hostname avahi-daemon[970]: Withdrawing address record for fe80::1cb8:cdff:fed8:86d8 on veth6f6f5bc.
  May 31 08:40:29 hostname NetworkManager[1262]: &lt;info&gt;  [1527748829.1870] devices removed (path: /sys/devices/virtual/net/vethcd45753, iface: vethcd45753)
  May 31 08:40:29 hostname NetworkManager[1262]: &lt;info&gt;  [1527748829.1886] device (vethcd45753): driver 'veth' does not support carrier detection.
  May 31 08:40:29 hostname NetworkManager[1262]: &lt;info&gt;  [1527748829.1893] device (veth6f6f5bc): driver 'veth' does not support carrier detection.
  May 31 08:40:29 hostname NetworkManager[1262]: &lt;info&gt;  [1527748829.1942] devices removed (path: /sys/devices/virtual/net/veth6f6f5bc, iface: veth6f6f5bc)
  May 31 08:40:30 hostname dockerd[1961]: time="2018-05-31T08:40:30+02:00" level=info msg="shim docker-containerd-shim started" address="/containerd-shim/moby/86b6f6cf26ca259d8dd51d95e9f970fd385845c24c78a0a3543164f3a0a3fd2a/shim.sock" debug=false module="containerd/tasks" pid=2375
  May 31 08:40:30 hostname dockerd[1961]: time="2018-05-31T08:40:30+02:00" level=info msg="shim reaped" id=86b6f6cf26ca259d8dd51d95e9f970fd385845c24c78a0a3543164f3a0a3fd2a module="containerd/tasks"
  May 31 08:40:30 hostname dockerd[1961]: time="2018-05-31T08:40:30.787484070+02:00" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
  </code></pre>
  
  <p>I can see some errors related to interface definition and activation but I am not sure if they are relevant.</p>