Skip to content

Use base_url so that the extension works in a JupyterHub setting. #13

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

Merged
merged 1 commit into from
Nov 10, 2017

Conversation

ian-r-rose
Copy link
Member

No description provided.

@athornton
Copy link
Member

It does manage to load (albeit with a 403 at GH, but that's probably on me), but now no cells run. I get the following:

Traceback (most recent call last):
  File "/opt/lsst/software/stack/python/miniconda3-4.3.21/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/opt/lsst/software/stack/python/miniconda3-4.3.21/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/opt/lsst/software/stack/python/miniconda3-4.3.21/lib/python3.6/site-packages/ipykernel/__main__.py", line 3, in <module>
    app.launch_new_instance()
  File "/opt/lsst/software/stack/python/miniconda3-4.3.21/lib/python3.6/site-packages/traitlets/config/application.py", line 657, in launch_instance
    app.initialize(argv)
  File "<decorator-gen-123>", line 2, in initialize
  File "/opt/lsst/software/stack/python/miniconda3-4.3.21/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/opt/lsst/software/stack/python/miniconda3-4.3.21/lib/python3.6/site-packages/ipykernel/kernelapp.py", line 448, in initialize
    self.init_sockets()
  File "/opt/lsst/software/stack/python/miniconda3-4.3.21/lib/python3.6/site-packages/ipykernel/kernelapp.py", line 243, in init_sockets
    self.stdin_port = self._bind_socket(self.stdin_socket, self.stdin_port)
  File "/opt/lsst/software/stack/python/miniconda3-4.3.21/lib/python3.6/site-packages/ipykernel/kernelapp.py", line 180, in _bind_socket
    s.bind("tcp://%s:%i" % (self.ip, port))
  File "zmq/backend/cython/socket.pyx", line 495, in zmq.backend.cython.socket.Socket.bind (zmq/backend/cython/socket.c:5653)
  File "zmq/backend/cython/checkrc.pxd", line 25, in zmq.backend.cython.checkrc._check_rc (zmq/backend/cython/socket.c:10014)
zmq.error.ZMQError: Address already in use
[I 2017-10-27 20:59:17.630 SingleUserLabApp restarter:103] KernelRestarter: restarting kernel (1/5)
kernel 15b789a1-fc54-45af-9c1c-36ce4a3b4f61 restarted

I suspect this is coming from the attempt to add the handler.

@ian-r-rose
Copy link
Member Author

Do you have a set of commands that reproduce this from a fresh environment? When I run in a JupyterHub insance (using the default PAM authenticator) everything seems to work okay.

@athornton
Copy link
Member

Mmmm, kinda?

https://github.com/lsst-sqre/jupyterlabdemo/tree/tickets/DM-12358/jupyterlab

Specifically, Dockerfile.template has all of the steps that go into the Dockerfile (the template placeholders are pretty obvious). https://github.com/lsst-sqre/jupyterlabdemo/blob/tickets/DM-12358/jupyterlab/Dockerfile.template

A working FROM line would be:

FROM lsstsqre/centos:7-stack-lsst_distrib-d_2017_10_26

As for the other template variables:

PYVER should be 3
IMAGE_NAME should be a name in a Docker Hub namespace you can write to (I use lsstsqre/jld-lab, but obviously you can't write to lsstsqre)
VERSION is an arbitrary string. I think this particular one would end up being d20171026

All of that together would build you a Jupyter Lab sitting on top of the LSST software stack. We typically build these nightly from our CI system.

I do not have a minimal test case although I can maybe work on that next week.

I suspect the answer may be that the server extension doesn't know what to do when the Hub and the Lab are on two separate machines, as is the case for me.

@ian-r-rose
Copy link
Member Author

@athornton I am going to go ahead and merge this as an improvement on the current situation, but I'd still like to figure out how to get this working for your use case.

@ian-r-rose ian-r-rose merged commit 0fc57bf into jupyterlab:master Nov 10, 2017
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

Successfully merging this pull request may close these issues.

2 participants