# Macbook can not add host to server

**URL:** <https://forums.suse.com/t/macbook-can-not-add-host-to-server/5200>\
**Category:** General\
**Created:** [January 14, 2017, 3:22am UTC](https://forums.suse.com/t/macbook-can-not-add-host-to-server/5200 "2017-01-14T03:22:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gaoke\_Heiji](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@Gaoke\_Heiji](https://forums.suse.com/u/Gaoke_Heiji)\
**Post date:** [January 14, 2017, 3:22am UTC](https://forums.suse.com/t/macbook-can-not-add-host-to-server/5200/1 "2017-01-14T03:22:03Z")

</div>

when i add a host to rancher server the agent show error as follow:  
File “/usr/local/lib/python2.7/dist-packages/requests/models.py”, line 381, in prepare\_url  
raise InvalidURL(‘URL has an invalid label.’)  
requests.exceptions.InvalidURL: URL has an invalid label.

i think the rancher server in mac have a bug like this:  
the CATTLE\_URL is not correct.  
#!/bin/sh

export CATTLE\_REGISTRATION\_ACCESS\_KEY="registrationToken"  
export CATTLE\_REGISTRATION\_SECRET\_KEY="D8862A4CB58836C78460:1484326800000:NgSnGrW9cTW6HWQvxjUod81fxVU"  
export CATTLE\_URL="[http://192.168.155.2锛�8080/v1](http://192.168.155.xn--28080-yl0qo990d/v1)"  
export DETECTED\_CATTLE\_AGENT\_IP=“172.17.0.1”

so everybody do you have any solution for rancher right run on the macbook?  
how can config it?  
my rancher’s version is 1.3.1 and docker’s version is 1.12.6 for macoX

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [January 15, 2017, 12:17am UTC](https://forums.suse.com/t/macbook-can-not-add-host-to-server/5200/2 "2017-01-15T00:17:54Z")

</div>

The registration URL contains some sort of unicode character that isn’t a colon (`:`) between the host and port.

Separately, you haven’t gotten far enough to hit problems yet but Rancher does not work well with Docker for Mac (d4m). D4m creates a Linux VM on your Mac and then employs a variety of tricks to make it appear that Docker is actually running locally on your Mac, but these do not fit well with the way networking works in CNI/Rancher.

We suggest regular VMs of some sort for trying Rancher; this is the script I use: [https://github.com/rancher/10acre-ranch/#docker-machine-on-macos](https://github.com/rancher/10acre-ranch/#docker-machine-on-macos)

---

<div class="post-metadata">

**Author:** ![Gaoke\_Heiji](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@Gaoke\_Heiji](https://forums.suse.com/u/Gaoke_Heiji)\
**Post date:** [January 17, 2017, 10:19am UTC](https://forums.suse.com/t/macbook-can-not-add-host-to-server/5200/3 "2017-01-17T10:19:05Z")

</div>

Thank you very much for your reply. i was update my rancher to the latest  
.The bug was fixed. So i can add my macbook host to rancher.
