0

Using my instituite's net access which is through aproxy server, I can access my IBMCloud account, my dashboard, my projects, but when I go on to edit a notebook, the kernel just never connects. It keeps retrying and finally says:

Connecting to the notebook kernel is taking far longer than expected. The kernel will be automatically restarted.

When I try the same from my personal laptop using a non-proxied server, everything works fine. So I figure it's the proxy that's issue here. Any fix for using IBM Watson Studio Notebooks using a proxy-server?

1 Answer 1

0

I have never used IBM Watson Studio notebooks, but since it is based on Jupyter, setting up proxy for Jupyter should solve your problem. For example, see this Stackoverflow question.

Set proxy in notebook

Set proxy within your notebook

In [1]: import os
        os.environ['http_proxy'] = "http://user:passwd@host:port" 
        os.environ['https_proxy'] = "https://user:passwd@host:port" 
In [2]: import requests
        requests.get("http://google.com")
Out[2]: <Response [200]>

Set your OS' proxy settings

In your Jupyter notebook

import sys,os,os.path
os.environ['http_proxy']="http://user:passwd@host:port"
os.environ['https_proxy']="http://user:passwd@host:port"

Add proxy to Notebook Startup

Edit ~/.jupyter/profile_myserver/startup/00-startup.py with proxy settings

import sys,os,os.path
os.environ['http_proxy']="http://proxy.example.com:80"
os.environ['https_proxy']="https://proxy.example.com:443"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .