[solved] Error adding host: ERROR: Invalid CATTLE_AGENT_IP (http://192.168.100.100:8080)

Hi!
I’m running RancherOS in KVM guest and successfully installed Rancher.
However, when I try to add a host, that is the same KVM guest where RancherOS is installed, I get this error:

[rancher@vm100-rancher ~]$ sudo docker run -e CATTLE_AGENT_IP=“192.168.100.100:8080” -e CATTLE_HOST_LABELS=‘hostname=vm100-rancher’ --rm --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.2.9 http://192.168.100.100:8080/v1/scripts/CF81E961CDB39F5D0603:1514678400000:4vpFTDW0RHBX9K4AkOs2WWdvaS4
Unable to find image ‘rancher/agent:v1.2.9’ locally
v1.2.9: Pulling from rancher/agent
b3e1c725a85f: Pull complete
6a710864a9fc: Pull complete
d0ac3b234321: Pull complete
87f567b5cf58: Pull complete
063e24b217c4: Pull complete
d0a3f58caef0: Pull complete
16914729cfd3: Pull complete
dc5c21984c5b: Pull complete
d7e8f9784b20: Pull complete
Digest: sha256:c21255ac4d94ffbc7b523f870f2aea5189b68fa3d642800adb4774aab4748e66
Status: Downloaded newer image for rancher/agent:v1.2.9
ERROR: Invalid CATTLE_AGENT_IP (192.168.100.100:8080)

THX

CATTLE_AGENT_IP is the IP that has to be used when registering the agent. This cannot contain a port definition. Changing it to -e CATTLE_AGENT_IP=“192.168.100.100” should help you out.