[Containers] Unable to "docker login" to Portus when using the docker-compose development setup and LDAP

Todd Morgan Todd.Morgan at cgu.com.au
Wed Dec 23 05:33:30 MST 2015


Hi everyone,

The logs didn't show up as I just went straight from the .compose-setup

docker-compose logs 

helped with the requested output.

The appropriate error message log is detailed below ... I believe the interesting section is 


level=warning msg="error authorizing context: authorization token required" http.request.host="ignobilia-bibliotheca:5000" http.request.id=45f63877-95a7-4680-b6c5-fa55ae550749 http.request.method=GET http.request.remoteaddr="10.134.135.56:47616" http.request.uri="/v2/" http.request.useragent="docker/1.9.1 go/go1.4.2 git-commit/a34a1d5 kernel/3.10.0-229.20.1.el7.x86_64 os/linux arch/amd64" instance.id=6dd344ac-0c8b-44c3-86e5-a8d7e690030a version=v2.1.1
 

registry_1 | time="2015-12-23T11:57:39Z" level=warning msg="error authorizing context: authorization token required" http.request.host="ignobilia-bibliotheca:5000" http.request.id=45f63877-95a7-4680-b6c5-fa55ae550749 http.request.method=GET http.request.remoteaddr="10.134.135.56:47616" http.request.uri="/v2/" http.request.useragent="docker/1.9.1 go/go1.4.2 git-commit/a34a1d5 kernel/3.10.0-229.20.1.el7.x86_64 os/linux arch/amd64" instance.id=6dd344ac-0c8b-44c3-86e5-a8d7e690030a version=v2.1.1
registry_1 | 10.134.135.56 - - [23/Dec/2015:11:57:39 +0000] "GET /v2/ HTTP/1.1" 401 114 "" "docker/1.9.1 go/go1.4.2 git-commit/a34a1d5 kernel/3.10.0-229.20.1.el7.x86_64 os/linux arch/amd64"
registry_1 | time="2015-12-23T11:57:44Z" level=debug msg="filesystem.List(\"/\")" instance.id=6dd344ac-0c8b-44c3-86e5-a8d7e690030a trace.duration=74.195µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).List" trace.id=2ff3e414-e1ff-4364-a02d-efb013753e72 trace.line=123 version=v2.1.1
registry_1 | time="2015-12-23T11:57:54Z" level=debug msg="filesystem.List(\"/\")" instance.id=6dd344ac-0c8b-44c3-86e5-a8d7e690030a trace.duration=75.912µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).List" trace.id=0f017474-58ad-4923-a62d-7d90a9ec4d15 trace.line=123 version=v2.1.1
registry_1 | time="2015-12-23T11:58:04Z" level=debug msg="filesystem.List(\"/\")" instance.id=6dd344ac-0c8b-44c3-86e5-a8d7e690030a trace.duration=635.239µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).List" trace.id=16680cd2-19a1-4069-aa8f-6a4365e10668 trace.line=123 version=v2.1.1
registry_1 | time="2015-12-23T11:58:14Z" level=debug msg="filesystem.List(\"/\")" instance.id=6dd344ac-0c8b-44c3-86e5-a8d7e690030a trace.duration=104.702µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).List" trace.id=4f65b0d9-4fe5-4599-9704-0efa29e19b43 trace.line=123 version=v2.1.1
registry_1 | time="2015-12-23T11:58:24Z" level=debug msg="filesystem.List(\"/\")" instance.id=6dd344ac-0c8b-44c3-86e5-a8d7e690030a trace.duration=74.179µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).List" trace.id=b878b270-bd9e-4347-b7a6-ea84149aadfd trace.line=123 version=v2.1.1
registry_1 | time="2015-12-23T11:58:34Z" level=debug msg="filesystem.List(\"/\")" instance.id=6dd344ac-0c8b-44c3-86e5-a8d7e690030a trace.duration=69.04µs trace.file="/go/src/github.com/docker/distribution/registry/storage/driver/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).List" trace.id=61a50728-4097-45e6-baff-9ef512cd7e72 trace.line=123 version=v2.1.1
registry_1 | time="2015-12-23T11:58:44Z" level=debug msg="filesystem.List(\"/\")" instance.id=6dd344ac-0c8b-44c3-86e5-a8d7e690030a trace.duration=63.157µs

The command I invoked to yield that result was


docker login ignobilia-bibliotheca:5000
Username: toddmorgan
Password:
Email: todd.morgan at cgu.com.au
Error response from daemon: no successful auth challenge for http://ignobilia-bibliotheca:5000/v2/ - errors: [token auth attempt for registry http://ignobilia-bibliotheca:5000/v2/: http://172.17.0.1:3000/v2/token?account=toddmorgan&service=172.17.0.1%3A5000 request failed with status: 502 Bad Gateway]


The docker host for portus has a DNS binding "ignobilia-bibliotheca"
The hosts real IP details are

ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:50:56:b9:14:e9 brd ff:ff:ff:ff:ff:ff
    inet 10.139.147.70/22 brd 10.139.147.255 scope global ens192
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:feb9:14e9/64 scope link
       valid_lft forever preferred_lft forever
3: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
    link/ether 02:42:7d:9b:4d:81 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 scope global docker0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:7dff:fe9b:4d81/64 scope link

Docker inspecting the container for IP details yields

docker inspect 03f989bdb204 | grep 172
        "Gateway": "172.17.0.1",
        "IPAddress": "172.17.0.5",
                "Gateway": "172.17.0.1",
                "IPAddress": "172.17.0.5",

And

docker inspect 2294aeb593b1 | grep 172
            "DOCKER_HOST=172.17.0.1",
        "Gateway": "172.17.0.1",
        "IPAddress": "172.17.0.4",
                "Gateway": "172.17.0.1",
                "IPAddress": "172.17.0.4",


Container details

docker ps -a
CONTAINER ID        IMAGE                    COMMAND                  CREATED             STATUS                  PORTS                              NAMES
03f989bdb204        portus_web               "/usr/bin/supervisord"   34 minutes ago      Up 32 minutes           3000/tcp                           portus_crono_1
2294aeb593b1        library/registry:2.1.1   "/registry/entry.sh"     34 minutes ago      Up 32 minutes           0.0.0.0:5000-5001->5000-5001/tcp   portus_registry_1
21157dda2d52        portus_web               "puma -b tcp://0.0.0."   34 minutes ago      Up 32 minutes           0.0.0.0:3000->3000/tcp             portus_web_1
8038611ff0cb        library/mariadb          "/docker-entrypoint.s"   34 minutes ago      Up 32 minutes           3306/tcp                           portus_db_1
6b8dcadfdc67        hello-world              "/hello"                 6 days ago          Exited (0) 6 days ago                                      silly_leakey


The only other interesting information was that the first attempt to create the initial registry indicated that there was an error creating it .. so I tried again (clicked the button again) ... I did Not click the ignore errors ... and it worked.

I'm also behind a corporate proxy which may cause issues.

Thanks
      Todd

_____________________________________________________________________

The information transmitted in this message and its attachments (if any) is intended 
only for the person or entity to which it is addressed.
The message may contain confidential and/or privileged material. Any review, 
retransmission, dissemination or other use of, or taking of any action in reliance 
upon this information, by persons or entities other than the intended recipient is 
prohibited.

If you have received this in error, please contact the sender and delete this e-mail 
and associated material from any computer.

The intended recipient of this e-mail may only use, reproduce, disclose or distribute 
the information contained in this e-mail and any attached files, with the permission 
of the sender.

This message has been scanned for viruses.
_____________________________________________________________________


More information about the Containers mailing list