so I integrated my google cloud with the Jupyter Notebook and it seemed to be working as follows:

[I 12:13:51.633 NotebookApp] Serving notebooks from local directory: /home/kerenb1

[I 12:13:51.633 NotebookApp] The Jupyter Notebook is running at:

[I 12:13:51.633 NotebookApp] http://localhost:5000/? token=63dedf4645de55a797dff864c38721f01740048d93557092

[I 12:13:51.633 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

[C 12:13:51.636 NotebookApp]

To access the notebook, open this file in a browser:
Or copy and paste one of these URLs:

But when I did that, it told me that I had to activate my CloudShell and do Web Preview with the port that was given, but I wanted it on my Jupyter Notebook port so I did that and it said:

Error: Could not connect to Cloud Shell on port 5000. Ensure your server is listening on port 5000 and try again.

Anybody know how to solve this issue?

  • 1
    $\begingroup$ Hey, Are you using a computing instance from the google cloud platform? $\endgroup$ – Tom Feb 21 '19 at 13:03
  • $\begingroup$ Hey, Yeah. I opened up a google cloud account and have access to global and local (us east 1) resources (Compute Engine API , NVIDIA K80 GPUs). $\endgroup$ – Keren Feb 21 '19 at 17:41
  • 1
    $\begingroup$ Have you made your external IP adress of your instance static? And also under the "VPC network" and "new firewall rule", you can specify what port to listen to. $\endgroup$ – Tom Feb 21 '19 at 18:04
  • $\begingroup$ Hey, Thanks for the answer. Yes, it is static and I also specified the port, 5000. It works cause I entered it previously in order to run the jupyter notebook and I got the confirmation that it is running on that port and even how to access it but when I tried to do that, as I said, it told me that it wasn't listening on that port.. $\endgroup$ – Keren Feb 23 '19 at 18:14
  • 1
    $\begingroup$ Hmm right. Can you try to type this into your browser: <static IP>:5000 instead of copy pasting the URL as it is telling you to do. The <> is just a place holder, don't actually type it. $\endgroup$ – Tom Feb 23 '19 at 20:25

Same issue here. Oddly enough I had another instance regirested before in the same way and it all worked. Unsure what is going on, but suspecting the VM is rejecting to connect for some reason.

| improve this answer | |
  • $\begingroup$ Hello, welcome to Stack Exchange Data Science. It seems like this answer may be better suited as a comment. $\endgroup$ – Ethan Mar 4 '19 at 17:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.