Run server on agent on same machine in VM

Hi,

I am trying to run the example from quick start guide(http://docs.rancher.com/rancher/v1.5/en/quick-start-guide/)
I have the rancher server and rancher agent on the same machine. In my case it is virtual Ubuntu 16.04 hosted in windows 10.

I succesfully run rancher server(localhost:8080) but docker container of rancher agent doesnt start and report this error message:

HTTPConnectionPool(host=‘localhost’, port=8080): Max retries exceeded with url: /v1 (Caused by NewConnectionError(’<requests.packages.urllib3.connection.HTTPConnection object at 0x7fc9732e4810>: Failed to establish a new connection: [Errno 111] Connection refused’,))

Is it problem that I run the server and agent in the VM?

Thank you.

Running them on the same machine is fine, but you can’t refer to the server as localhost Because they is the local (agent) container when requested from inside the agent. The registration URL needs to be something that actually gets it to the server container.

1 Like

Great, it works :slight_smile: thank you very much.