Failed with status: 401 Unauthorized

Hi,

I am getting the following error on the logs when trying to run/pull hello-world

msg="Handler for POST /v1.23/containers/create returned error: No such image: hello-world:latest"
msg="Attempting next endpoint for pull after error: unauthorized: authentication required"
msg="unable to get remote tags: Could not reach any registry endpoint"
msg="Not continuing with pull after error: Could not reach any registry endpoint"

I also get error messages when trying to run docker login

Handler for POST /v1.23/auth returned error: login attempt to https ://registry-1.docker.io/v2/ failed with status: 401 Unauthorized

I am using a working cntlm proxy (I tried without it too), and wget curl etc work ok

# curl https_://index.docker.io/v1/repositories/library/hello-world/images
[{"checksum": "", "id": "d59cd4c39e502ebb7eabe6b49eb0b5e19d38dede67540c51a27b5426c0976f4e"}, {"checksum": "", "id": "f1d956dc5945042a7aa18067346f1c2f1b47f39590a53f23e009600d5a9b.....

# cat /root/.curlrc 
proxy=http://127.0.0.1:8080

also we have SSL certificate intercept in our proxy, but the certificate is installed on the system (and accepted as seen in the curl test)

Any ideas will be appreciated!

# docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 1.11.1
Storage Driver: devicemapper
 Pool Name: docker-253:1-67168386-pool
 Pool Blocksize: 65.54 kB
 Base Device Size: 10.74 GB
 Backing Filesystem: xfs
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 11.8 MB
 Data Space Total: 107.4 GB
 Data Space Available: 26.65 GB
 Metadata Space Used: 581.6 kB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.147 GB
 Udev Sync Supported: true
 Deferred Removal Enabled: false
 Deferred Deletion Enabled: false
 Deferred Deleted Device Count: 0
 Data loop file: /var/lib/docker/devicemapper/devicemapper/data
 WARNING: Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.thinpooldev` or use `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.
 Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.107-RHEL7 (2015-12-01)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: host bridge null
Kernel Version: 3.10.0-327.10.1.el7.x86_64
Operating System: Red Hat Enterprise Linux Server 7.2 (Maipo)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 7.64 GiB
Name: systst-xxx
ID: QQOP:OXDC:A55R:FIRL:2D4L:4CX3:DZSG:QCWP:4GY3:BOGM:DDPO:BCYB
Docker Root Dir: /var/lib/docker
Debug mode (client): false
Debug mode (server): false
Http Proxy: http ://127.0.0.1:8080
Https Proxy: https ://127.0.0.1:8080
Registry: https://index.docker.io/v1/
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled


# docker run hello-world"
Unable to find image 'hello-world:latest' locally
Pulling repository docker.io/library/hello-world
docker: Could not reach any registry endpoint.
See 'docker run --help'.

+1

Docker version 1.11.2, build b9f10c9

I was getting the sam:
Error response from daemon: login attempt to https://registry-1.docker.io/v2/ failed with status: 401 Unauthorized

Problem was Proxy environment

I asked Proxy admin to excempt from SSL interception the following:

https for site *.docker.io (I identifiet these 2 in network trace, but possibly there are others: auth.docker.io, registry-1.docker.io)

After implementing this change 'docker login succeeds