Docker-stacks: r-notebook kernel crashes because of png support

Created on 20 Jul 2018  路  8Comments  路  Source: jupyter/docker-stacks

What docker image you are using?

jupyter/r-notebook:latest

What complete docker command do you run to launch the container (omitting sensitive values)?

docker run -p 8888:8888 jupyter/r-notebook

What steps do you take once the container is running to reproduce the issue?

  1. Point my browser at the URL output in the terminal and make a new notebook with an R kernel

  2. Execute any R code in the notebook (e.g. x <- 1), and the kernel crashes.

What do you expect to happen?

The kernel runs.

What actually happens?

The kernel crashes. The logs on the terminal are:

[I 09:08:39.035 NotebookApp] Creating new notebook in 
[I 09:08:39.065 NotebookApp] Writing notebook-signing key to /home/jovyan/.local/share/jupyter/notebook_secret
[I 09:08:39.756 NotebookApp] Kernel started: f5391eb1-3736-419b-be53-483e5c7ca6c6
[W 09:08:39.773 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20180720090755 (172.17.0.1) 8.56ms referer=http://127.0.0.1:8888/notebooks/Untitled.ipynb?kernel_name=ir
[I 09:08:40.753 NotebookApp] Adapting to protocol v5.0 for kernel f5391eb1-3736-419b-be53-483e5c7ca6c6
Error in .External2(C_X11, paste0("png::", filename), g$width, g$height,  : 
  unable to start device PNG
Calls: <Anonymous> ... evaluate -> dev.new -> do.call -> <Anonymous> -> ok_device
In addition: Warning message:
In ok_device(filename, ...) : no png support in this version of R
Execution halted
Upstream Bug

Most helpful comment

Thanks for the report and links @jeromekelleher. I believe this is the cause of #668 which I'm going to close as a duplicate.

All 8 comments

This looks like the same issue: https://github.com/IRkernel/IRkernel/issues/388

Thanks for the report and links @jeromekelleher. I believe this is the cause of #668 which I'm going to close as a duplicate.

/cc @dirkcgrunwald @nazamy

I get the same error message in our jupyterhub environment:

[I 2018-07-30 06:25:48.723 SingleUserNotebookApp kernelmanager:164] Kernel started: e9d644bc-bd17-4a5d-92c6-b5b9ec2bd92c
[I 2018-07-30 06:25:48.725 SingleUserNotebookApp log:122] 201 POST /user/bbrauns/api/sessions (bbrauns@::ffff:172.18.0.4) 55.23ms
[I 2018-07-30 06:25:48.730 SingleUserNotebookApp log:122] 200 GET /user/bbrauns/api/contents/R-Sample.ipynb/checkpoints?_=1532931948828 (bbr18.0.4) 2.97ms
[I 2018-07-30 06:25:50.354 SingleUserNotebookApp handlers:190] Adapting to protocol v5.0 for kernel e9d644bc-bd17-4a5d-92c6-b5b9ec2bd92c
[I 2018-07-30 06:25:50.356 SingleUserNotebookApp log:122] 101 GET /user/bbrauns/api/kernels/e9d644bc-bd17-4a5d-92c6-b5b9ec2bd92c/channels?secc43540f887a8b0461ebc834e (bbrauns@::ffff:172.18.0.4) 1606.07ms
Error in .External2(C_X11, paste0("png::", filename), g$width, g$height,  :
  unable to start device PNG
Calls: <Anonymous> ... evaluate -> dev.new -> do.call -> <Anonymous> -> ok_device
In addition: Warning message:
In ok_device(filename, ...) : no png support in this version of R
Execution halted
[I 2018-07-30 06:25:51.708 SingleUserNotebookApp restarter:110] KernelRestarter: restarting kernel (1/5), new random ports
kernel e9d644bc-bd17-4a5d-92c6-b5b9ec2bd92c restarted

Docker Image:

jupyter/datascience-notebook    latest              ee385992ea10

The capabilities seem to be fixed in the newer versions/builds of R-base. I fixed it for me by removing the version pinnings in the Dockerfile, is a version bump of the R packages an option? According to anaconda: R-Base is the 3.5.0 version, but for example, the forecast version has also to be bumped. Another option seems to be adding the anaconda-forge channel.
conda config --add channels conda-forge
I think the r-base package there is also the one being uploaded manually to the defaults channel. They have a working build for the 3.4.1 version.

The use of the conda-forge channel was also listed as a reason for this commit: Drop the r channel, so I think adding it would be the best option.

Hello,

I think we could close this issue since the jupyter/r-notebook has been updated (in the PR #789) with the latest version of R-Base (3.5.1) and the kernel does not crash anymore.

$ conda list r-base
# packages in environment at /opt/conda:
#
# Name    Version  Build       Channel
# r-base    3.5.1  h391c2eb_5  conda-forge

Thanks @romainx, closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iyanmv picture iyanmv  路  4Comments

osobh picture osobh  路  3Comments

iramsey85 picture iramsey85  路  4Comments

edurenye picture edurenye  路  4Comments

romainx picture romainx  路  4Comments