workspaces-issues icon indicating copy to clipboard operation
workspaces-issues copied to clipboard

[Bug] - Unable to execute automatic upgrade

Open Timman6866 opened this issue 7 months ago • 1 comments

Describe the bug I receive a permissions error when executing the upgrade script, despite running with "sudo". I've only installed Kasm just last week, and this is my first upgrade attempt.

To Reproduce Steps to reproduce the behavior: cd /tmp curl -O https://kasm-static-content.s3.amazonaws.com/kasm_release_1.17.0.7f020d.tar.gz tar -xf kasm_release_1.17.0.7f020d.tar.gz sudo bash kasm_release/upgrade.sh

Expected behavior An upgraded package

Screenshots Stopping Kasm Services time="2025-05-19T02:54:38Z" level=warning msg="/opt/kasm/1.17.0/docker/docker-compose.yaml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion" Container kasm_proxy Stopping Container kasm_proxy Stopped Container kasm_guac Stopping Container kasm_agent Stopping Container kasm_share Stopping Container kasm_rdp_https_gateway Stopping Container kasm_agent Stopped Container kasm_manager Stopping Container kasm_share Stopped Container kasm_redis Stopping Container kasm_redis Stopped Container kasm_manager Stopped Container kasm_rdp_https_gateway Stopped Container kasm_rdp_gateway Stopping Container kasm_guac Stopped Container kasm_rdp_gateway Stopped Container kasm_api Stopping Container kasm_api Stopped Container kasm_db Stopping Container kasm_db Stopped Removing Existing Database container time="2025-05-19T02:55:20Z" level=warning msg="/opt/kasm/1.17.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_db Removed Creating temporary database backup container... time="2025-05-19T02:55:20Z" level=warning msg="/opt/kasm/1.17.0/docker/docker-compose.yaml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion" time="2025-05-19T02:55:20Z" level=warning msg="Found orphan containers ([stuntman]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up." daa12e420565d3ec65f8da8bd2fac9472236e291dd27c687ba7f920f1b2a1d4b Executing Backup pg_dump: error: could not open TOC file "/backup/kasm_db_backup.tar" for output: Permission denied

Workspaces Version 1.17.0

Workspaces Installation Method Single Server - Install Script

Timman6866 avatar May 19 '25 03:05 Timman6866

Hi, we ask you to provide several pieces of information when putting in the ticket to help orient us on your environment. Can you please provide the following per the ticket template

Workspace Server Information (please provide the output of the following commands):

  • uname -a
  • cat /etc/os-release
  • sudo docker info
  • sudo docker ps | grep kasm

j-travis avatar May 20 '25 12:05 j-travis

I am also facing this issue where I am getting a permission denied on the pg backup pg_dump: error: could not open TOC file "/backup/kasm_db_backup.tar" for output: Permission denied

Linux srv-vdi01 6.8.0-52-generic #53~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Jan 15 19:18:46 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

PRETTY_NAME="Ubuntu 22.04.5 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.5 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=jammy

Client: Docker Engine - Community Version: 28.1.1 Context: default Debug Mode: false Plugins: buildx: Docker Buildx (Docker Inc.) Version: v0.23.0 Path: /usr/libexec/docker/cli-plugins/docker-buildx compose: Docker Compose (Docker Inc.) Version: v2.5.0 Path: /usr/local/lib/docker/cli-plugins/docker-compose

Server: Containers: 15 Running: 13 Paused: 0 Stopped: 2 Images: 40 Server Version: 28.1.1 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Using metacopy: false Native Overlay Diff: true userxattr: false Logging Driver: syslog Cgroup Driver: systemd Cgroup Version: 2 Plugins: Volume: local Network: bridge host ipvlan kasmweb/sidecar:1.2 macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog Swarm: inactive Runtimes: io.containerd.runc.v2 runc Default Runtime: runc Init Binary: docker-init containerd version: 05044ec0a9a75232cad458027ca83437aae3f4da runc version: v1.2.5-0-g59923ef init version: de40ad0 Security Options: apparmor seccomp Profile: builtin cgroupns Kernel Version: 6.8.0-52-generic Operating System: Ubuntu 22.04.5 LTS OSType: linux Architecture: x86_64 CPUs: 32 Total Memory: 125.8GiB Name: srv-vdi01 ID: e4fc38e7-3524-4ce3-b231-a64d11703b6e Docker Root Dir: /var/lib/docker Debug Mode: false Experimental: false Insecure Registries: ::1/128 127.0.0.0/8 Live Restore Enabled: false

530492208a96 kasmweb/proxy:1.17.0 "/docker-entrypoint.…" 3 minutes ago Up 3 minutes 80/tcp, 0.0.0.0:8443->8443/tcp, [::]:8443->8443/tcp kasm_proxy 99a5feb60de6 kasmweb/agent:1.17.0 "python3 /src/Provis…" 3 minutes ago Up 3 minutes (healthy) 4444/tcp kasm_agent 4c6b338ee891 kasmweb/rdp-https-gateway:1.17.0 "/opt/rdpgw/rdpgw" 3 minutes ago Up 3 minutes (healthy) kasm_rdp_https_gateway 7decbfb101cf kasmweb/manager:1.17.0 "python3 /src/api_se…" 3 minutes ago Up 3 minutes (healthy) 8181/tcp kasm_manager 377cb39c3c81 kasmweb/share:1.17.0 "python3 /src/api_se…" 3 minutes ago Up 3 minutes (healthy) 8182/tcp kasm_share 657f0e663365 kasmweb/rdp-gateway:1.17.0 "/start.sh" 3 minutes ago Up 3 minutes (healthy) 0.0.0.0:3389->3389/tcp, [::]:3389->3389/tcp kasm_rdp_gateway 651e5dbecbca kasmweb/kasm-guac:1.17.0 "/dockerentrypoint.sh" 3 minutes ago Up 3 minutes (healthy) kasm_guac ffabe4a59353 kasmweb/postgres:1.17.0 "docker-entrypoint.s…" 3 minutes ago Up 3 minutes (healthy) 5432/tcp kasm_db 4077b4559295 kasmweb/postgres:1.17.0 "docker-entrypoint.s…" 4 minutes ago Up 4 minutes (healthy) 5432/tcp temp_kasm_db_backup 1a01c5b62651 kasmweb/api:1.17.0 "/bin/sh -c /usr/bin…" 3 weeks ago Up 3 minutes (healthy) 8080/tcp kasm_api dbe0a41ccf80 redis:5-alpine "docker-entrypoint.s…" 3 weeks ago Up 3 minutes 6379/tcp kasm_redis

incomargroup avatar May 26 '25 06:05 incomargroup

having this issue too on a proxmox debian 12 container

root@kasm:/opt/kasm# uname -a
cat /etc/os-release
sudo docker info
sudo docker ps | grep kasm
Linux kasm 6.8.12-9-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-9 (2025-03-16T19:18Z) x86_64 GNU/Linux
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Client: Docker Engine - Community
 Version:    28.1.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.23.0
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.5.0
    Path:     /usr/local/lib/docker/cli-plugins/docker-compose

Server:
 Containers: 10
  Running: 1
  Paused: 0
  Stopped: 9
 Images: 10
 Server Version: 28.1.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan kasmweb/sidecar:1.2 macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 05044ec0a9a75232cad458027ca83437aae3f4da
 runc version: v1.2.5-0-g59923ef
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.8.12-9-pve
 Operating System: Debian GNU/Linux 12 (bookworm)
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 4.094GiB
 Name: kasm
 ID: 86b45b96-ac2c-4347-96a1-cbd280d90a39
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  ::1/128
  127.0.0.0/8
 Live Restore Enabled: false

4370ed9211e7   kasmweb/postgres:1.17.0   "docker-entrypoint.s…"   30 minutes ago   Up 30 minutes (healthy)   5432/tcp   temp_kasm_db_backup

omiinaya avatar May 26 '25 19:05 omiinaya

Same issue here ....

TroRon avatar May 26 '25 20:05 TroRon

mkdir -p /opt/kasm/backups/ (if it not exist)
chown 1000:1000 /opt/kasm/backups/
chmod 755 /opt/kasm/backups/

or in an root only system (like proxmox lxc):

chmod 777 /opt/kasm/backups/

MickLesk avatar May 27 '25 07:05 MickLesk

Hello,

What version of Kasm did you have installed when you attempted to run upgrade.sh?

Ian-Kasmweb avatar May 27 '25 19:05 Ian-Kasmweb

I can answer for us (Community Scripts) latest Release 17.1.xxxxxx

MickLesk avatar May 27 '25 20:05 MickLesk

Ah, that seems to be the issue. We don't recommend using the 1.17.0 installer's upgrade.sh on a system that has Kasm Workspaces 1.17.0 installed as it's not something currently supported.

In our next release we're planning on adding logic to prevent the upgrade from starting when the same version is already installed, and include a helpful error message to avoid confusion.

In the mean time if you do have have a kasm installation ran into issues due to upgrade.sh failing with the pg_dump: error: could not open TOC file error you can recover by running sudo /opt/kasm/bin/start and then delete the orphaned temp backup container with docker rm -f temp_kasm_db_backup.

I also want to mention that we recommend against running Kasm on LXC and instead to run Kasm on a VM or baremetal. Issues may arise because the Kasm install and agent expect to be able to puppet the host in various ways to allow for device pass through , attaching VPNs etc. It's likely that compatibility issues will come up.

Ian-Kasmweb avatar May 28 '25 14:05 Ian-Kasmweb