Trying to start first container gets Unauthorized Get


I have just set up my first rancher with a master and 3 separate hosts.
All running centos7 and latest docker 1.11
Now im trying to start my first simple container with the Add Container button
I get this error in the logs on the hosts where ist trying to start it:

2016-05-06 12:08:53,368 ERROR agent [140664992217840] [] Error in request : f0e00130-8147-48d8-be89-35aa033def05 
Traceback (most recent call last):
  File "/var/lib/cattle/pyagent/cattle/agent/", line 95, in _worker_main
    resp = agent.execute(req)
  File "/var/lib/cattle/pyagent/cattle/agent/", line 15, in execute
    return self._router.route(req)
  File "/var/lib/cattle/pyagent/cattle/plugins/core/", line 13, in route
    resp = handler.execute(req)
  File "/var/lib/cattle/pyagent/cattle/agent/", line 34, in execute
    return method(req=req, **
  File "/var/lib/cattle/pyagent/cattle/storage/", line 27, in image_activate
    action=lambda: self._do_image_activate(image, storage_pool,
  File "/var/lib/cattle/pyagent/cattle/agent/", line 72, in _do
  File "/var/lib/cattle/pyagent/cattle/storage/", line 28, in <lambda>
  File "/var/lib/cattle/pyagent/cattle/plugins/docker/", line 151, in _do_image_activate
  File "/var/lib/cattle/pyagent/dist/docker/api/", line 200, in pull
  File "/var/lib/cattle/pyagent/dist/docker/", line 146, in _raise_for_status
    raise errors.APIError(e, response, explanation=explanation)
APIError: 401 Client Error: Unauthorized ("Get unauthorized: incorrect username or password")

There are no problems starting something like “docker run -it --name=second_container ubuntu:14.04.2” on the host. That container shows up on the host in the rancher master gui…

Cant help feeling Im missing something crucial but I have followed the documentation closely…

Did you set up a Docker registry in the Registries section?

It sounds like there is a docker username/password located under Infrastructure/Registries. Even if you don’t reference the username/password, it will use those credentials when pulling images.


Thanks for the quick answer. Yes I had configured my private DockerHub account on the Registry section.
Everything started working as soon as I removed the registry configuration. Thanks!

One question remains as to why? Why cant I have my own private registry connected to get access my images and install your haproxy service for example, or as in this case just a simple ubuntu image?
i could imagine that there are some security concerns perhaps?
(I was thinking it would work by downloading the rancher/agent-instance:v0.8.1 and push it to my own registry? But then it wont be accessible under that name…)

You should be able to still have your Docker registry credentials and pull any public image. But the error you showed was showing that there was a typo in your credentials (incorrect username or password).

We have some open enhancements around being able to validate credentials.


I do beg your forgiveness for taking up your time with a simple typo… red face of embarrassment

how do I set the username and password in infrastructure/registries section