-
Notifications
You must be signed in to change notification settings - Fork 222
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
Issues connecting TLJH with Enterprise Gateway #1058
Comments
sudo docker run -t --rm -e gateway-url='http://node-head:8887' -e LOG_LEVEL=DEBUG -e NotebookApp.session_manager_class=nb2kg.managers.SessionManager -e NotebookApp.kernel_manager_class=nb2kg.managers.RemoteKernelManager -e NotebookApp.kernel_spec_manager_class=nb2kg.managers.RemoteKernelSpecManager -v ${HOME}/notebooks/:/tmp/notebooks -p 8888:8888 -w /tmp/notebooks elyra/nb2kg:2.4.0 The container is up and I can navigate and open a JupyterNotebook but I cannot see the kernels specified in the gateway. Uncaught exception GET /api/kernelspecs (X.X.X.X) |
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
As of the Notebook 6.0 release, use of the That said, there will be additional configuration steps necessary and, because EG is running within Docker, I suspect you'll need the single-response address changes in the 2.6 release to make this work so spawned kernels know where to send their connection information back to the Docker container. Besides the issue you reference, you might also want to check out this one: #620. We could really use a section on configuring EG for use by Hub in our new Operators Guide, and it would be fantastic if this could be contributed once this is resolved. Btw, this is not a valid configuration option: Because NB2KG is no longer used and this should be documented in the EG repo, I'm going to transfer this issue. (See you over on EG!) |
|
Done! |
First of all thanks so much for answering this so quickly. I think I didn't explain properly my setup. We are not using standalone notebooks (I tested the gateway with them thought) neither JupyterServer as we would like to have multiple users, hence the use of JupyterHub. On the other hand, is YarnSpawner currently out of support? I believe that Spawner in JupyterHub allows to spawn notebooks taking resources from Yarn directly , what will make this setup easier. But it seems that the project is not being actively supported. Again thanks. I am probably doing some basic mistakes here. Eduardo |
Per my comment, and assuming the version of notebook you're using is >= 6.0, you do not need NB2KG nor do you need to configure the KernelManager, KernelSpecManager or SessionManager classes that NB2KG provides. Instead, you minimally need to set Because Hub spawns Notebook servers, and because (it sounds like) you want your kernels to utilize resources within the YARN cluster, I believe you have two choices.
You should be able to confirm option 2 without Hub by simply pointing a standalone Notebook server at the EG server configured to use YARN. This is a recommended step anyway, prior to configuring Hub-spawned Notebook servers to use EG. YARN deployment information can be found in the Operators Guide here.
I have no idea, I don't deal with Hub. You might try asking about the status of |
@EToledoR any updates on this? |
Hi,
I have a Spark+Hadopp+Yarn cluster and a installation of TLJH (The littles JupyterHub) and Jupyter Enterprise Gateway in the head node of the cluster.
I am trying to connect TLJH to Enterprise Gateway using DockerSpawner and the image elyra/nb2kg.
I can start a regular jupyter notebook and connect it to the Enterprise Gateway and see the notebook running as a container in Yarn. However it fails to start when I try to do it through JupyterHub.
I have been following this tutorial: https://ideonate.com/DockerSpawner-in-TLJH/ but using the elyra image as said.
And I have been following the steps in the issue jupyter/nb2kg#32 but it seems to not work.
This is how my tljh config file looks like:
c.JupyterHub.spawner_class = 'dockerspawner.DockerSpawner'
c.DockerSpawner.image = 'elyra/nb2kg:2.4.0'
c.DockerSpawner.args = '--gateway-url='http://node-head:8887' --NotebookApp.session_manager_class=nb2kg.managers.SessionManager --NotebookApp.kernel_manager_class=nb2kg.managers.RemoteKernelManager --NotebookApp.kernel_spec_manager_class=nb2kg.managers.RemoteKernelSpecManager'
from jupyter_client.localinterfaces import public_ips
c.JupyterHub.hub_ip = public_ips()[0]
c.DockerSpawner.name_template = "{prefix}-{username}-{servername}"
And the JEG is running by this:
jupyter enterprisegateway --ip=0.0.0.0 --port_retries=0 --port=8887 --config='/usr/local/share/jupyter/kernels/spark_python_yarn_cluster/kernel.json' --EnterpriseGatewayApp.yarn_endpoint='http://node-head:8088/ws/v1'
Am I missing any configuration or any of the config I have in place is wrong?
Thanks in advance.
Eduardo
Originally opened as jupyter/nb2kg#51 by @EToledoR, migration requested by @kevin-bates
The text was updated successfully, but these errors were encountered: