For some odd reason, after last night my jupyter kernel wouldn't start so I went ahead and removed it and pip3 installed it and now everytime I run jupyter notebook Im getting the following long stack trace in the termninal
[I 14:59:43.566 NotebookApp] Writing notebook server cookie secret to /run/user/1000/jupyter/notebook_cookie_secret
[I 14:59:43.885 NotebookApp] Serving notebooks from local directory: /home/dmitri/machine_learning/airbusShipDetection
[I 14:59:43.885 NotebookApp] The Jupyter Notebook is running at:
[I 14:59:43.885 NotebookApp] http://localhost:8888/?token=b98d3bd1ec284b81559e0a865c14d6a0932e0725a99d811d
[I 14:59:43.885 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 14:59:43.885 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=b98d3bd1ec284b81559e0a865c14d6a0932e0725a99d811d
[I 14:59:44.624 NotebookApp] Accepting one-time-token-authenticated connection from 127.0.0.1
[I 14:59:48.412 NotebookApp] Kernel started: 15342e49-8fc3-402c-9964-eb8f4e2324c5
Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/dmitri/.local/lib/python3.5/site-packages/ipykernel_launcher.py", line 16, in <module>
app.launch_new_instance()
File "/home/dmitri/.local/lib/python3.5/site-packages/traitlets/config/application.py", line 658, in launch_instance
app.start()
File "/home/dmitri/.local/lib/python3.5/site-packages/ipykernel/kernelapp.py", line 477, in start
ioloop.IOLoop.instance().start()
File "/usr/local/lib/python3.5/dist-packages/tornado/platform/asyncio.py", line 132, in start
self.asyncio_loop.run_forever()
File "/usr/lib/python3.5/asyncio/base_events.py", line 340, in run_forever
raise RuntimeError('Event loop is running.')
RuntimeError: Event loop is running.
ERROR:tornado.general:Uncaught exception in ZMQStream callback
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/zmq/eventloop/zmqstream.py", line 432, in _run_callback
callback(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/tornado/stack_context.py", line 300, in null_wrapper
return fn(*args, **kwargs)
File "/home/dmitri/.local/lib/python3.5/site-packages/ipykernel/kernelbase.py", line 283, in dispatcher
return self.dispatch_shell(stream, msg)
File "/home/dmitri/.local/lib/python3.5/site-packages/ipykernel/kernelbase.py", line 233, in dispatch_shell
self.pre_handler_hook()
File "/home/dmitri/.local/lib/python3.5/site-packages/ipykernel/kernelbase.py", line 248, in pre_handler_hook
self.saved_sigint_handler = signal(SIGINT, default_int_handler)
File "/usr/lib/python3.5/signal.py", line 47, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread
ERROR:tornado.general:Uncaught exception in zmqstream callback
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/zmq/eventloop/zmqstream.py", line 450, in _handle_events
self._handle_recv()
File "/usr/local/lib/python3.5/dist-packages/zmq/eventloop/zmqstream.py", line 480, in _handle_recv
self._run_callback(callback, msg)
File "/usr/local/lib/python3.5/dist-packages/zmq/eventloop/zmqstream.py", line 432, in _run_callback
callback(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/tornado/stack_context.py", line 300, in null_wrapper
return fn(*args, **kwargs)
File "/home/dmitri/.local/lib/python3.5/site-packages/ipykernel/kernelbase.py", line 283, in dispatcher
return self.dispatch_shell(stream, msg)
File "/home/dmitri/.local/lib/python3.5/site-packages/ipykernel/kernelbase.py", line 233, in dispatch_shell
self.pre_handler_hook()
File "/home/dmitri/.local/lib/python3.5/site-packages/ipykernel/kernelbase.py", line 248, in pre_handler_hook
self.saved_sigint_handler = signal(SIGINT, default_int_handler)
File "/usr/lib/python3.5/signal.py", line 47, in signal
handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread
[W 15:00:48.619 NotebookApp] Timeout waiting for kernel_info reply from 15342e49-8fc3-402c-9964-eb8f4e2324c5
[I 15:01:49.148 NotebookApp] Saving file at /u-net-model-with-submission.ipynb
^C[I 15:02:46.820 NotebookApp] interrupted
Serving notebooks from local directory: /home/dmitri/machine_learning/airbusShipDetection
1 active kernel
The Jupyter Notebook is running at:
The notebook itself says the kernel is loading, but it never finishes loading.
I had the same problem after upgrading notebook.
Upgrading tornado and ipykernel fixed it for me.
If you use the following commands in your terminal, it should work:
pip install tornado==5.1.1
and
pip install -U ipykernel
After rolling back "tornado" and updating "ipykernel" everything worked.
Related
Message
Build of instance 15f7f7e3-408f-414e-a1f3-ba3f83b1b2d5 aborted: Volume aaf13a40-c6a0-4829-9992-69157c914d1e did not finish being created even after we waited 261 seconds or 61 attempts. And its status is downloading.
Code
500
Details
Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/nova/compute/manager.py", line 1992, in _prep_block_device wait_func=self._await_block_device_map_created) File "/usr/lib/python3.6/site-packages/nova/virt/block_device.py", line 874, in attach_block_devices _log_and_attach(device) File "/usr/lib/python3.6/site-packages/nova/virt/block_device.py", line 871, in _log_and_attach bdm.attach(*attach_args, **attach_kwargs) File "/usr/lib/python3.6/site-packages/nova/virt/block_device.py", line 771, in attach wait_func=wait_func, image_id=self.image_id) File "/usr/lib/python3.6/site-packages/nova/virt/block_device.py", line 384, in _create_volume self._call_wait_func(context, wait_func, volume_api, vol['id']) File "/usr/lib/python3.6/site-packages/nova/virt/block_device.py", line 731, in _call_wait_func {'volume_id': volume_id, 'exc': exc}) File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__ self.force_reraise() File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise six.reraise(self.type_, self.value, self.tb) File "/usr/lib/python3.6/site-packages/six.py", line 703, in reraise raise value File "/usr/lib/python3.6/site-packages/nova/virt/block_device.py", line 721, in _call_wait_func wait_func(context, volume_id) File "/usr/lib/python3.6/site-packages/nova/compute/manager.py", line 1611, in _await_block_device_map_created volume_status=volume_status) nova.exception.VolumeNotCreated: Volume aaf13a40-c6a0-4829-9992-69157c914d1e did not finish being created even after we waited 261 seconds or 61 attempts. And its status is downloading. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/nova/compute/manager.py", line 2629, in _build_resources block_device_mapping) File "/usr/lib/python3.6/site-packages/nova/compute/manager.py", line 2010, in _prep_block_device raise exception.InvalidBDM(six.text_type(ex)) nova.exception.InvalidBDM: Volume aaf13a40-c6a0-4829-9992-69157c914d1e did not finish being created even after we waited 261 seconds or 61 attempts. And its status is downloading. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/nova/compute/manager.py", line 2250, in _do_build_and_run_instance filter_properties, request_spec, accel_uuids) File "/usr/lib/python3.6/site-packages/nova/compute/manager.py", line 2462, in _build_and_run_instance bdms=block_device_mapping, tb=tb) File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__ self.force_reraise() File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise six.reraise(self.type_, self.value, self.tb) File "/usr/lib/python3.6/site-packages/six.py", line 703, in reraise raise value File "/usr/lib/python3.6/site-packages/nova/compute/manager.py", line 2410, in _build_and_run_instance accel_uuids) as resources: File "/usr/lib64/python3.6/contextlib.py", line 81, in __enter__ return next(self.gen) File "/usr/lib/python3.6/site-packages/nova/compute/manager.py", line 2639, in _build_resources reason=e.format_message()) nova.exception.BuildAbortException: Build of instance 15f7f7e3-408f-414e-a1f3-ba3f83b1b2d5 aborted: Volume aaf13a40-c6a0-4829-9992-69157c914d1e did not finish being created even after we waited 261 seconds or 61 attempts. And its status is downloading.
I Installed OpenStack ussuri in centos 8. everything working fine I tried to launch the instance when launching the instance it showed Build of instance 15f7f7e3-408f-414e-a1f3-ba3f83b1b2d5 aborted: Volume aaf13a40-c6a0-4829-9992-69157c914d1e did not finish being created even after we waited 261 seconds or 61 attempts. And its status is downloading.
I am trying to solve the problem of my Jupyter notebook not being able to run r code in its r kernel because of a disconnection issue. I am running Jupyter on a Mac with BigSur 11.6 and the notebook opens right until I try to run a cell when the kernel lose the connection and becomes connecting to kernel showing the information below, but it never reconnects:
Last login: Wed Oct 6 12:40:11 on ttys001
/opt/anaconda3/envs/entornor/bin/jupyter_mac.command ; exit;
(base) fersaol#MacBook-Air-de-fersaol ~ % /opt/anaconda3/envs/entornor/bin/jupyter_mac.command ; exit;
[I 13:33:25.566 NotebookApp] The port 8888 is already in use, trying another port.
[I 13:33:25.567 NotebookApp] Serving notebooks from local directory: /Users/fersaol
[I 13:33:25.567 NotebookApp] Jupyter Notebook 6.4.3 is running at:
[I 13:33:25.567 NotebookApp] http://localhost:8889/?token=9a9e27f00fcdc90028309fc5676e2548f6cbd2e6acb79550
[I 13:33:25.567 NotebookApp] or http://127.0.0.1:8889/?token=9a9e27f00fcdc90028309fc5676e2548f6cbd2e6acb79550
[I 13:33:25.567 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 13:33:25.570 NotebookApp]
To access the notebook, open this file in a browser:
file:///Users/fersaol/Library/Jupyter/runtime/nbserver-9257-open.html
Or copy and paste one of these URLs:
http://localhost:8889/?token=9a9e27f00fcdc90028309fc5676e2548f6cbd2e6acb79550
or http://127.0.0.1:8889/?token=9a9e27f00fcdc90028309fc5676e2548f6cbd2e6acb79550
/opt/anaconda3/envs/entornor/lib/python3.8/json/encoder.py:257: UserWarning: date_default is deprecated since jupyter_client 7.0.0. Use jupyter_client.jsonutil.json_default.
return _iterencode(o, 0)
[W 13:33:32.946 NotebookApp] Notebook INSPYR/Curso Data Analytics 2021_2022/R/kernel_R_blank.ipynb is not trusted
ERROR:asyncio:Exception in callback <TaskWakeupMethWrapper object at 0x7fc5f002d5b0>(<Future finis...late\r\n\r\n'>)
handle: <Handle <TaskWakeupMethWrapper object at 0x7fc5f002d5b0>(<Future finis...late\r\n\r\n'>)>
Traceback (most recent call last):
File "/opt/anaconda3/envs/entornor/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
RuntimeError: Cannot enter into task <Task pending name='Task-4' coro=<HTTP1ServerConnection._server_request_loop() running at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/http1connection.py:823> wait_for=<Future finished result=b'GET /kernel...flate\r\n\r\n'> cb=[IOLoop.add_future.<locals>.<lambda>() at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/ioloop.py:688]> while another task <Task pending name='Task-1' coro=<MultiKernelManager._async_start_kernel() running at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/jupyter_client/multikernelmanager.py:186>> is being executed.
ERROR:asyncio:Exception in callback <TaskWakeupMethWrapper object at 0x7fc611af0fd0>(<Future finis...uest\r\n\r\n'>)
handle: <Handle <TaskWakeupMethWrapper object at 0x7fc611af0fd0>(<Future finis...uest\r\n\r\n'>)>
Traceback (most recent call last):
File "/opt/anaconda3/envs/entornor/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
RuntimeError: Cannot enter into task <Task pending name='Task-5' coro=<HTTP1ServerConnection._server_request_loop() running at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/http1connection.py:823> wait_for=<Future finished result=b'GET /api/co...quest\r\n\r\n'> cb=[IOLoop.add_future.<locals>.<lambda>() at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/ioloop.py:688]> while another task <Task pending name='Task-2' coro=<KernelManager._async_start_kernel() running at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/jupyter_client/manager.py:331>> is being executed.
ERROR:asyncio:Exception in callback <TaskWakeupMethWrapper object at 0x7fc5f002da60>(<Future finis...late\r\n\r\n'>)
handle: <Handle <TaskWakeupMethWrapper object at 0x7fc5f002da60>(<Future finis...late\r\n\r\n'>)>
Traceback (most recent call last):
File "/opt/anaconda3/envs/entornor/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
RuntimeError: Cannot enter into task <Task pending name='Task-12' coro=<HTTP1ServerConnection._server_request_loop() running at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/http1connection.py:823> wait_for=<Future finished result=b'GET /custom...flate\r\n\r\n'> cb=[IOLoop.add_future.<locals>.<lambda>() at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/ioloop.py:688]> while another task <Task pending name='Task-36' coro=<MappingKernelManager.start_kernel() running at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/notebook/services/kernels/kernelmanager.py:176> cb=[IOLoop.add_future.<locals>.<lambda>() at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/ioloop.py:688]> is being executed.
ERROR:asyncio:Exception in callback <TaskWakeupMethWrapper object at 0x7fc5f002d790>(<Future finis...late\r\n\r\n'>)
handle: <Handle <TaskWakeupMethWrapper object at 0x7fc5f002d790>(<Future finis...late\r\n\r\n'>)>
Traceback (most recent call last):
File "/opt/anaconda3/envs/entornor/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
RuntimeError: Cannot enter into task <Task pending name='Task-13' coro=<HTTP1ServerConnection._server_request_loop() running at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/http1connection.py:823> wait_for=<Future finished result=b'GET /static...flate\r\n\r\n'> cb=[IOLoop.add_future.<locals>.<lambda>() at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/ioloop.py:688]> while another task <Task pending name='Task-36' coro=<MappingKernelManager.start_kernel() running at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/notebook/services/kernels/kernelmanager.py:176> cb=[IOLoop.add_future.<locals>.<lambda>() at /opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/ioloop.py:688]> is being executed.
[I 13:33:33.022 NotebookApp] Kernel started: 4c13344d-0183-4a69-ae2f-b096e0381969, name: ir
[W 13:33:33.029 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20211006133325 (::1) 8.840000ms referer=http://localhost:8889/notebooks/INSPYR/Curso%20Data%20Analytics%202021_2022/R/kernel_R_blank.ipynb
dyld: Library not loaded: #rpath/libreadline.6.2.dylib
Referenced from: /opt/anaconda3/lib/R/lib/libR.dylib
Reason: image not found
[I 13:33:36.025 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
dyld: Library not loaded: #rpath/libreadline.6.2.dylib
Referenced from: /opt/anaconda3/lib/R/lib/libR.dylib
Reason: image not found
[W 13:34:33.048 NotebookApp] Timeout waiting for kernel_info reply from 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:34:37.607 NotebookApp] Nudge: attempt 10 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:34:42.648 NotebookApp] Nudge: attempt 20 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:34:47.703 NotebookApp] Nudge: attempt 30 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:34:52.761 NotebookApp] Nudge: attempt 40 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:34:57.822 NotebookApp] Nudge: attempt 50 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:35:02.875 NotebookApp] Nudge: attempt 60 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:35:07.927 NotebookApp] Nudge: attempt 70 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:35:12.986 NotebookApp] Nudge: attempt 80 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:35:18.039 NotebookApp] Nudge: attempt 90 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:35:23.096 NotebookApp] Nudge: attempt 100 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
[W 13:35:28.146 NotebookApp] Nudge: attempt 110 on kernel 4c13344d-0183-4a69-ae2f-b096e0381969
/opt/anaconda3/envs/entornor/lib/python3.8/json/encoder.py:257: UserWarning: date_default is deprecated since jupyter_client 7.0.0. Use jupyter_client.jsonutil.json_default.
return _iterencode(o, 0)
[I 13:35:33.001 NotebookApp] Saving file at /INSPYR/Curso Data Analytics 2021_2022/R/kernel_R_blank.ipynb
[E 13:35:33.058 NotebookApp] Uncaught exception GET /api/kernels/4c13344d-0183-4a69-ae2f-b096e0381969/channels?session_id=a668eb1aa6fd463ea8422ed32d825314 (::1)
HTTPServerRequest(protocol='http', host='localhost:8889', method='GET', uri='/api/kernels/4c13344d-0183-4a69-ae2f-b096e0381969/channels?session_id=a668eb1aa6fd463ea8422ed32d825314', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
File "/opt/anaconda3/envs/entornor/lib/python3.8/site-packages/tornado/websocket.py", line 956, in _accept_connection
await open_result
File "/opt/anaconda3/envs/entornor/lib/python3.8/asyncio/tasks.py", line 349, in __wakeup
future.result()
tornado.util.TimeoutError: Timeout
[W 13:35:34.076 NotebookApp] Replacing stale connection: 4c13344d-0183-4a69-ae2f-b096e0381969:a668eb1aa6fd463ea8422ed32d825314
You can use Visual Studio Code instead which spins up Jupyter notebook as well
You can put Jupyter and R into a docker container to isolate it from your system to minimize errors
You can try a fresh python env (Seems that the package asyncio is broken)
I am trying to use the Jupyter notebook from a remote server using the server's IP address and have followed the suggestions from this SO question:
Why I can't access remote Jupyter Notebook server?
The following command has worked in all the server instances but I am facing issue with one particular instance:
jupyter notebook --ip xx.xx.xx.xx --port 8889 --allow-root
In this particular server instance, this throws the following error:
File "/root/anaconda3/bin/jupyter-notebook", line 11, in <module>
sys.exit(main())
File "/root/anaconda3/lib/python3.8/site-packages/jupyter_core/application.py", line 270, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/root/anaconda3/lib/python3.8/site-packages/traitlets/config/application.py", line 663, in launch_instance
app.initialize(argv)
File "<decorator-gen-7>", line 2, in initialize
File "/root/anaconda3/lib/python3.8/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/root/anaconda3/lib/python3.8/site-packages/notebook/notebookapp.py", line 1769, in initialize
self.init_webapp()
File "/root/anaconda3/lib/python3.8/site-packages/notebook/notebookapp.py", line 1490, in init_webapp
self.http_server.listen(port, self.ip)
File "/root/anaconda3/lib/python3.8/site-packages/tornado/tcpserver.py", line 151, in listen
sockets = bind_sockets(port, address=address)
File "/root/anaconda3/lib/python3.8/site-packages/tornado/netutil.py", line 174, in bind_sockets
sock.bind(sockaddr)
OSError: [Errno 99] Cannot assign requested address
The issue seems to be with the use of IP address and not the port despite the following settings on jupyter_notebook_config.py
c.NotebookApp.ip = '0.0.0.0'
c.NotebookApp.allow_origin = '*'
c.NotebookApp.allow_remote_access = True
I have looked at solutions on SO and Github and most of them are for localhost and not specific IP addresses.
Can someone point to what could be the issue? Thank you.
I have set up a single server with Google Auth Jupyterhub using Docker. You can find the setup scripts here - https://github.com/deepakputhraya/jupyterhub. The setup works well with multiple users able to login with separate home directories.
The problem arises when I update the Dockerfile or requirements.txt file and restart the server. Users whose accounts are created can log in but cannot access their home folders.
[ec2-user#ip-10-0-1-196 ~]$ sudo docker exec -it jupyterhub /bin/sh
# ls -lah /home
total 64K
drwxr-xr-x 16 root root 4.0K Oct 18 10:17 .
drwxr-xr-x 1 root root 4.0K Sep 4 15:46 ..
drwxr-xr-x 15 abhilash abhilash 4.0K Oct 31 10:51 abhilash
drwxr-xr-x 9 ajay ajay 4.0K Oct 10 09:11 ajay
drwxr-xr-x 8 abhilash abhilash 4.0K Sep 2 11:05 akshay
drwxr-xr-x 7 deepak deepak 4.0K Oct 4 12:20 deepak
Logs:
[I 2019-10-31 14:57:14.985 JupyterHub log:174] 200 GET /hub/spawn-pending/deepak (deepak#127.0.0.1) 38.35ms
[I 2019-10-31 14:57:17.321 JupyterHub spawner:1387] Spawning jupyterhub-singleuser --port=34405 --NotebookApp.default_url=/lab
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/site-packages/traitlets/traitlets.py", line 528, in get
value = obj._trait_values[self.name]
KeyError: 'runtime_dir'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/bin/jupyterhub-singleuser", line 10, in <module>
sys.exit(main())
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/singleuser.py", line 660, in main
return SingleUserNotebookApp.launch_instance(argv)
File "/opt/conda/lib/python3.6/site-packages/jupyter_core/application.py", line 268, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/opt/conda/lib/python3.6/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/singleuser.py", line 558, in initialize
return super().initialize(argv)
File "</opt/conda/lib/python3.6/site-packages/decorator.py:decorator-gen-7>", line 2, in initialize
File "/opt/conda/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/opt/conda/lib/python3.6/site-packages/notebook/notebookapp.py", line 1676, in initialize
self.init_configurables()
File "/opt/conda/lib/python3.6/site-packages/notebook/notebookapp.py", line 1349, in init_configurables
connection_dir=self.runtime_dir,
File "/opt/conda/lib/python3.6/site-packages/traitlets/traitlets.py", line 556, in __get__
return self.get(obj, cls)
File "/opt/conda/lib/python3.6/site-packages/traitlets/traitlets.py", line 535, in get
value = self._validate(obj, dynamic_default())
File "/opt/conda/lib/python3.6/site-packages/jupyter_core/application.py", line 99, in _runtime_dir_default
ensure_dir_exists(rd, mode=0o700)
File "/opt/conda/lib/python3.6/site-packages/jupyter_core/utils/__init__.py", line 13, in ensure_dir_exists
os.makedirs(path, mode=mode)
File "/opt/conda/lib/python3.6/os.py", line 210, in makedirs
makedirs(head, mode, exist_ok)
File "/opt/conda/lib/python3.6/os.py", line 210, in makedirs
makedirs(head, mode, exist_ok)
File "/opt/conda/lib/python3.6/os.py", line 210, in makedirs
makedirs(head, mode, exist_ok)
[Previous line repeated 1 more time]
File "/opt/conda/lib/python3.6/os.py", line 220, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/home/deepak'
[I 2019-10-31 14:57:18.274 JupyterHub log:174] 302 GET /hub/spawn/deepak -> /hub/spawn-pending/deepak (deepak#127.0.0.1) 1014.98ms
[I 2019-10-31 14:57:18.332 JupyterHub pages:303] deepak is pending spawn
[I 2019-10-31 14:57:18.335 JupyterHub log:174] 200 GET /hub/spawn-pending/deepak (deepak#127.0.0.1) 17.16ms
ERROR:asyncio:Task exception was never retrieved
future: <Task finished coro=<BaseHandler.spawn_single_user() done, defined at /opt/conda/lib/python3.6/site-packages/jupyterhub/handlers/base.py:697> exception=HTTPError()>
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/handlers/base.py", line 889, in spawn_single_user
timedelta(seconds=self.slow_spawn_timeout), finish_spawn_future
tornado.util.TimeoutError: Timeout
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/handlers/base.py", line 922, in spawn_single_user
% (status, spawner._log_name),
tornado.web.HTTPError: HTTP 500: Internal Server Error (Spawner failed to start [status=1]. The logs for deepak may contain details.)
[W 2019-10-31 14:57:44.492 JupyterHub user:678] deepak's server never showed up at http://127.0.0.1:34405/user/deepak/ after 30 seconds. Giving up
[E 2019-10-31 14:57:44.530 JupyterHub gen:593] Exception in Future <Task finished coro=<BaseHandler.spawn_single_user.<locals>.finish_user_spawn() done, defined at /opt/conda/lib/python3.6/site-packages/jupyterhub/handlers/base.py:800> exception=TimeoutError("Server at http://127.0.0.1:34405/user/deepak/ didn't respond in 30 seconds",)> after timeout
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/site-packages/tornado/gen.py", line 589, in error_callback
future.result()
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/handlers/base.py", line 807, in finish_user_spawn
await spawn_future
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/user.py", line 654, in spawn
await self._wait_up(spawner)
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/user.py", line 701, in _wait_up
raise e
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/user.py", line 669, in _wait_up
http=True, timeout=spawner.http_timeout, ssl_context=ssl_context
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/utils.py", line 234, in wait_for_http_server
timeout=timeout,
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/utils.py", line 177, in exponential_backoff
raise TimeoutError(fail_message)
TimeoutError: Server at http://127.0.0.1:34405/user/deepak/ didn't respond in 30 seconds
The folder permissions for user akshay is that of abhilash. New users who signup for the first time do not have this issue. Again this only happens when there is an update to Docker image. If I were to restart the server, it neither fixes the issue nor changes the user folder permissions map for other users.
Why are the permissions getting mismatched? How can this be fixed?
I installed the El Capitan beta on a spare computer for test purposes to try to identify potential issues before others in our data science team upgrade their day to day machines once the final release is out sometime this fall (Note: I can navigate around Unix but I am far from a Mac programmer). The kernels for python 2 and 3 work just fine, but when I try to load the R kernel I get the following messages:
From within the Jupyter notebook itself I get:
Traceback (most recent call last):
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/base/handlers.py", line 365, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/services/sessions/handlers.py", line 53, in post
model = sm.create_session(path=path, kernel_name=kernel_name)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/services/sessions/sessionmanager.py", line 66, in create_session
kernel_name=kernel_name)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/services/kernels/kernelmanager.py", line 84, in start_kernel
kernel_name=kernel_name, **kwargs)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/multikernelmanager.py", line 112, in start_kernel
km.start_kernel(**kwargs)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/manager.py", line 240, in start_kernel
**kw)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/manager.py", line 189, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/launcher.py", line 213, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/Users/test/anaconda/lib/python3.4/subprocess.py", line 859, in __init__
restore_signals, start_new_session)
File "/Users/test/anaconda/lib/python3.4/subprocess.py", line 1457, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'R'
And I get the following error messages in the Terminal.
[E 19:44:58.862 NotebookApp] Unhandled error in API request
Traceback (most recent call last):
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/base/handlers.py", line 365, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/services/sessions/handlers.py", line 53, in post
model = sm.create_session(path=path, kernel_name=kernel_name)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/services/sessions/sessionmanager.py", line 66, in create_session
kernel_name=kernel_name)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/html/services/kernels/kernelmanager.py", line 84, in start_kernel
kernel_name=kernel_name, **kwargs)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/multikernelmanager.py", line 112, in start_kernel
km.start_kernel(**kwargs)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/manager.py", line 240, in start_kernel
**kw)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/manager.py", line 189, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/Users/test/anaconda/lib/python3.4/site-packages/IPython/kernel/launcher.py", line 213, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/Users/test/anaconda/lib/python3.4/subprocess.py", line 859, in __init__
restore_signals, start_new_session)
File "/Users/test/anaconda/lib/python3.4/subprocess.py", line 1457, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'R'
[E 19:44:58.870 NotebookApp] {
"Accept-Language": "en-US,en;q=0.8",
"Content-Length": "72",
"Accept": "application/json, text/javascript, */*; q=0.01",
"Dnt": "1",
"X-Requested-With": "XMLHttpRequest",
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"Origin": "http://localhost:8888",
"Referer": "http://localhost:8888/notebooks/Untitled4.ipynb?kernel_name=ir",
"Accept-Encoding": "gzip, deflate",
"Connection": "keep-alive",
"Host": "localhost:8888",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36"
}
[E 19:44:58.870 NotebookApp] 500 POST /api/sessions (::1) 25.54ms referer=http://localhost:8888/notebooks/Untitled4.ipynb?kernel_name=ir
[I 20:04:04.914 NotebookApp] Creating new notebook in
[I 20:04:05.707 NotebookApp] Kernel started: 75ef1aa5-453d-4a18-94df-eae30238c688
My first thought was to try to reinstall the R kernel (and its dependencies), but those dependencies must be compiled from their binaries and require Xcode (for which there is not a public beta). Does anyone know of a potential work around for this (or have any ideas about where to start looking)? I'm trying to figure out if this is something we can fix on our own or if we will likely need to wait on an official fix from the Jupyter group. Thanks in advance.
Was able to get this working. Updating to beta messed with the R $PATH as well as homebrew and its dependencies. Taking the following steps has fixed all of the issues I was experiencing.
1) Reinstall Revolution R Open (or your preferred R install. I like RRO because it includes the Intel MKL - Math Kernel Library)
2) Fix Homebrew permissions:
$ sudo chown -R "$USER":admin /usr/local
3) Cleanup Homebrew Install:
$ rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
4) Reinstall Homebew:
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
5) Install OS X command line tools (if not already installed):
$ xcode-select --install
6) Install zqm:
$ brew install zmq
7) Launch R in terminal
$R
8) Run the following:
install.packages(c('rzmq','repr','IRkernel','IRdisplay'),
repos = c('http://irkernel.github.io/', getOption('repos')),
type = 'source')
IRkernel::installspec()
Opening a new terminal window and launching jupyter should now work.