Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with authorising with DockerHub registry #849

Closed
hmharshit opened this issue May 19, 2019 · 3 comments
Closed

Problem with authorising with DockerHub registry #849

hmharshit opened this issue May 19, 2019 · 3 comments

Comments

@hmharshit
Copy link

hmharshit commented May 19, 2019

I launched binder on Digital Ocean, I see binder page, but when I try to add repository - I'm getting Internal Server Error.

I'm using DockerHub as the registry.
I checked the logs and found this one

$ - kubectl --namespace=hulk logs binder-84f6b894f4-rbhlx

[E 190519 14:05:36 web:1621] Uncaught exception GET /build/gl/leminhluan4244%2Fsgg_alumni/master (10.244.0.1)
    HTTPServerRequest(protocol='http', host='139.59.50.29', method='GET', uri='/build/gl/leminhluan4244%2Fsgg_alumni/master', version='HTTP/1.1', remote_ip='10.244.0.1')
    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/site-packages/tornado/web.py", line 1543, in _execute
        result = yield result
      File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1099, in run
        value = future.result()
      File "/usr/local/lib/python3.6/site-packages/binderhub/builder.py", line 273, in get
        image_manifest = await self.registry.get_image_manifest(*'/'.join(image_name.split('/')[-2:]).split(':', 1))
      File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1107, in run
        yielded = self.gen.throw(*exc_info)
      File "/usr/local/lib/python3.6/site-packages/binderhub/registry.py", line 199, in get_image_manifest
        auth_resp = yield client.fetch(auth_req)
      File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1099, in run
        value = future.result()
    tornado.httpclient.HTTPError: HTTP 401: Unauthorized
[I 190519 14:05:36 web:2106] 200 GET /build/gl/leminhluan4244%2Fsgg_alumni/master (10.244.0.1) 2064.82ms

I'm wondering if someone can help decode the meaning of this error and point me in a better direction. I've already tried to recreate all steps 3 to 4 times but always stucks here.

Here is my config.yaml

config:
  BinderHub:
    use_registry: true
    image_prefix: hmharshit/alex-binder-
    hub_url: http://139.59.50.29

Also secret.yaml

registry:
  username: hmharshit
  password: XXXXXXX

jupyterhub:
  hub:
    services:
      binder:
        apiToken: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  proxy:
    secretToken: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Note: this is the helm chart of binder version v0.2.0-7b2c4f8

@hmharshit hmharshit changed the title tornado.httpclient.HTTPError: HTTP 401: Unauthorized [BUG]: tornado.httpclient.HTTPError: HTTP 401: Unauthorized May 19, 2019
@prabhat04011998
Copy link

I'm also facing the same issue in installation on Digital Ocean.

Can someone help me in this @sgibson91 @betatim @hmharshit ?

@betatim
Copy link
Member

betatim commented May 25, 2019

From the traceback it looks like something is wrong with the username/password (or other authentication method) for the docker registry you use.

After double checking the details you set in your config I'd inspect the actual request made in /usr/local/lib/python3.6/site-packages/binderhub/registry.py:199 to see what is up. To make that easier I'd setup a BinderHub as for development (see CONTRIBUTING.md) so you can modify the code and re-run it easily.

In general discourse.jupyter.org is a better place to ask questions like this which for the moment is a support question, not yet a confirmed bug. We try to use the issue tracker only for bugs and other issues that are about directly changing the code of the project. Everything else should go to the forum because that has more readers, better indexing by google, etc.

@betatim betatim changed the title [BUG]: tornado.httpclient.HTTPError: HTTP 401: Unauthorized Problem with authorising with DockerHub registry May 25, 2019
@hmharshit
Copy link
Author

@betatim Thank You. This works perfectly now. For further issues, anyone can follow this thread. I'm closing this issue now as it has been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants