BrokenPixel
BrokenPixel

Reputation: 73

Docker rancher/agent won't start

Like the title suggests i can't start the rancher/agent:v0.8.2 to add my host to rancher.

The logs that come from docker when trying to start it:

requests.exceptions.ConnectionError: ('Connection aborted.', error(111, 'Connection refused'))

I have tried clearing my /var/lib/rancher/ folder as suggested by other fixes but didn't work.

I had rancher installed before with the agent and network and worked as expected from the first try. I have deleted them all and now they seem not to work anymore, giving me the error stated above. I had even reinstalled my docker and tried again but still with no luck.

I'm no expert in docker, linux or rancher.

Upvotes: 2

Views: 3526

Answers (2)

mikewilliamson
mikewilliamson

Reputation: 24793

It looks like you are doing the same thing I did: running Rancher and a Rancher agent on the same machine. Take a look at this github issue. The TLDR; Look under Admin > Settings for the Host Registration URL. Make sure it isn't set to localhost.

Rancher Host Registration URL

Upvotes: 1

JJBoooom
JJBoooom

Reputation: 293

First: make sure your rancher server container is running. Second: get the correct command from your rancher server web frontend. For example:

sudo docker run -d --privileged -v /var/run/docker.sock:/var/run/docker.sock rancher/agent:v0.8.2 http://192.168.4.29:8080/v1/scripts/92028FE9D7332113255D:1456113600000:18hrbqQzJD4A3UlKlM2EEbGZ5Y

The 92028FExxx part is generated randomly, So make sure you get the correct one.

Upvotes: 0

Related Questions