-
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
jupyterhub with enterprise gateway #620
Comments
you need to import nb2kg in notebook config as below: Please try this. Thanks. |
Thank you for your reply. I added import nb2kg. However the error is the same. The EG+Notebook can work well but EG with Jupyterhub cannot. Maybe I need to do more configuration for Jupyterhub and Notebook. For now, I set the users in Jupyterhub and other configurations are default. Or do I need to update or add some parts to the nb2kg? It's confusing that KernelSpecManager object has no attribute 'list_kernel_specs'.
Thanks
…-----Original Messages-----
From:"Sai Bharath" <[email protected]>
Sent Time:2019-03-27 19:53:24 (Wednesday)
To: jupyter/enterprise_gateway <[email protected]>
Cc: RCJiao <[email protected]>, Author <[email protected]>
Subject: Re: [jupyter/enterprise_gateway] jupyterhub with enterprise gateway (#620)
you need to import nb2kg in notebook config as below:
import nb2kg
from nb2kg import managers
Please try this. Thanks.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
Best wishes!
Ruochen Jiao
Chu Kochen Honors College,Zhejiang University
[email protected]
|
Can you share your notebook and hub config? That’ll help me . |
Thank you, the configuration of notebook is shown as follows:
|
1
2
3
4
5
6
7
8
9
10
11
|
import nb2kg
from nb2kg import managers
c = get_config()
c.NotebookApp.session_manager_class=managers.SessionManager
c.NotebookApp.kernel_manager_class=managers.RemoteKernelManager
c.NotebookApp.kernel_spec_manager_class=managers.RemoteKernelSpecManager
c.NotebookApp.ip=0.0.0.0
c.NotebookApp.allow_root = True
|
The configuration of Jupyterhub is :
|
1
2
3
4
5
|
c = get_config()
c.Authenticator.admin_users = set(['tank','root'])
c.Authenticator.whitelist = set(['tank','fighter','arda','root'])
c.JupyterHub.authenticator_class = 'jupyterhub.auth.PAMAuthenticator'
c.Spawner.debug = True
|
The error is:
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
[E 2019-03-28 11:08:59.441 SingleUserNotebookApp web:1788] Uncaught exception GET /user/tank/api/kernelspecs (127.0.0.1)
HTTPServerRequest(protocol='http', host='127.0.0.1:19999', method='GET', uri='/user/tank/api/kernelspecs', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
File "/opt/work/conda/envs/jegpy27/lib/python3.6/site-packages/tornado/web.py", line 1699, in _execute
result = await result
File "/opt/work/conda/envs/jegpy27/lib/python3.6/site-packages/tornado/gen.py", line 209, in wrapper
yielded = next(result)
File "/opt/work/conda/envs/jegpy27/lib/python3.6/site-packages/nb2kg/handlers.py", line 328, in get
kernel_specs = yield gen.maybe_future(ksm.list_kernel_specs())
AttributeError: 'KernelSpecManager' object has no attribute 'list_kernel_specs'
[W 2019-03-28 11:08:59.443 SingleUserNotebookApp handlers:620] Unhandled error
[E 2019-03-28 11:08:59.444 SingleUserNotebookApp log:150] {
"Cookie": "jupyterhub-user-tank=2|1:0|10:1553742538|20:jupyterhub-user-tank|48:MmQzMTc3ZGYtZTc3NC00YzMwLThhNzYtMDY3MTAzZDBlZWZh|a7bbcd25c58f7baecd42ed7291cc922a6bafe6d796a6614aa6424df5829e5707; username-127-0-0-1-12345=\"2|1:0|10:1553567027|24:username-127-0-0-1-12345|44:ZWMyMDYxYzVhNWYzNDM3ODgwZWEyNTI5NTI0OGY0YjQ=|d1208eb128abc3d04d595b0b95212f659081471afd577c69b65bfe28e9dc3157\"; jupyterhub-session-id=b6c7a79e9ca645a98c2769e652ab8f53; _xsrf=2|3ee20c39|ee89d728e83e2542e83131f93e130f96|1553741174",
"Accept-Language": "en-US,en;q=0.9,zh;q=0.8",
"Accept-Encoding": "gzip, deflate, br",
"Referer": "http://127.0.0.1:19999/user/tank/tree",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36",
"X-Xsrftoken": "2|3ee20c39|ee89d728e83e2542e83131f93e130f96|1553741174",
"X-Requested-With": "XMLHttpRequest",
"Accept": "*/*",
"Connection": "close",
"Host": "127.0.0.1:19999"
}
[E 2019-03-28 11:08:59.444 SingleUserNotebookApp log:158] 500 GET /user/tank/api/kernelspecs ([email protected]) 4.22ms
|
Thanks
…-----Original Messages-----
From:"Sai Bharath" <[email protected]>
Sent Time:2019-03-28 12:32:20 (Thursday)
To: jupyter/enterprise_gateway <[email protected]>
Cc: RCJiao <[email protected]>, Author <[email protected]>
Subject: Re: [jupyter/enterprise_gateway] jupyterhub with enterprise gateway (#620)
Can you share your notebook and hub config? That’ll help me .
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
Best wishes!
Ruochen Jiao
Chu Kochen Honors College,Zhejiang University
[email protected]
|
Ensure you have the extension configured (via |
@jrcblue - have you had any luck? Please let us know how we can assist. |
FYI, here is what I use for JupyterHub integration: Jupyter Enterprise gateway ingress to make it available at BTW, I mostly tried using in Kubernetes, not sure if using a different environment requires specific tweaks but this can give you a bases. Also, all steps are documented in the ansible-scripts we use for setting up test environments. |
Thank you, and I am trying to make jupyterhub work on yarn cluster according to your configuration. I will update. |
this is because the manager class does not get see this nb2kg issue to fix |
Thanks for the update @Litchilitchy. @jrcblue - how are things going for you? Have you been able to move forward? |
In fact, I cooperated with @Litchilitchy and we used c.Spawner.args to solve the problem. What's more, in order to enable the user root in a docker, we used configuration --EnterpriseGatewayApp.unauthorized_users=[] to start enterprise-gateway.(We found a little bug: the document says the value of EnterpriseGatewayApp.unauthorized_users should be a set, but in fact it cannot work if using a set)
Thank you very much for your assistance for this long time!
…-----Original Messages-----
From:"Kevin Bates" <[email protected]>
Sent Time:2019-04-24 22:04:15 (Wednesday)
To: jupyter/enterprise_gateway <[email protected]>
Cc: RCJiao <[email protected]>, Mention <[email protected]>
Subject: Re: [jupyter/enterprise_gateway] jupyterhub with enterprise gateway (#620)
Thanks for the update @Litchilitchy. @jrcblue - how are things going for you? Have you been able to move forward?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Best wishes!
Ruochen Jiao
Chu Kochen Honors College,Zhejiang University
[email protected]
|
@jrcblue - thank you for the response - glad you're moving forward. I'm closing this issue. Could you please open a separate issue regarding the inability to unset |
Hi, I am trying to integrate jupyterhub with enterprise_gateway. EG+nb2kg+Notebook have already worked well. I configured jupyter_notebook_config.py as another issue indicated:
`from nb2kg import managers
c = get_config()
c.NotebookApp.session_manager_class=managers.SessionManager
c.NotebookApp.kernel_manager_class=managers.RemoteKernelManager
c.NotebookApp.kernel_spec_manager_class=managers.RemoteKernelSpecManager`
However, the jupyterhub cannot find the kernels and the error is:
[E 2019-03-27 16:47:34.599 SingleUserNotebookApp web:1788] Uncaught exception GET /user/tank/api/kernelspecs (127.0.0.1)
HTTPServerRequest(protocol='http', host='127.0.0.1:19999', method='GET', uri='/user/tank/api/kernelspecs', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
File "/opt/work/conda/envs/jegpy27/lib/python3.6/site-packages/tornado/web.py", line 1699, in _execute
result = await result
File "/opt/work/conda/envs/jegpy27/lib/python3.6/site-packages/tornado/gen.py", line 209, in wrapper
yielded = next(result)
File "/opt/work/conda/envs/jegpy27/lib/python3.6/site-packages/nb2kg/handlers.py", line 328, in get
kernel_specs = yield gen.maybe_future(ksm.list_kernel_specs())
AttributeError: 'KernelSpecManager' object has no attribute 'list_kernel_specs
[W 2019-03-27 16:47:34.600 SingleUserNotebookApp handlers:620] Unhandled error
[E 2019-03-27 16:47:34.600 SingleUserNotebookApp log:150] {
"Cookie": "jupyterhub-user-tank=2|1:0|10:1553675988|20:jupyterhub-user-tank|48:MTNjZTE5NDQtY2Q5Ni00ODZlLWEyYTItNmRhY2IzNWIyNTE0|ecfd4d207065e18279349162980f237ef9ec094fbfacf64b854c30a83442d8ff; _xsrf=2|d8d45906|b01faa2c02009321af61a33ef9aed088|1551146410; username-127-0-0-1-12345="2|1:0|10:1553567027|24:username-127-0-0-1-12345|44:ZWMyMDYxYzVhNWYzNDM3ODgwZWEyNTI5NTI0OGY0YjQ=|d1208eb128abc3d04d595b0b95212f659081471afd577c69b65bfe28e9dc3157"; jupyterhub-session-id=b6c7a79e9ca645a98c2769e652ab8f53",
"Accept-Language": "en-US,en;q=0.9,zh;q=0.8",
"Accept-Encoding": "gzip, deflate, br",
"Referer": "http://127.0.0.1:19999/user/tank/tree",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36",
"X-Xsrftoken": "2|d8d45906|b01faa2c02009321af61a33ef9aed088|1551146410",
"X-Requested-With": "XMLHttpRequest",
"Accept": "/",
"Connection": "close",
"Host": "127.0.0.1:19999"
}
I was wondering what else should I configure or maybe I need to get another version of nb2kg?
I went over #448 but am still confused. Thank you!
The text was updated successfully, but these errors were encountered: