Kernel gateway returns 404 upon hitting local_server:8888/hello/world

76 views
Skip to first unread message

Paul A

unread,
Jul 8, 2016, 10:52:41 AM7/8/16
to Project Jupyter
The manual does not explain how to link the gateway and the running kernel. Presumably, KernelGatewayApp.api and/or KernelGatewayApp.seed_uri attributes need to be set in a particular way (how?).

How do you then register/link a particular cell to a particular URL?



Peter Parente

unread,
Jul 11, 2016, 1:41:42 PM7/11/16
to Project Jupyter
Hi Paul,

I might be missing what you mean by "how do you then register/link a particular cell". If you're asking how you annotate a cell in a notebook so that it becomes a RESTful resource, see the first section on the page you linked. It says "To turn a notebook cell into a HTTP handler, you must prefix it with a single line comment" and explains more from there.

If you're asking what command line args you need to provide to point the kernel gateway at a notebook containing one or more annotated cells, see the "Running" section on that same page. There's an example of what you provide to "api" and "seed_uri" and links to complete samples on GitHub. This blog post might also be of help: http://blog.ibmjstart.net/2016/01/28/jupyter-notebooks-as-restful-microservices/

I hope this helps,
Pete

PS - Be warned: you linked to the kernel gateway documentation for latest code in the git master branch. If you want the doc for the latest stable release, it's here http://jupyter-kernel-gateway.readthedocs.io/en/stable/http-mode.html. You can switch between latest and stable in the bottom left of the ReadTheDocs site.

Paul A

unread,
Jul 13, 2016, 3:27:54 AM7/13/16
to Project Jupyter
jupyter kernelgateway command runs happily on its own, but does not expose any URIs, hence you get the frustrating 404s.

You need to add --KernelGatewayApp.seed_uri=path_to_foobar.ipynb to that command line, among other switches, such as --KernelGatewayApp.allow_origin='*'.
Reply all
Reply to author
Forward
0 new messages