You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Restarting a Jupyter Notebook with SoS kernel crashes each time with the following error logs:
Traceback (most recent call last):
File "/opt/conda/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/opt/conda/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/opt/conda/lib/python3.9/site-packages/sos_notebook/kernel.py", line 1956, in
IPKernelApp.launch_instance(kernel_class=SoS_Kernel)
File "/opt/conda/lib/python3.9/site-packages/traitlets/config/application.py", line 844, in launch_instance
app.initialize(argv)
File "/opt/conda/lib/python3.9/site-packages/traitlets/config/application.py", line 87, in inner
return method(app, *args, **kwargs)
File "/opt/conda/lib/python3.9/site-packages/ipykernel/kernelapp.py", line 567, in initialize
self.init_sockets()
File "/opt/conda/lib/python3.9/site-packages/ipykernel/kernelapp.py", line 271, in init_sockets
self.shell_port = self._bind_socket(self.shell_socket, self.shell_port)
File "/opt/conda/lib/python3.9/site-packages/ipykernel/kernelapp.py", line 218, in _bind_socket
return self._try_bind_socket(s, port)
File "/opt/conda/lib/python3.9/site-packages/ipykernel/kernelapp.py", line 194, in _try_bind_socket
s.bind("tcp://%s:%i" % (self.ip, port))
File "/opt/conda/lib/python3.9/site-packages/zmq/sugar/socket.py", line 172, in bind
super().bind(addr)
File "zmq/backend/cython/socket.pyx", line 540, in zmq.backend.cython.socket.Socket.bind
File "zmq/backend/cython/checkrc.pxd", line 28, in zmq.backend.cython.checkrc._check_rc
zmq.error.ZMQError: Address already in use
It tries restarting the kernel for five times, then the SoS Kernel is dead with the following log and screenshot.
Future exception was never retrieved
future: <Future finished exception=RuntimeError('Restart failed')>
RuntimeError: Restart failed
Clicking on "Try Restarting Now" actually work, but this should not be the "appropriate" way to restart the kernel and causes a bad user experience.
Steps to reproduce the error
I created a very simple Dockerfile to reproduce the error.
FROM jupyter/base-notebook
# Install python dependenciesRUN pip3 install sos-notebook==0.22.4
RUN pip3 install sos==0.22.4
RUN python -m sos_notebook.install
USER jovyan
CMD ["jupyter", "notebook", "--ip", "0.0.0.0"]
Put the above content into a Dockerfile
Open a terminal in that directory and execute docker build . -t sos-test
Run the docker container with docker run -p 8888:8888 sos-test
Open the Jupyter Notebook
Create a new Notebook with SoS Kernel
Execute any python command in that notebook, e.g. print("hi")
Restart the kernel
The text was updated successfully, but these errors were encountered:
This looks scary and might be caused by recent releases of jupyter notebook and/or python. Anyway, the focus of development of the sos notebook project has long been moved to jupyterlab. Is there any reason you cannot use the jupyterlab frontend?
This looks scary and might be caused by recent releases of jupyter notebook and/or python. Anyway, the focus of development of the sos notebook project has long been moved to jupyterlab. Is there any reason you cannot use the jupyterlab frontend?
Thanks for your quick reply and investigation. We are developing a custom Jupyter kernel and want to provide a Binder link. The main reason why we are not using the jupyterlab frontend is because we found the integration with Binder to be very difficult, especially when installing the required jupyterlab extensions. We might try that route again.
Problem
Restarting a Jupyter Notebook with SoS kernel crashes each time with the following error logs:
It tries restarting the kernel for five times, then the SoS Kernel is dead with the following log and screenshot.
Clicking on "Try Restarting Now" actually work, but this should not be the "appropriate" way to restart the kernel and causes a bad user experience.
Steps to reproduce the error
I created a very simple Dockerfile to reproduce the error.
docker build . -t sos-test
docker run -p 8888:8888 sos-test
print("hi")
The text was updated successfully, but these errors were encountered: