Skip to content
This repository has been archived by the owner. It is now read-only.

Jupyter noteboook keep reconnecting to kernels since Nov. 5th, 2018 #462

Closed
ShamrockLee opened this issue Nov 7, 2018 · 2 comments

Comments

@ShamrockLee
Copy link

@ShamrockLee ShamrockLee commented Nov 7, 2018

I use Linux Mint 19 (Ubuntu-based) and sudo apt install jupyter-notebook -f several weeks ago. It had been working well until recent days. The blue "connecting" box start flashing right after a notebook is opened and the starting the kernel disappeared no matter if I use Python, Julia, or GNU Octave kernel.
The terminal shows something like this:

shamrock@shamrock-mint64-201809:~$ jupyter-notebook
[I 20:56:19.722 NotebookApp] Writing notebook server cookie secret to /run/user/1000/jupyter/notebook_cookie_secret
[I 20:56:20.122 NotebookApp] Serving notebooks from local directory: /home/shamrock
[I 20:56:20.122 NotebookApp] 0 active kernels
[I 20:56:20.122 NotebookApp] The Jupyter Notebook is running at:
[I 20:56:20.122 NotebookApp] http://localhost:8888/?token=f1ab3239f3ee69b34a432ff3805ed614c64a506035249a4a
[I 20:56:20.122 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 20:56:20.125 NotebookApp] 
    
    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://localhost:8888/?token=f1ab3239f3ee69b34a432ff3805ed614c64a506035249a4a
[I 20:56:20.687 NotebookApp] Accepting one-time-token-authenticated connection from 127.0.0.1
[W 20:56:21.248 NotebookApp] 404 GET /static/components/moment/locale/zh-tw.js?v=20181107205619 (127.0.0.1) 11.75ms referer=http://localhost:8888/tree
[W 20:56:30.618 NotebookApp] 404 GET /static/components/moment/locale/zh-tw.js?v=20181107205619 (127.0.0.1) 1.63ms referer=http://localhost:8888/tree/%E6%96%87%E4%BB%B6
[W 20:56:33.982 NotebookApp] 404 GET /static/components/moment/locale/zh-tw.js?v=20181107205619 (127.0.0.1) 1.88ms referer=http://localhost:8888/notebooks/%E6%96%87%E4%BB%B6/ErEo_reduced_julia_restored.ipynb
[I 20:56:34.202 NotebookApp] Kernel started: 65089f54-b919-4258-8fd4-cfcceda1da2f
[W 20:56:34.264 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20181107205619 (127.0.0.1) 3.59ms referer=http://localhost:8888/notebooks/%E6%96%87%E4%BB%B6/ErEo_reduced_julia_restored.ipynb
Starting kernel event loops.
[I 20:56:43.830 NotebookApp] Adapting to protocol v5.0 for kernel 65089f54-b919-4258-8fd4-cfcceda1da2f
[E 20:56:43.831 NotebookApp] Uncaught exception GET /api/kernels/65089f54-b919-4258-8fd4-cfcceda1da2f/channels?session_id=15D7F630518B4ED884FEB6BEE15252B9 (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/api/kernels/65089f54-b919-4258-8fd4-cfcceda1da2f/channels?session_id=15D7F630518B4ED884FEB6BEE15252B9', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/home/shamrock/.local/lib/python3.6/site-packages/tornado/websocket.py", line 546, in _run_callback
        result = callback(*args, **kwargs)
      File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 258, in open
        super(ZMQChannelsHandler, self).open()
      File "/usr/lib/python3/dist-packages/notebook/base/zmqhandlers.py", line 168, in open
        self.send_ping, self.ping_interval, io_loop=loop,
    TypeError: __init__() got an unexpected keyword argument 'io_loop'
[I 20:56:44.864 NotebookApp] Adapting to protocol v5.0 for kernel 65089f54-b919-4258-8fd4-cfcceda1da2f
[E 20:56:44.864 NotebookApp] Uncaught exception GET /api/kernels/65089f54-b919-4258-8fd4-cfcceda1da2f/channels?session_id=15D7F630518B4ED884FEB6BEE15252B9 (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/api/kernels/65089f54-b919-4258-8fd4-cfcceda1da2f/channels?session_id=15D7F630518B4ED884FEB6BEE15252B9', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/home/shamrock/.local/lib/python3.6/site-packages/tornado/websocket.py", line 546, in _run_callback
        result = callback(*args, **kwargs)
      File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 258, in open
        super(ZMQChannelsHandler, self).open()
      File "/usr/lib/python3/dist-packages/notebook/base/zmqhandlers.py", line 168, in open
        self.send_ping, self.ping_interval, io_loop=loop,
    TypeError: __init__() got an unexpected keyword argument 'io_loop'
[I 20:56:45.887 NotebookApp] Adapting to protocol v5.0 for kernel 65089f54-b919-4258-8fd4-cfcceda1da2f
[E 20:56:45.888 NotebookApp] Uncaught exception GET /api/kernels/65089f54-b919-4258-8fd4-cfcceda1da2f/channels?session_id=15D7F630518B4ED884FEB6BEE15252B9 (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/api/kernels/65089f54-b919-4258-8fd4-cfcceda1da2f/channels?session_id=15D7F630518B4ED884FEB6BEE15252B9', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/home/shamrock/.local/lib/python3.6/site-packages/tornado/websocket.py", line 546, in _run_callback
        result = callback(*args, **kwargs)
      File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 258, in open
        super(ZMQChannelsHandler, self).open()
      File "/usr/lib/python3/dist-packages/notebook/base/zmqhandlers.py", line 168, in open
        self.send_ping, self.ping_interval, io_loop=loop,
    TypeError: __init__() got an unexpected keyword argument 'io_loop'
[I 20:56:46.912 NotebookApp] Adapting to protocol v5.0 for kernel 65089f54-b919-4258-8fd4-cfcceda1da2f
[E 20:56:46.913 NotebookApp] Uncaught exception GET /api/kernels/65089f54-b919-4258-8fd4-cfcceda1da2f/channels?session_id=15D7F630518B4ED884FEB6BEE15252B9 (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/api/kernels/65089f54-b919-4258-8fd4-cfcceda1da2f/channels?session_id=15D7F630518B4ED884FEB6BEE15252B9', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/home/shamrock/.local/lib/python3.6/site-packages/tornado/websocket.py", line 546, in _run_callback
        result = callback(*args, **kwargs)
      File "/usr/lib/python3/dist-packages/notebook/services/kernels/handlers.py", line 258, in open
        super(ZMQChannelsHandler, self).open()
      File "/usr/lib/python3/dist-packages/notebook/base/zmqhandlers.py", line 168, in open
        self.send_ping, self.ping_interval, io_loop=loop,
    TypeError: __init__() got an unexpected keyword argument 'io_loop'

This makes it unable to use. Hope there is a solution or a work-around that can make it work again.

@ShamrockLee

This comment has been minimized.

Copy link
Author

@ShamrockLee ShamrockLee commented Nov 8, 2018

Solved by python3 -m pip install --upgrade notebook.
Thanks @minrk on Gitter jupyter/notebook for his help.
My pip3 list was

DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
apt-clone (0.2.1)
apturl (0.5.2)
astroid (2.0.4)
autopep8 (1.4)
backcall (0.1.0)
beautifulsoup4 (4.6.0)
bleach (2.1.2)
Brlapi (0.6.6)
certifi (2018.1.18)
cffi (1.11.5)
chardet (3.0.4)
command-not-found (0.3)
configobj (5.0.6)
cupshelpers (1.0)
cycler (0.10.0)
decorator (4.3.0)
defer (1.0.6)
entrypoints (0.2.3.post1)
flake8 (3.5.0)
html5lib (0.999999999)
httplib2 (0.9.2)
idna (2.6)
ipykernel (5.1.0)
ipython (7.1.1)
ipython-genutils (0.2.0)
isort (4.3.4)
jedi (0.13.1)
Jinja2 (2.10)
jsonschema (2.6.0)
jupyter-client (5.2.3)
jupyter-console (5.2.0)
jupyter-core (4.4.0)
kiwisolver (1.0.1)
lazy-object-proxy (1.3.1)
louis (3.5.0)
macaroonbakery (1.1.3)
Mako (1.0.7)
MarkupSafe (1.0)
matplotlib (3.0.0)
mccabe (0.6.1)
metakernel (0.20.14)
mistune (0.8.3)
mpmath (1.0.0)
nbconvert (5.3.1)
nbformat (4.4.0)
netifaces (0.10.4)
notebook (5.2.2)
numpy (1.15.4)
octave-kernel (0.28.4)
onboard (1.4.1)
PAM (0.4.2)
pandocfilters (1.4.2)
parso (0.3.1)
pep8 (1.7.1)
pexpect (4.6.0)
pickleshare (0.7.5)
Pillow (5.3.0)
pip (9.0.1)
prompt-toolkit (2.0.7)
protobuf (3.0.0)
psutil (5.4.2)
ptyprocess (0.6.0)
pycairo (1.16.2)
pycodestyle (2.4.0)
pycparser (2.19)
pycrypto (2.6.1)
pycups (1.9.73)
pycurl (7.43.0.1)
pyflakes (1.6.0)
Pygments (2.2.0)
pygobject (3.26.1)
PyICU (1.9.8)
pyinotify (0.9.6)
pylint (2.1.1)
pymacaroons (0.13.0)
PyNaCl (1.1.2)
pyparsing (2.2.1)
pyRFC3339 (1.0)
PySoundFile (0.9.0.post1)
python-apt (1.6.3)
python-dateutil (2.7.5)
python-debian (0.1.32)
python-xapp (1.2.0)
python-xlib (0.20)
pytz (2018.3)
pyxdg (0.25)
PyYAML (3.12)
pyzmq (17.1.2)
Radicale (2.1.10)
reportlab (3.4.0)
requests (2.18.4)
requests-unixsocket (0.1.5)
rope (0.11.0)
scipy (1.1.0)
sessioninstaller (0.0.0)
setproctitle (1.1.10)
setuptools (40.5.0)
simplegeneric (0.8.1)
six (1.11.0)
sympy (1.3)
system-service (0.3)
systemd-python (234)
terminado (0.7)
testpath (0.3.1)
thonny (2.1.16)
tornado (5.1.1)
traitlets (4.3.2)
typed-ast (1.1.0)
ubuntu-drivers-common (0.0.0)
ufw (0.35)
urllib3 (1.22)
vobject (0.9.6.1)
wcwidth (0.1.7)
webencodings (0.5)
wrapt (1.10.11)
xkit (0.0.0)

and notebook is now notebook (5.7.0).

@ShamrockLee

This comment has been minimized.

Copy link
Author

@ShamrockLee ShamrockLee commented Nov 8, 2018

@ShamrockLee ShamrockLee closed this Nov 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
1 participant
You can’t perform that action at this time.