-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
I am encountering an issue where the Ark kernel fails to establish a connection within a Windows-based Docker container running JupyterLab. I am able to successfully run R code using IRkernel in the same environment, but Ark consistently exhibits connection failures.
Environment
Docker Version: 28.1.1
Base Image: mcr.microsoft.com/windows/server:ltsc2022
JupyterLab Version: 4.4.3
Conda Version: py311_25.5.1-0
R Version: 4.5.1
Ark Version: 0.1.195
IRkernel Version: 1.3.2
Logs
[W 2025-06-30 15:49:02.525 ServerApp] Nudge: attempt 120 on kernel 339b791d-abc8-4cfa-8db3-4e1aab3d613d
[E 2025-06-30 15:49:02.844 ServerApp] Uncaught exception GET /api/kernels/339b791d-abc8-4cfa-8db3-4e1aab3d613d/channels?session_id=233900e2-03a1-47d3-aae5-f4bc8ab0630b (10.14.52.63)
HTTPServerRequest(protocol='http', host='<host>:1234', method='GET', uri='/api/kernels/339b791d-abc8-4cfa-8db3-4e1aab3d613d/channels?session_id=233900e2-03a1-47d3-aae5-f4bc8ab0630b', version='HTTP/1.1', remote_ip='10.14.52.63')
Traceback (most recent call last):
File "C:\Miniconda3\Lib\site-packages\tornado\websocket.py", line 967, in _accept_connection
await open_result
File "C:\Miniconda3\Lib\site-packages\jupyter_server\services\kernels\websocket.py", line 75, in open
await self.connection.connect()
TimeoutError: Timeout
[W 2025-06-30 15:49:02.868 ServerApp] Timeout waiting for kernel_info reply from 339b791d-abc8-4cfa-8db3-4e1aab3d613d
[I 2025-06-30 15:49:02.869 ServerApp] Connecting to kernel 339b791d-abc8-4cfa-8db3-4e1aab3d613d.
2025-06-30T22:49:02.874131Z ERROR Received subscription message, but no `subscription_tx` is available to confirm on. Have we already received a subscription message once before?
at crates\amalthea\src\socket\iopub.rs:283
[W 2025-06-30 15:49:02.913 ServerApp] Replacing stale connection: 339b791d-abc8-4cfa-8db3-4e1aab3d613d:233900e2-03a1-47d3-aae5-f4bc8ab0630b
[W 2025-06-30 15:49:07.414 ServerApp] Nudge: attempt 10 on kernel 339b791d-abc8-4cfa-8db3-4e1aab3d613d
... repeats
Steps to Reproduce
FROM mcr.microsoft.com/windows/server:ltsc2022
# Install miniconda
RUN powershell Invoke-WebRequest -Uri https://repo.anaconda.com/miniconda/Miniconda3-py311_25.5.1-0-Windows-x86_64.exe -OutFile MinicondaInstaller.exe
RUN powershell Start-Process -FilePath MinicondaInstaller.exe -ArgumentList '/InstallationType=AllUsers','/RegisterPython=0','/S','/D=C:\Miniconda3' -NoNewWindow -Wait
RUN powershell Remove-Item -Force MinicondaInstaller.exe
RUN powershell -Command "[Environment]::SetEnvironmentVariable('Path', $env:Path + ';C:\Miniconda3;C:\Miniconda3\Scripts;C:\Miniconda3\condabin', 'Machine')"
RUN conda install jupyterlab -y
RUN ipython profile create
# Install R
RUN powershell Invoke-WebRequest -OutFile R-4.5.1-win.exe https://cran.r-project.org/bin/windows/base/R-4.5.1-win.exe
RUN R-4.5.1-win.exe /SILENT /DIR="C:\Program Files\R\R-4.5.1" && powershell Remove-Item "R-4.5.1-win.exe"
RUN powershell -Command "[Environment]::SetEnvironmentVariable('Path', $env:Path + ';C:\Program Files\R\R-4.5.1\bin', 'User')"
RUN powershell -Command "[Environment]::SetEnvironmentVariable('R_HOME', 'C:\Program Files\R\R-4.5.1', 'User')"
# Install Ark
RUN powershell Invoke-WebRequest -OutFile ark.zip https://github.com/posit-dev/ark/releases/download/0.1.195/ark-0.1.195-windows-x64.zip
RUN powershell Expand-Archive -Path "ark.zip" -DestinationPath "C:\ark" && powershell Remove-Item "ark.zip"
RUN powershell -Command "[Environment]::SetEnvironmentVariable('Path', $env:Path + ';C:\ark', 'User')"
RUN ark --install
# Install IRkernel
RUN Rscript --no-save --no-restore -e "install.packages('IRkernel', repos='https://cloud.r-project.org'); IRkernel::installspec()"
ENTRYPOINT ["jupyter", "lab", "--ip=0.0.0.0", "--port=1234", "--allow-root"]
- Build Image
docker build -t <name> Dockerfile .
- Run container
docker run --rm -p 1234:1234 -it <name>
-
Open URL and select Ark kernel.
-
Attempt to run any R code.
cc @JosiahParry
xlt208
Metadata
Metadata
Assignees
Labels
No labels