Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[BUG] Resumed Workspace sessions can get another address after a container restart, and Kasm keeps routing to the old one

Đang mở
#107 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

@tigerblue77 đang làm issue này rồi.

Từ ngày 23/9/2026.

  • #108 của @tigerblue77 — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
docker, nginx, shell
Lĩnh vực
devops, infrastructure

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
  1. Launch a Workspace session as one user and another one as a second user, then pause the second one.
  2. docker restart kasm and wait for Kasm to be back.
  3. Resume the paused session.
  4. 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, and docker exec kasm docker exec kasm_proxy curl -sk -o /dev/null -w '%{http_code}\n' https://<route address>:6901/ prints 000 (401 on 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.
Ngôn ngữ chính
Shell
Star
487
Fork
51
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của linuxserver/docker-kasm

Tất cả issue của linuxserver/docker-kasm

Issue tương tự

Thêm issue về Shell/Bash

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.