Trying to start first container gets Unauthorized Get https://registry-1.docker.io/

Hi,

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] [event.py:112] Error in request : f0e00130-8147-48d8-be89-35aa033def05 
Traceback (most recent call last):
  File "/var/lib/cattle/pyagent/cattle/agent/event.py", line 95, in _worker_main
    resp = agent.execute(req)
  File "/var/lib/cattle/pyagent/cattle/agent/__init__.py", line 15, in execute
    return self._router.route(req)
  File "/var/lib/cattle/pyagent/cattle/plugins/core/event_router.py", line 13, in route
    resp = handler.execute(req)
  File "/var/lib/cattle/pyagent/cattle/agent/handler.py", line 34, in execute
    return method(req=req, **req.data.__dict__)
  File "/var/lib/cattle/pyagent/cattle/storage/__init__.py", line 27, in image_activate
    action=lambda: self._do_image_activate(image, storage_pool,
  File "/var/lib/cattle/pyagent/cattle/agent/handler.py", line 72, in _do
    action()
  File "/var/lib/cattle/pyagent/cattle/storage/__init__.py", line 28, in <lambda>
    progress)
  File "/var/lib/cattle/pyagent/cattle/plugins/docker/storage.py", line 151, in _do_image_activate
    insecure_registry=True):
  File "/var/lib/cattle/pyagent/dist/docker/api/image.py", line 200, in pull
    self._raise_for_status(response)
  File "/var/lib/cattle/pyagent/dist/docker/client.py", line 146, in _raise_for_status
    raise errors.APIError(e, response, explanation=explanation)
APIError: 401 Client Error: Unauthorized ("Get https://registry-1.docker.io/v2/rancher/agent-instance/manifests/v0.8.1: 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.

Hi!

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.

DOH!

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