google-compute-engine – Unable to Open JupyterLab on Google Compute Notebook Instance

google-compute-engine

I am unable to access Jupyterlab for a couple of days now using the AI Platform > Notebook instances > Open Jupyterlab. I used the + New Instance option and launched a Tensorflow machine but when I click on the Open Jupyterlab button, it only gives me

504. That’s an error.

That’s all we know.

I have tried downgrading the notebook version and restarting service as suggested here.

sudo pip3 install notebook==5.7.5
sudo service jupyter restart

This brings me to the familiar Jupyterlab screen but then does not persist (I mean when I log back in to the instance, Jupyterlab still throws up the same error).

Is this a bug in Jupyterlab? Any solution?

Best Answer

Rather than use the Notebook instance interface, a better way to use the awesome Jupyterlab is to directly open up the Firewall on TCP 8888 (or any of your choice) and set the IP address of the instance to static. Essentially, there are two steps:

  1. Make the instance accessible through a static IP
  2. Make the Jupyterlab app in the VM to re-route to the IP

The detailed procedure is here

Related Topic