[BUG] Resumed Workspace sessions can get another address after a container restart, and Kasm keeps routing to the old one
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- docker, nginx, shell
- Área
- devops, infrastructure
Línea de trabajo
The issue is in the agent's handling of container IP addresses on resume. Look at the agent code that manages container lifecycle (start/pause/resume) and the database field kasms.container_ip. The nginx configuration files in /opt/kasm/<version>/conf/nginx/containers.d/ need to be updated when a container gets a new IP after restart. Start by tracing where the IP is stored and where the nginx config is generated. Verify the fix by reproducing the steps in the issue.
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
Before the restart, session A runs at 172.17.0.10 and session B is paused at 172.17.0.11. After docker restart kasm, both containers are left Exited (2) (#106). Once resumed, B runs at 172.17.0.10 while its route still points at 172.17.0.11, where nothing answers.
Kasm keeps the address a session container was created with (kasms.container_ip, and the proxy_pass lines of /opt/kasm/<version>/conf/nginx/containers.d/<container id>.conf) and does not update it on resume: the agent unpauses or starts the container and leaves the address and the route as they are. Docker gives a starting container the lowest free address, not its previous one.
Expected Behavior
A resumed session runs at the address Kasm routes to.
Steps To Reproduce
- Launch a Workspace session as one user and another one as a second user, then pause the second one.
docker restart kasmand wait for Kasm to be back.- Resume the paused session.
- Its address,
docker exec kasm docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <container id>, differs from its route,docker exec kasm grep 6901 /opt/kasm/1.19.0/conf/nginx/containers.d/<container id>.conf, anddocker exec kasm docker exec kasm_proxy curl -sk -o /dev/null -w '%{http_code}\n' https://<route address>:6901/prints000(401on the container's own address).
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 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
linuxserver/docker-kasm#110 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
linuxserver/docker-kasm#106 ·
-
work-in-progress
linuxserver/docker-kasm#83 · 3 comentarios · 1 asignado ·
Todos los issues de linuxserver/docker-kasm
Issues similares
-
[Bug] reef-hermes tells me to resume with hermes --resume, which does not work from my shell Abiertoarea: harness bug status: needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Human-Agent-Society/reef#625 ·
-
module: core
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
bigbluebutton/bigbluebutton#25849 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
vercel-labs/just-bash#464 ·
-
area:sandbox documentation enhancement platform:linux
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
anthropics/claude-code#96664 ·
-
cost:cheap severity:medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
fairagro/m4.2_sql_to_arc#227 ·