Authorization problem registering a new Host

410 views
Skip to first unread message

Oriol Rius

unread,
Jun 27, 2015, 6:54:55 AM6/27/15
to ranc...@googlegroups.com
Hi, I'm adding a new host in this case this is "localhost" perhaps I have other hosts added. I use the command:


sudo docker run -e CATTLE_AGENT_IP=1.1.1.1 -d --privileged -v /var/run/docker.sock:/var/run/docker.sock rancher/agent:v0.7.9 http://1.1.1.1:18080/v1/scripts/9F5A2AEB88315EAD751B:1435399200000:yFOQgGD6tgvNrJooXZrqDzhuOM






NOTE: 1.1.1.1 substitutes my public IP

and I take a look to agent container logs I can see that:

...
INFO: Starting agent for A42A7DA036C5A70C5AE6
INFO: Access Key: A42A7DA036C5A70C5AE6
INFO: Config URL: http://1.1.1.1:18080/v1
INFO: Storage URL: http://1.1.1.1:18080/v1
INFO: IP: 1.1.1.1
INFO: Port:
INFO: Required Image: rancher/agent:v0.7.9
INFO: Current Image: rancher/agent:v0.7.9
INFO: Using image rancher/agent:v0.7.9
{"id":"c9de6c74-aa72-4240-adb3-3bb4983d997e","type":"error","links":{},"actions":{},"status":401,"code":"Unauthorized","message":"Unauthorized","detail":null}
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now


I don't know how to solve that, any ideas?

Thanks.

Oriol Rius

Bill Maxwell

unread,
Jul 8, 2015, 12:57:33 PM7/8/15
to ranc...@googlegroups.com
Was this host used previously as an agent? If so, there is a container rancher-agent-state container and directory /var/lib/rancher/state that need to be removed before reusing the host.

-Bill
Reply all
Reply to author
Forward
0 new messages