millejoh / emacs-ipython-notebook

Jupyter notebook client in Emacs
http://millejoh.github.io/emacs-ipython-notebook/
GNU General Public License v3.0
1.47k stars 122 forks source link

Problems with connecting to a remote JupyterHub #702

Closed NorwegianRockCat closed 4 years ago

NorwegianRockCat commented 4 years ago

Problem description

Cannot connect to a jupyterhub server on the network

Steps to reproduce the problem

I have installed JupyterHub on a remote machine based on the instructions from JupyterHub with the additional instructions for a reverse proxy.

The version of JupyterHub installed on the remote server is 1.1.0. The version of jupyterlab is 2.1.0, jupyterlab-server (1.1.1).

Testing in the browser, I can login using PAM (username/password).

I tried to connect via ein, but it never seems to login correctly. I turned on the debug information, but I'm not sure if it's helpful.

Using ein:login

15:50:16:212: [info] ein:jupyter-process-lines: Searching for program: No such file or directory, jupyter @#<buffer *scratch*>
15:50:23:552: [info] ein:jupyter-process-lines: Searching for program: No such file or directory, jupyter @#<buffer *scratch*>
15:50:23:553: [debug] Login attempt #-1 in response to nil from https://remote.host.name. @#<buffer *scratch*>
15:50:23:555: [debug] EIN:QUERY-PREPARE-HEADER: Found xsrf: nil @#<buffer *scratch*>
15:50:23:653: [error] Login to https://remote.host.name failed, error-thrown (error . exited abnormally with code 60 ), raw-header  @#<buffer *scratch*>
15:50:23:654: [debug] ein:notebooklist-login--complete STATUS: nil DATA: (:bad-page nil) @#<buffer *scratch*>

Using ein:jupyterhub-connect

15:54:57:707: [info] ein:jupyter-process-lines: Searching for program: No such file or directory, jupyter @#<buffer *scratch*>
15:55:16:530: [debug] EIN:QUERY-PREPARE-HEADER: Found xsrf: nil @#<buffer *scratch*>
15:55:16:627: [error] ein:jupyterhub-query--error (https://remote.host.name/hub/api) nil (parse-error) @#<buffer *scratch*>
15:55:16:633: [debug] ein:jupyterhub-query--complete (https://remote.host.name/hub/api) nil (parse-error) @#<buffer *scratch*>

If I go to the hub/api URL from above in my browser it returns a json file that says version: "1.1.0"

I've looked through the github repo and it seems that JupyterHub may not be working anymore in ein? But I have control of the server, so I'm willing to try out some things.

System info:

("EIN system info"
 :emacs-version
 "GNU Emacs 26.3 (build 1, x86_64-apple-darwin17.7.0, Carbon Version 158 AppKit 1561.61)
 of 2020-03-27"
 :emacs-bzr-version nil
 :window-system mac
 :emacs-variant nil
 :os
 (:uname
  "Darwin tick.local 17.7.0 Darwin Kernel Version 17.7.0: Thu Jan 23 07:05:23 PST 2020; root:xnu-4570.71.69~1/RELEASE_X86_64 x86_64
"
  :lsb-release nil)
 :notebook "WARNING: Package(s) not found: notebook
"
 :ipython nil
 :image-types
 (svg image-io imagemagick png gif tiff jpeg xpm xbm pbm)
 :image-types-available
 (svg image-io imagemagick png gif tiff jpeg xpm xbm pbm)
 :request
 (:backend curl)
 :ein
 (:version "20200415.238"
       :source-dir "/Users/twschulz/.emacs.d/elpa/ein-20200415.238/")
 :lib
 ((:name "websocket"
     :path "~/.emacs.d/elpa/websocket-20200419.2124/websocket.elc"
     :featurep t
     :version-var websocket-version
     :version "1.12")
  (:name "anaphora"
     :path "~/.emacs.d/elpa/anaphora-20180618.2200/anaphora.elc"
     :featurep t
     :version-var nil
     :version nil)
  (:name "request"
     :path "~/.emacs.d/elpa/request-20200219.2257/request.elc"
     :featurep t
     :version-var request-version
     :version "0.3.0")
  (:name "deferred"
     :path "~/.emacs.d/elpa/deferred-20170901.1330/deferred.elc"
     :featurep t
     :version-var deferred:version
     :version "0.5.0")
  (:name "polymode"
     :path "~/.emacs.d/elpa/polymode-20200411.915/polymode.elc"
     :featurep t
     :version-var nil
     :version nil)
  (:name "dash"
     :path "~/.emacs.d/elpa/dash-20200119.2310/dash.elc"
     :featurep t
     :version-var nil
     :version nil)))
dickmao commented 4 years ago

~I have removed the partial and misleading jupyterhub code.~

~Jupyterhub is currently unsupported~

The single-user server needs to be launched from the browser. Then follow README instructions for jupyterhub.

NorwegianRockCat commented 4 years ago

OK. Thanks for the information.