tkf / emacs-ipython-notebook

IPython notebook client in Emacs
tkf.github.com/emacs-ipython-notebook/
GNU General Public License v3.0
548 stars 51 forks source link

Remote-server docker-container Jupyter #189

Open JuanPabloMF opened 7 years ago

JuanPabloMF commented 7 years ago

I am working on a dev remote server where I have a docker container running a jupyter notebook server.

I use the https://github.com/jupyter/docker-stacks/tree/master/datascience-notebook image. I set up a SHA-1 password and have no problems connecting and working through my browser (my jupyter server is exposed through port 8888 in the remote).

docker run -d -p 8888:8888 jupyter/datascience-notebook start-notebook.sh --NotebookApp.password='sha1:74ba40f8a388:c913541b7ee99d15d5ed31d4226bf7838f83a50e'

When I connect through EIN it fails to login. Trying to trace the error I get this feedback (ein:dev-start-debug):

ein: [info] Failed to login to 192.168.1.14:8888 Making completion list... debug-on-error=t websocket-debug=t websocket-callback-debug-on-error=nil ein:debug=t ein:log-level=debug ein:log-message-level=verbose previous-line: Beginning of buffer You can run the command ‘ein:notebooklist-open’ with M-x ein:notebookl-o RET REQUEST [error] Error from parser ein:json-read: (json-readtable-error) ein: [verbose] Error thrown: (json-readtable-error) ein: [error] Content list call http://192.168.1.14:8888/api/contents/ failed with status parse-error.

I have tried many of the mentioned techniques in some issues. With empty passwords and tokens, notebooklist-open works but I can't create or open any notebook. With password I get the error mentioned in this ticket. I have tried to update from MELPA also.

millejoh commented 7 years ago

Do you have the log from the running jupyter notebook server? What is the value of the request-backend variable? the *ein:log-all* buffer might have some useful output once you have enabled (ein:dev-start-debug).

I was able to log-in to the same docker image with token authentication enabled on my wimpy Ubuntu notebook. I also could create and run notebooks. I haven't tried configuring a password, but will try that later when I have some more time.

Also note that the official repository these days is over at millejoh/emacs-ipython-notebook. tkf's version is the original and most awesome, but unfortunately no longer maintained and doesn't work with current versions of ipython/jupyter.