Skip to content
This repository has been archived by the owner on Oct 26, 2019. It is now read-only.

Not working with Jupyter 4.3 #311

Open
aiguofer opened this issue Dec 22, 2016 · 6 comments
Open

Not working with Jupyter 4.3 #311

aiguofer opened this issue Dec 22, 2016 · 6 comments
Labels

Comments

@aiguofer
Copy link

aiguofer commented Dec 22, 2016

Haven't had time to dig much into it, but it looks like call to /api/kernels is getting a 403, possibly due to the security changes that they made. Btw, my notebook is running with

c.NotebookApp.token = ''
c.NotebookApp.password = ''

here's what I see in console:

dashboard.js:108 Error: Failed to create kernel: API request failed (403): Forbidden
    at kernel.js:65
@aiguofer
Copy link
Author

Here's what I see on the jupyter server logs:

[W 23:05:54.952 NotebookApp] 403 POST /api/kernels (10.10.176.61): '_xsrf' argument missing from POST
[W 23:05:54.964 NotebookApp] 403 POST /api/kernels (10.10.176.61) 13.52ms referer=None

@philippjfr
Copy link

This Jupyter release blog post describes the problem. To quote:

The use of the xsrf token affects existing extensions / etc. that work directly with the notebook server via REST API. To make requests to the rest API, the _xsrf cookie must be sent back to the server in the X-XSRF-Token header of API requests.

@parente
Copy link
Member

parente commented Dec 23, 2016

The dashboard server is a nodejs app. It requires a running jupyter kernel gateway instance. I'm not clear where the notebook server fits into your setup.

@aiguofer
Copy link
Author

aiguofer commented Dec 23, 2016 via email

@parente
Copy link
Member

parente commented Dec 23, 2016

The notebook server has auth mechanisms mean for users such as password, cookies, and temp keys. The kernel gateway is more attuned to programmatic auth and access via API tokens.

Those differences aside, I think the kernel gateway ignores the new temp key auth added in notebook 4.3. It should continue working as before, but I've not tried it yet.

Using a notebook server instead of kernel gateway with the dashboard server is not something we've tested before. I'm happy to take PRs if you'd like to make it a supported option.

@aiguofer
Copy link
Author

aiguofer commented Jan 5, 2017

Ahh thanks for the explanation! I just set up the latest kernel gateway and it is indeed working. If I have time later on I might take a stab at this since I do find it a bit redundant to run both the notebook and the gateway (and I don't need to scale at this point).

@parente parente added the bug label Jan 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants