[BUG] Workspace sessions still shown as running after a container restart, but their containers are stopped
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
The issue is in the startup script svc-kasm/run, which stops all containers after a restart. Look at the docker events output to see the sequence: containers start, then receive SIGTERM (15) and stop. The fix likely involves modifying the script to not stop containers that are already running or to check their state before stopping. Start by examining the script and understanding how Kasm tracks session state versus container state.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
After docker restart kasm, Kasm still has running sessions as running and paused ones as paused, but their containers are Exited (2). For a running one, resume_kasm answers Session (03e5a2ab-7872-4e14-ad37-6af2842a1fb2) is in status (running) and cannot be resumed and get_kasm_status answers Kasm is not running.
dockerd restarts the session containers, since the Kasm agent creates them with unless-stopped and dockerd does not count its own shutdown as a manual stop (moby). Then docker ps -q | xargs docker stop &> /dev/null in svc-kasm/run (added in #102) stops them again:
$ docker exec kasm docker events --since 10m --until "$(date +%s)" --filter label=kasm.kasmid --format '{{.Action}} {{.Actor.Attributes.name}} {{.Actor.Attributes.signal}}'
start adminkasm.lo_f41f757f <no value>
start userkasm.loc_03e5a2ab <no value>
kill userkasm.loc_03e5a2ab 15
kill adminkasm.lo_f41f757f 15
stop adminkasm.lo_f41f757f <no value>
die adminkasm.lo_f41f757f <no value>
stop userkasm.loc_03e5a2ab <no value>
die userkasm.loc_03e5a2ab <no value>
Expected Behavior
Sessions come back in the state Kasm has them in: running, paused or stopped.
Steps To Reproduce
- Launch a Workspace session.
docker restart kasmand wait for Kasm to be back.docker exec kasm docker ps -a --filter label=kasm.kasmidshows the session containerExited (2), while Kasm still has the session as running.resume_kasmandget_kasm_statusfor it fail with the errors above.
Environment
- OS: Ubuntu 24.04.4 LTS (kernel 6.18, cgroup v1)
- How docker service was installed: docker-ce 29.3.1 from Docker's apt repository
- Workspace image: kasmweb/remmina:1.19.0-rolling-daily
CPU architecture
x86-64
Docker creation
docker run -d --name kasm --privileged --network host --stop-timeout 90 \
-e KASM_PORT=443 \
-v /path/to/kasm/data:/opt \
lscr.io/linuxserver/kasm:1.19.0-ls150
# plus HTTPS_PROXY and a CA bundle for the test VM's egress proxy
Container logs
Stopping Kasm Services
time="2026-09-23T10:31:30Z" level=warning msg="/opt/kasm/1.19.0/docker/docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion"
Container kasm_rdp_gateway Stopping
Container kasm_rdp_https_gateway Stopping
Container kasm_rdp_https_gateway Stopped
Container kasm_proxy Stopping
Container kasm_rdp_gateway Stopped
Container kasm_proxy Stopped
Container kasm_guac Stopping
Container kasm_api Stopping
Container kasm_agent Stopping
Container kasm_agent Stopped
Container kasm_manager Stopping
Container kasm_manager Stopped
Container kasm_guac Stopped
Container kasm_api Stopped
Container kasm_db Stopping
Container kasm_db Stopped
time="2026-09-23T10:31:51Z" level=warning msg="/opt/kasm/1.19.0/docker/docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion"
Container kasm_db Removing
Container kasm_rdp_gateway Removing
Going to remove kasm_rdp_https_gateway, kasm_proxy, kasm_agent, kasm_rdp_gateway, kasm_manager, kasm_api, kasm_guac, kasm_db
Container kasm_rdp_https_gateway Removing
Container kasm_manager Removing
Container kasm_proxy Removing
Container kasm_agent Removing
Container kasm_api Removing
Container kasm_guac Removing
Container kasm_proxy Removed
Container kasm_manager Removed
Container kasm_rdp_gateway Removed
Container kasm_api Removed
Container kasm_guac Removed
Container kasm_db Removed
Container kasm_agent Removed
Container kasm_rdp_https_gateway Removed
time="2026-09-23T10:32:06.654121651Z" level=error msg="Force shutdown daemon"
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────
██╗ ███████╗██╗ ██████╗
██║ ██╔════╝██║██╔═══██╗
██║ ███████╗██║██║ ██║
██║ ╚════██║██║██║ ██║
███████╗███████║██║╚██████╔╝
╚══════╝╚══════╝╚═╝ ╚═════╝
Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID: 911
User GID: 911
───────────────────────────────────────
Linuxserver.io version: 1.19.0-ls150
Build-date: 2026-09-22T23:50:52+00:00
───────────────────────────────────────
[custom-init] No custom files found, skipping...
time="2026-09-23T10:32:11Z" level=warning msg="Configuration migrated from version 2, use `containerd config migrate` to avoid migration" t="10.663µs"
time="2026-09-23T10:32:11.021649797Z" level=error msg="copy shim log after reload" error="read /proc/self/fd/13: file already closed" namespace=plugins.moby
time="2026-09-23T10:32:11.133980181Z" level=error msg="failed to load shim /var/run/docker/containerd/daemon/io.containerd.runtime.v2.task/plugins.moby/3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d" error="unable to load shim \"3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d\": unable to make connection: failed to create TTRPC connection: dial unix /run/containerd/s/546926296c9b5531eddcdf7066367b63beb659213011edac14ace067c3199cf1: connect: no such file or directory" namespace=plugins.moby
time="2026-09-23T10:32:11Z" level=error msg="+ echo '[ENTRYPOINT] STARTED'" plugin=3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d
time="2026-09-23T10:32:11Z" level=error msg="+ SOCKET_PATH=/run/docker/plugins/kasmlogger.sock" plugin=3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d
time="2026-09-23T10:32:11Z" level=info msg="[ENTRYPOINT] STARTED" plugin=3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d
time="2026-09-23T10:32:11Z" level=error msg="+ '[' -e /run/docker/plugins/kasmlogger.sock ]" plugin=3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d
time="2026-09-23T10:32:11Z" level=error msg="+ echo '[ENTRYPOINT] Launching plugin.py...'" plugin=3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d
time="2026-09-23T10:32:11Z" level=error msg="+ export 'PATH=/opt/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'" plugin=3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d
time="2026-09-23T10:32:11Z" level=error msg="+ + sleep 5" plugin=3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d
time="2026-09-23T10:32:11Z" level=info msg="[ENTRYPOINT] Launching plugin.py..." plugin=3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d
time="2026-09-23T10:32:11Z" level=error msg="python3 /plugin.py" plugin=3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d
time="2026-09-23T10:32:11Z" level=info msg=" * Serving Flask app 'plugin'" plugin=3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d
time="2026-09-23T10:32:11Z" level=info msg=" * Debug mode: off" plugin=3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d
time="2026-09-23T10:32:11Z" level=info msg=" * Serving Flask app 'plugin'" plugin=39040d0a342598a0a73f2eb011795b3f62f744ed010799b4efa8408e08c1a8c6
time="2026-09-23T10:32:11Z" level=info msg=" * Debug mode: off" plugin=39040d0a342598a0a73f2eb011795b3f62f744ed010799b4efa8408e08c1a8c6
Failed to fetch workspace list, falling back to local list.json: fetch failed
Pulling Latest Kasm Service Images
time="2026-09-23T10:32:13Z" level=warning msg="/opt/kasm/1.19.0/docker/docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion"
Image kasmweb/rdp-gateway:1.19.0-rolling Pulling
Image kasmweb/postgres:1.19.0-rolling Pulling
Image kasmweb/proxy:1.19.0-rolling Pulling
Image kasmweb/agent:1.19.0-rolling Pulling
Image kasmweb/kasm-guac:1.19.0-rolling Pulling
Image kasmweb/api:1.19.0-rolling Pulling
Image kasmweb/rdp-https-gateway:1.19.0-rolling Pulling
Image kasmweb/manager:1.19.0-rolling Pulling
Image kasmweb/postgres:1.19.0-rolling Pulled
Image kasmweb/rdp-gateway:1.19.0-rolling Pulled
Image kasmweb/agent:1.19.0-rolling Pulled
Image kasmweb/proxy:1.19.0-rolling Pulled
Image kasmweb/api:1.19.0-rolling Pulled
Image kasmweb/manager:1.19.0-rolling Pulled
Image kasmweb/rdp-https-gateway:1.19.0-rolling Pulled
Image kasmweb/kasm-guac:1.19.0-rolling Pulled
Upgrading rolling plugins
Inspecting plugin: kasmweb/logger:amd64-1.1-rolling-daily
* Type: log plugin
* Will not update rolling plugin: currently at the latest version
Inspecting plugin: kasmweb/sidecar:amd64-1.5-rolling-daily
* Type: network plugin
* Will not update rolling plugin: currently at the latest version
Starting Kasm Services
time="2026-09-23T10:32:16Z" level=warning msg="/opt/kasm/1.19.0/docker/docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion"
time="2026-09-23T10:32:16Z" level=error msg="+ echo '[ENTRYPOINT] Checking socket existence...'" plugin=3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d
time="2026-09-23T10:32:16Z" level=error msg="+ ls -l /run/docker/plugins" plugin=3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d
time="2026-09-23T10:32:16Z" level=info msg="[ENTRYPOINT] Checking socket existence..." plugin=3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d
time="2026-09-23T10:32:16Z" level=info msg="total 0" plugin=3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d
time="2026-09-23T10:32:16Z" level=info msg="prwx------ 1 root root 0 Sep 23 10:32 3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d-stderr" plugin=3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d
time="2026-09-23T10:32:16Z" level=info msg="prwx------ 1 root root 0 Sep 23 10:32 3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d-stdout" plugin=3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d
time="2026-09-23T10:32:16Z" level=info msg="srwxr-xr-x 1 root root 0 Sep 23 10:32 kasmlogger.sock" plugin=3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d
time="2026-09-23T10:32:16Z" level=error msg="+ '[' '!' -S /run/docker/plugins/kasmlogger.sock ]" plugin=3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d
time="2026-09-23T10:32:16Z" level=error msg="+ tail -f /dev/null" plugin=3b563bb3570b26a02f9250083b57c7e11d4bdb7b83ab4724497a920d3dbc565d
Container kasm_db Creating
Container kasm_guac Creating
Container kasm_guac Created
Container kasm_db Created
Container kasm_api Creating
Container kasm_manager Creating
Container kasm_manager Created
Container kasm_agent Creating
Container kasm_api Created
Container kasm_rdp_gateway Creating
Container kasm_agent Created
Container kasm_proxy Creating
Container kasm_rdp_gateway Created
Container kasm_proxy Created
Container kasm_rdp_https_gateway Creating
Container kasm_rdp_https_gateway Created
Container kasm_db Starting
Container kasm_guac Starting
Container kasm_db Started
Container kasm_db Waiting
Container kasm_db Waiting
Container kasm_guac Started
Container kasm_db Healthy
Container kasm_db Healthy
Container kasm_manager Starting
Container kasm_api Starting
Container kasm_manager Started
Container kasm_agent Starting
Container kasm_api Started
Container kasm_rdp_gateway Starting
Container kasm_agent Started
Container kasm_manager Waiting
Container kasm_api Waiting
Container kasm_rdp_gateway Started
Container kasm_manager Healthy
Container kasm_api Healthy
Container kasm_proxy Starting
Container kasm_proxy Started
Container kasm_rdp_https_gateway Starting
Container kasm_rdp_https_gateway Started
[ls.io-init] done.
- Lenguaje dominante
- Shell
- Estrellas
- 487
- Forks
- 51
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de linuxserver/docker-kasm
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
linuxserver/docker-kasm#111 ·
-
linuxserver/docker-kasm#110 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
linuxserver/docker-kasm#107 ·
-
work-in-progress
linuxserver/docker-kasm#83 · 3 comentarios · 1 asignado ·
Todos los issues de linuxserver/docker-kasm
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
huggingface/Repo2RLEnv#163 · 1 comentario ·
-
setup tools wizard offers no GitHub auth path, and setup summary doesn't recognize `gh` CLI auth Abiertoarea/auth comp/cli P3 tool/skills type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
NousResearch/hermes-agent#121131 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
bradcypert/plum#53 ·
-
tmp_watchgod.sh exceeds the 1000-line cap; the Zone A guard helpers are a clean extraction seam Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
WingedGuardian/GENesis-AGI#2301 ·