Skip to content
This repository has been archived by the owner on Nov 4, 2020. It is now read-only.

Cannot connect to remote kernels #133

Open
mboratko opened this issue Sep 23, 2018 · 0 comments
Open

Cannot connect to remote kernels #133

mboratko opened this issue Sep 23, 2018 · 0 comments

Comments

@mboratko
Copy link

mboratko commented Sep 23, 2018

Environment data

VS Code version: 1.27.2
Jupyter Extension version: 1.1.4
OS and version: Linux 4.18.9 (Arch)

Logs

Juptyer log: Unable to determine version of Jupyter,

Lots of stuff in the console, but none of it is related to Python or Jupyter.

Actual behavior

I select the "Jupyter: enter the url of local/remote Jupyter Notebook" command, enter the URL and then the token for the remote server, and then nothing happens.

Expected behavior

A list of kernels to choose from? (I'm not sure, I've never gotten it to work.)

Steps to reproduce:

On the server, I installed the latest miniconda (64-bit). Then I ran conda install -c conda-forge jupyter jupyter_kernel_gateway which installed, among other things, jupyter, notebook, and jupyter_kernel_gateway. Here are the versions which got installed:

jupyter                   1.0.0                      py_1    conda-forge
jupyter_client            5.2.3                      py_1    conda-forge
jupyter_console           5.2.0                    py36_1    conda-forge
jupyter_core              4.4.0                      py_0    conda-forge
jupyter_kernel_gateway    2.1.0                      py_1    conda-forge
jupyterlab                0.34.12                  py36_0    conda-forge
jupyterlab_launcher       0.13.1                     py_2    conda-forge
notebook                  5.7.0                    py36_0    conda-forge

On the client, where I have VS Code, I also installed jupyter using conda. (Not sure if this was necessary, but I'll use it locally as well anyway.)

Here are some outputs from the commands:

 $ /opt/miniconda3/bin/jupyter --version 
4.4.0
$ /opt/miniconda3/bin/jupyter kernelgateway --version
2.1.0
$ /opt/miniconda3/bin/jupyter notebook --version
5.7.0

Now I run

$ /opt/miniconda3/bin/jupyter notebook --no-browser --port=8889 --NotebookApp.allow_origin="*" --ip=192.168.1.5
[I 22:29:51.959 NotebookApp] [nb_conda_kernels] enabled, 3 kernels found
[I 22:29:52.439 NotebookApp] JupyterLab extension loaded from /opt/miniconda3/lib/python3.6/site-packages/jupyterlab
[I 22:29:52.439 NotebookApp] JupyterLab application directory is /opt/miniconda3/share/jupyter/lab
[I 22:29:52.458 NotebookApp] Serving notebooks from local directory: /opt/miniconda3/share/jupyter
[I 22:29:52.458 NotebookApp] The Jupyter Notebook is running at:
[I 22:29:52.458 NotebookApp] http://192.168.1.5:8889/?token=9ed24b0c63a1cb2e065122e7f8e35b7214c0f7c24452c1a7
[I 22:29:52.458 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 22:29:52.459 NotebookApp] 
    
    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://192.168.1.5:8889/?token=9ed24b0c63a1cb2e065122e7f8e35b7214c0f7c24452c1a7
/opt^C[I 22:31:17.119 NotebookApp] interrupted
Serving notebooks from local directory: /opt/miniconda3/share/jupyter
0 active kernels
The Jupyter Notebook is running at:
http://192.168.1.5:8889/?token=9ed24b0c63a1cb2e065122e7f8e35b7214c0f7c24452c1a7
Shutdown this notebook server (y/[n])? y
[C 22:31:18.368 NotebookApp] Shutdown confirmed
[I 22:31:18.369 NotebookApp] Shutting down 0 kernels

I'm entering http://192.168.1.5:8889 for the URL, and 9ed24b0c63a1cb2e065122e7f8e35b7214c0f7c24452c1a7 for the token. Note that when I browse to this URL, I am able to log in using the token.

I also tried the Jupyter Kernel Gateway, which is definitely how I would want to run this, but it didn't work either. I ran

/opt/miniconda3/bin/jupyter kernelgateway --JupyterWebsocketPersonality.list_kernels=True --KernelGatewayApp.ip='0.0.0.0'

but it doesn't present me with a token. In addition, when I browse to http://192.168.1.5:8888/api/kernels, it responds with an empty array [].

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant