Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection to remote server via URI not working #6601

Closed
zohimchandani opened this issue Jul 9, 2021 · 20 comments
Closed

Connection to remote server via URI not working #6601

zohimchandani opened this issue Jul 9, 2021 · 20 comments

Comments

@zohimchandani
Copy link

zohimchandani commented Jul 9, 2021

Environment data

  • VS Code version: 1.57.0
  • Jupyter Extension version (available under the Extensions sidebar): v2021.6.999662501
  • Python Extension version (available under the Extensions sidebar): v2021.6.944021595
  • OS (Windows | Mac | Linux distro) and version: Mac OS Big Sur 11.4
  • Python and/or Anaconda version: Python 3.7.5 on remote server
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Jupyter server running: Remote

Steps I am taking

  1. Logging into my remote server and requesting a URI as shown in the image below

Screenshot 2021-07-09 at 13 51 34 (2)

  1. Forwarding ports on a different terminal as shown below

Screenshot 2021-07-09 at 14 02 39

  1. Copy pasting the URI provided by the remote server into VS code as shown below

Screenshot 2021-07-09 at 14 04 56

  1. Seeing the following error messages on the remote servers' terminal

Screenshot 2021-07-09 at 13 57 40

Screenshot 2021-07-09 at 14 03 34

@zohimchandani zohimchandani added the bug Issue identified by VS Code Team member as probable bug label Jul 9, 2021
@claudiaregio
Copy link
Contributor

@zohimchandani Could you please upgrade to the latest version of VS Code and the extensions you are using and let us know if this problem persists?

@claudiaregio claudiaregio added the info-needed Issue requires more information from poster label Jul 9, 2021
@zohimchandani
Copy link
Author

@claudiaregio Downloaded VS Code 1.58 and also updated all my extensions but unfortunately, the problem still persists.

@zohimchandani
Copy link
Author

Further information: if I paste the URL link provided by the remote server into a web-browser, a jupyter notebook interface opens up in which I am able to run my notebook.

However, when I paste that link into vs-code, I get the following errors:


[I 04:26:32.092 NotebookApp] Creating new notebook in /
[E 04:26:32.920 NotebookApp] Failed to run command:
    ['/home/zchandani/test/bin/python3', '-m', 'ipykernel_launcher', '-f', '/home/zchandani/.local/share/jupyter/runtime/kernel-f766d6f5-aeeb-4bfa-bd35-de3a1945c522.json']
        PATH='/home/zchandani/qnns_pennylane_venv/bin:/home/zchandani/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin'
        with kwargs:
    {'stdin': -1, 'stdout': None, 'stderr': None, 'cwd': '/home/zchandani/qnns_pennylane', 'start_new_session': True}
    
[E 04:26:32.921 NotebookApp] Uncaught exception POST /api/sessions?1626089192594 (127.0.0.1)
    HTTPServerRequest(protocol='http', host='127.0.0.1:8080', method='POST', uri='/api/sessions?1626089192594', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/tornado/web.py", line 1704, in _execute
        result = await result
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/tornado/gen.py", line 769, in run
        yielded = self.gen.throw(*exc_info)  # type: ignore
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/notebook/services/sessions/handlers.py", line 72, in post
        type=mtype))
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/tornado/gen.py", line 762, in run
        value = future.result()
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/tornado/gen.py", line 769, in run
        yielded = self.gen.throw(*exc_info)  # type: ignore
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 98, in create_session
        kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/tornado/gen.py", line 762, in run
        value = future.result()
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/tornado/gen.py", line 769, in run
        yielded = self.gen.throw(*exc_info)  # type: ignore
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 111, in start_kernel_for_session
        self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/tornado/gen.py", line 762, in run
        value = future.result()
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/notebook/services/kernels/kernelmanager.py", line 176, in start_kernel
        kernel_id = await maybe_future(self.pinned_superclass.start_kernel(self, **kwargs))
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/jupyter_client/multikernelmanager.py", line 186, in start_kernel
        km.start_kernel(**kwargs)
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/jupyter_client/manager.py", line 341, in start_kernel
        self.kernel = self._launch_kernel(kernel_cmd, **kw)
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/jupyter_client/manager.py", line 249, in _launch_kernel
        return launch_kernel(kernel_cmd, **kw)
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/jupyter_client/launcher.py", line 132, in launch_kernel
        proc = Popen(cmd, **kwargs)
      File "/usr/lib/python3.7/subprocess.py", line 800, in __init__
        restore_signals, start_new_session)
      File "/usr/lib/python3.7/subprocess.py", line 1551, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: '/home/zchandani/test/bin/python3': '/home/zchandani/test/bin/python3'
[W 04:26:32.925 NotebookApp] Unhandled error
[E 04:26:32.926 NotebookApp] {
      "Content-Type": "application/json",
      "Authorization": "token 79809d14d6d065c9cdda2d655e0ecd2d99f6270837302c3c",
      "Accept": "*/*",
      "Content-Length": "150",
      "User-Agent": "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)",
      "Accept-Encoding": "gzip,deflate",
      "Connection": "close",
      "Host": "127.0.0.1:8080"
    }
[E 04:26:32.926 NotebookApp] 500 POST /api/sessions?1626089192594 (127.0.0.1) 30.850000ms referer=None
[W 04:26:33.277 NotebookApp] delete /default-e3bd26df-80e1-4b79-bfb8-909a6d9c37cf.ipynb
[W 04:27:27.286 NotebookApp] 400 GET /api/contents/qnns8.ipynb?type=notebook&_=1626089246876 (127.0.0.1): Unreadable Notebook: /home/zchandani/qnns_pennylane/qnns8.ipynb NotJSONError("Notebook does not appear to be JSON: 'import pennylane as qml\\nfrom pennylane...")

@rchiodo
Copy link
Contributor

rchiodo commented Jul 12, 2021

@zohimchandani does this kernel work in the browser? If you enter the same URL into the browser and open an notebook, can you run a cell?

This error here looks like the kernelspec.json file is incorrect (or VS code can't find this directory):

FileNotFoundError: [Errno 2] No such file or directory: '/home/zchandani/test/bin/python3': '/home/zchandani/test/bin/python3'

@zohimchandani
Copy link
Author

@rchiodo Thought I'd record a short video to show you the steps I am taking which can be found on this youtube link: https://youtu.be/eBo5e-a6NXY

The terminal errors are also pasted below:


Last login: Mon Jul 12 21:21:07 on ttys001
zohim@Zohims-MacBook-Pro ~ % ssh [email protected]                       
[email protected]'s password: 
Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-143-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

 * Canonical Livepatch is available for installation.
   - Reduce system reboots and improve kernel security. Activate at:
     https://ubuntu.com/livepatch

53 updates can be applied immediately.
1 of these updates is a standard security update.
To see these additional updates run: apt list --upgradable

*** System restart required ***
Last login: Mon Jul 12 13:20:27 2021 from 172.16.16.182
zchandani@lambda-quad:~$ source qnns_pennylane_venv/bin/activate
(qnns_pennylane_venv) zchandani@lambda-quad:~$ cd qnns_pennylane
(qnns_pennylane_venv) zchandani@lambda-quad:~/qnns_pennylane$ jupyter notebook --no-browser --port=8080
[W 2021-07-12 13:24:19.793 LabApp] 'port' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-07-12 13:24:19.793 LabApp] 'port' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-07-12 13:24:19.794 LabApp] 'port' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2021-07-12 13:24:19.803 LabApp] JupyterLab extension loaded from /home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/jupyterlab
[I 2021-07-12 13:24:19.804 LabApp] JupyterLab application directory is /home/zchandani/qnns_pennylane_venv/share/jupyter/lab
[I 13:24:19.808 NotebookApp] Serving notebooks from local directory: /home/zchandani/qnns_pennylane
[I 13:24:19.808 NotebookApp] Jupyter Notebook 6.4.0 is running at:
[I 13:24:19.808 NotebookApp] http://localhost:8080/?token=402e8bbac30f30bf20dc99a319f969f4cc1dac497b87433e
[I 13:24:19.808 NotebookApp]  or http://127.0.0.1:8080/?token=402e8bbac30f30bf20dc99a319f969f4cc1dac497b87433e
[I 13:24:19.808 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 13:24:19.811 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:///home/zchandani/.local/share/jupyter/runtime/nbserver-17269-open.html
    Or copy and paste one of these URLs:
        http://localhost:8080/?token=402e8bbac30f30bf20dc99a319f969f4cc1dac497b87433e
     or http://127.0.0.1:8080/?token=402e8bbac30f30bf20dc99a319f969f4cc1dac497b87433e
[I 13:24:56.459 NotebookApp] Creating new notebook in /
[E 13:24:57.716 NotebookApp] Failed to run command:
    ['/home/zchandani/test/bin/python3', '-m', 'ipykernel_launcher', '-f', '/home/zchandani/.local/share/jupyter/runtime/kernel-5b511e76-145a-4d55-9e60-3f33ffedb30e.json']
        PATH='/home/zchandani/qnns_pennylane_venv/bin:/home/zchandani/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin'
        with kwargs:
    {'stdin': -1, 'stdout': None, 'stderr': None, 'cwd': '/home/zchandani/qnns_pennylane', 'start_new_session': True}
    
[E 13:24:57.717 NotebookApp] Uncaught exception POST /api/sessions?1626121497185 (127.0.0.1)
    HTTPServerRequest(protocol='http', host='127.0.0.1:8080', method='POST', uri='/api/sessions?1626121497185', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/tornado/web.py", line 1704, in _execute
        result = await result
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/tornado/gen.py", line 769, in run
        yielded = self.gen.throw(*exc_info)  # type: ignore
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/notebook/services/sessions/handlers.py", line 72, in post
        type=mtype))
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/tornado/gen.py", line 762, in run
        value = future.result()
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/tornado/gen.py", line 769, in run
        yielded = self.gen.throw(*exc_info)  # type: ignore
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 98, in create_session
        kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/tornado/gen.py", line 762, in run
        value = future.result()
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/tornado/gen.py", line 769, in run
        yielded = self.gen.throw(*exc_info)  # type: ignore
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 111, in start_kernel_for_session
        self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/tornado/gen.py", line 762, in run
        value = future.result()
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/notebook/services/kernels/kernelmanager.py", line 176, in start_kernel
        kernel_id = await maybe_future(self.pinned_superclass.start_kernel(self, **kwargs))
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/jupyter_client/multikernelmanager.py", line 186, in start_kernel
        km.start_kernel(**kwargs)
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/jupyter_client/manager.py", line 341, in start_kernel
        self.kernel = self._launch_kernel(kernel_cmd, **kw)
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/jupyter_client/manager.py", line 249, in _launch_kernel
        return launch_kernel(kernel_cmd, **kw)
      File "/home/zchandani/qnns_pennylane_venv/lib/python3.7/site-packages/jupyter_client/launcher.py", line 132, in launch_kernel
        proc = Popen(cmd, **kwargs)
      File "/usr/lib/python3.7/subprocess.py", line 800, in __init__
        restore_signals, start_new_session)
      File "/usr/lib/python3.7/subprocess.py", line 1551, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: '/home/zchandani/test/bin/python3': '/home/zchandani/test/bin/python3'
[W 13:24:57.721 NotebookApp] Unhandled error
[E 13:24:57.722 NotebookApp] {
      "Content-Type": "application/json",
      "Authorization": "token 402e8bbac30f30bf20dc99a319f969f4cc1dac497b87433e",
      "Accept": "*/*",
      "Content-Length": "150",
      "User-Agent": "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)",
      "Accept-Encoding": "gzip,deflate",
      "Connection": "close",
      "Host": "127.0.0.1:8080"
    }
[E 13:24:57.722 NotebookApp] 500 POST /api/sessions?1626121497185 (127.0.0.1) 33.330000ms referer=None
[W 13:24:58.157 NotebookApp] delete /default-13805e4d-8437-4d0e-96ff-c7adbf36dfee.ipynb
[I 13:25:25.259 NotebookApp] 302 GET /?token=402e8bbac30f30bf20dc99a319f969f4cc1dac497b87433e (127.0.0.1) 0.990000ms
[I 13:25:30.810 NotebookApp] Kernel started: 2faad694-656e-498b-ae06-1c58b242eef2, name: python3
[IPKernelApp] ERROR | No such comm target registered: jupyter.widget.version
[IPKernelApp] ERROR | No such comm target registered: jupyter.widget.version
[I 13:26:34.121 NotebookApp] Starting buffering for 2faad694-656e-498b-ae06-1c58b242eef2:d252911f8e4b4a83b9ac66d98590e714

Hope this helps in diagnosing the issue. Let me know if you'd like further information.

@rchiodo
Copy link
Contributor

rchiodo commented Jul 12, 2021

What does jupyter kernelspec list --json show? Can you upload that? The default kernel is crashing when we connect to jupyter.

I would hazard a guess that this file doesn't exist:

/home/zchandani/test/bin/python3

@zohimchandani
Copy link
Author

@rchiodo Please find below the output as requested:

zohim@Zohims-MacBook-Pro ~ % ssh [email protected]
[email protected]'s password: 
Welcome to Ubuntu 18.04.5 LTS (GNU/Linux 4.15.0-143-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

 * Canonical Livepatch is available for installation.
   - Reduce system reboots and improve kernel security. Activate at:
     https://ubuntu.com/livepatch

53 updates can be applied immediately.
1 of these updates is a standard security update.
To see these additional updates run: apt list --upgradable

*** System restart required ***
Last login: Mon Jul 12 13:23:59 2021 from 172.16.16.182
zchandani@lambda-quad:~$ source qnns_pennylane_venv/bin/activate
(qnns_pennylane_venv) zchandani@lambda-quad:~$ cd qnns_pennylane
(qnns_pennylane_venv) zchandani@lambda-quad:~/qnns_pennylane$ jupyter kernelspec list --json
{
  "kernelspecs": {
    "python2": {
      "resource_dir": "/home/zchandani/.local/share/jupyter/kernels/python2",
      "spec": {
        "argv": [
          "/usr/bin/python2",
          "-m",
          "ipykernel_launcher",
          "-f",
          "{connection_file}"
        ],
        "env": {},
        "display_name": "Python 2",
        "language": "python",
        "interrupt_mode": "signal",
        "metadata": {}
      }
    },
    "test": {
      "resource_dir": "/home/zchandani/.local/share/jupyter/kernels/test",
      "spec": {
        "argv": [
          "/home/zchandani/test/bin/python3",
          "-m",
          "ipykernel_launcher",
          "-f",
          "{connection_file}"
        ],
        "env": {},
        "display_name": "test",
        "language": "python",
        "interrupt_mode": "signal",
        "metadata": {}
      }
    },
    "python3": {
      "resource_dir": "/home/zchandani/qnns_pennylane_venv/share/jupyter/kernels/python3",
      "spec": {
        "argv": [
          "python",
          "-m",
          "ipykernel_launcher",
          "-f",
          "{connection_file}"
        ],
        "env": {},
        "display_name": "Python 3 (ipykernel)",
        "language": "python",
        "interrupt_mode": "signal",
        "metadata": {
          "debugger": true
        }
      }
    }
  }
}
(qnns_pennylane_venv) zchandani@lambda-quad:~/qnns_pennylane$ 

@rchiodo
Copy link
Contributor

rchiodo commented Jul 12, 2021

This kernelspec is causing our crash:

"test": {
      "resource_dir": "/home/zchandani/.local/share/jupyter/kernels/test",
      "spec": {
        "argv": [
          "/home/zchandani/test/bin/python3",
          "-m",
          "ipykernel_launcher",
          "-f",
          "{connection_file}"
        ],
        "env": {},
        "display_name": "test",
        "language": "python",
        "interrupt_mode": "signal",
        "metadata": {}
      }
    },

Not sure why we're starting it, but it might be because we're trying to list them all when remote. If you delete this kernel (or fix it) the problem should go away.

@zohimchandani
Copy link
Author

Not sure how I'd delete or fix this? Can you please expand and give me some instructions I can follow to resolve this. Thanks @rchiodo

@rchiodo
Copy link
Contributor

rchiodo commented Jul 12, 2021

I believe that kernel is located here:

/home/zchandani/.local/share/jupyter/kernels

There should be a directory there called test.

Delete that directory and the problem should resolve itself. Or if you need that kernel for something else, verify that this argument: /home/zchandani/test/bin/python3 is actually a python interpreter. From the looks of the error message, it isn't.

@rchiodo rchiodo removed the info-needed Issue requires more information from poster label Jul 12, 2021
@zohimchandani
Copy link
Author

That solved the problem. Thanks.

The virtual environment I created on my server does not show up under the kernels I can pick. Any ideas how I can get this to appear?

Screenshot 2021-07-12 at 22 37 34 (2)

Screenshot 2021-07-12 at 22 37 34

@rchiodo
Copy link
Contributor

rchiodo commented Jul 12, 2021

We don't support any other environment other than the one you launched jupyter with for remote. That should be the one you want anyway? (Didn't you start jupyter from it?)

Your remote server is the same machine isn't it though? Could you use just local instead? Maybe I missed something and it's actually being port forwarded somewhere.

@rchiodo rchiodo closed this as completed Jul 12, 2021
@zohimchandani
Copy link
Author

Yep you're right. Apologies I was confusing myself.

Couple more doubts and then that should be it from me.

  1. When I try read in a file, that is saved on my local machine as shown in the image below, I get a file not found error. If I read in the file from the server, it works fine. Any ideas on how I can get it to pick up files from my local machine but execute on the more powerful server?

  2. There are some messages in the terminal highlighted in amber such as

[W 15:05:33.895 NotebookApp] delete /qnns1-978ed2ad-8de6-48bc-8a51-01e6ab438fca.ipynb

Any reason to be worried about those? Are they hinting at a problem?
Screenshot 2021-07-12 at 23 05 51

@rchiodo
Copy link
Contributor

rchiodo commented Jul 12, 2021

  1. Unfortunately, to get data onto the server you have to copy it there. We have an idea about hosting the remote server filesystem (Create a remote file system/explrorer (Jupyter Lab behavior) #1366) which is kind of the reverse (your notebooks would be on the remote machine) but might be what you want.

  2. Those warnings are harmless and really a side effect of how we're running a local notebook file on a remote machine. We make a dummy notebook on the remote machine and then delete it from disk, but then update its contents with your local file. This allows the remote server to continue to work normally.

@zohimchandani
Copy link
Author

zohimchandani commented Jul 12, 2021

So to clarify just so I understand this:

The file qnns1.ipynb in the above image is stored on my local machine in the folder qnns_pennylane_vol along with a bunch of other files such as X_train.csv etc.

I can run a file stored on my local machine on the remote server but if have commands to read data in the file, the data needs to be stored on the remote server, in the folder where I launched my jupyter notebook from?

If I have a command to save a plot in my code, plt.savefig("cost.png"), will this be saved in the qnns_pennylane_vol folder on my local machine or on the server where I launched my jupyter notebook from?

Lastly, if I am running 2 different notebooks on the same port with the same token, is this slower than running them on different ports?

Thanks for helping me decipher this issue and getting it up and running. Appreciate your help.

@rchiodo
Copy link
Contributor

rchiodo commented Jul 12, 2021

The file qnns1.ipynb in the above image is stored on my local machine in the folder qnns_pennylane_vol along with a bunch of other files such as X_train.csv etc.

Yes. It's on your local machine.

I can run a file stored on my local machine on the remote server but if have commands to read data in the file, the data needs to be stored on the remote server, in the folder where I launched my jupyter notebook from?

Yes. The directory where you started 'jupyter notebook' is the root. I believe this is the root from where it will look for all files. So if the data file is in a subdirectory of the notebook, it has to be in a subdirectory of where you ran 'jupyter notebook' from.

If I have a command to save a plot in my code, plt.savefig("cost.png"), will this be saved in the qnns_pennylane_vol folder on my local machine or on the server where I launched my jupyter notebook from?

It will be saved on the remote machine. The code is running on the remote machine. The kernel itself does not understand anything about your local file system.

Lastly, if I am running 2 different notebooks on the same port with the same token, is this slower than running them on different ports?

I don't believe it's any slower. The kernel for each notebook is launched as a separate process for each notebook. The jupyter server is acting as a multiplexer to the different kernels but the major amount of time is likely the execution and not the transfering of the output html.

@zohimchandani
Copy link
Author

Thanks for your previous responses. I ran the code running overnight in 2 notebooks and received the following error this morning:

[I 16:08:02.373 NotebookApp] Kernel started: 74071106-ae0d-45d6-a9d5-e4c463fe5693, name: python3
[W 16:08:02.812 NotebookApp] delete /qnns9-d0752f3e-6cc6-4e93-a9aa-5279a32c2f26.ipynb
[I 16:08:03.255 NotebookApp] Starting buffering for 5fac85ff-d0e8-476a-857b-012dae3333e2:511533e1-fe92-4416-bb7e-96d05c1e77d2
[I 16:08:03.535 NotebookApp] Kernel shutdown: 74071106-ae0d-45d6-a9d5-e4c463fe5693
client_loop: send disconnect: Broken pipe

Is this because of inactivity? The code in the notebook ran fine for the first 2 hours and then crashed later.

@rchiodo
Copy link
Contributor

rchiodo commented Jul 13, 2021

I haven't seen disconnect errors before unless you shutdown VS code overnight.

@zohimchandani
Copy link
Author

Do I have to leave the ssh connection alive whilst the code is running or can I close my terminals and reconnect to see progress?

@rchiodo
Copy link
Contributor

rchiodo commented Jul 16, 2021

You have to leave the connection open. Otherwise the kernel is killed. We have enhancements to allow kernels to run without the connection but that hasn't been implemented yet.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 24, 2021
@DonJayamanne DonJayamanne removed the bug Issue identified by VS Code Team member as probable bug label Jul 30, 2021
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

5 participants