Dealing with “Connection failed” in Watson Studio notebooks

Mark Ryan
3 min readAug 18, 2018

I have been using Watson Studio for over a year now to learn about machine learning and to create simple models to tackle problems in my day-to-day job (such as predicting the time to relief for Db2 tickets). I depend on Watson Studio just about every day to make progress on my ML goals and it doesn’t let me down.

However… every once in a while you can get into a state in Watson Studio where you can’t edit a notebook. This state presents a significant challenge until you learn how to get unstuck. This posting explains the symptoms of this state and how to get out of it.

Sometimes while you are editing notebooks in Watson Studio you will get into a state where the connection to the kernel fails:

When this happens you can’t make any updates to your notebook. To get out of this state, you might try leaving the notebook and reopening it. However, when you attempt to reopen the notebook, the progress indicator gets stuck at 99%:

You will get the same result for any notebook that you attempt to open. Eventually this state will resolve itself, but what to do if you can’t wait?

To get out of this state you can stop and restart the runtime for the project that contains the notebook that you want to edit.

To stop the runtime:

  • Select the Environments tab for the project
  • In the Active environment runtimes section of the Environments tab, click under Actions and select Stop

To restart the runtime, simply edit your notebook, for example by clicking on the pen icon in the notebook’s entry on the project’s Asset tab:

The runtime will restart and you should be able to go ahead and edit the notebook again.

If you still get stuck with a “400 Bad Request” message when you try edit the notebook, try the following steps:

  1. Follow these steps to clear cookies for dataplatform.cloud.ibm.com for the browser you are using
  2. Force reload the notebook with CTRL-F5

The above steps should clear the “400 Bad Request” message if you get it after stopping and restarting the runtime.

This posting explained a state that you can get into in Watson Studio where you can’t edit notebooks along with a simple way to get out of this state. This little trick has saved me a lot of time and helped me to get the most out of the great ML development environment in Watson Studio.

--

--

Mark Ryan
Mark Ryan

Written by Mark Ryan

Technical writing manager at Google. Opinions expressed are my own.

No responses yet