Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] linuxserver.io VMs not starting on Kasm Workspaces - python cypt module missing? #98

Closed
1 task done
kpko opened this issue Jan 17, 2025 · 5 comments
Closed
1 task done
Assignees
Labels
work-in-progress Stale exempt

Comments

@kpko
Copy link

kpko commented Jan 17, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Hi! I'm trying out Kasm Workspaces lately and added the linuxserver.io registry. I've played with the webtop images and they work great so I wanted to try them in workspaces. I've installed the latest version and all Kasm Workspaces images work great but some of the linuxserver.io images don't start up. I just get "An error has occured" in the UI without any context. In the logs I can only find lines like "Conflict, the container is being restarted..." and no other errors.

I can't get any container logs because I can't attach to the container when the error occurs, when trying docker ps -a on the server the container is already cleaned up and I don't get any logs.

To debug this further, I tried running the container (I'm using webtop:arch-kde as an example here) on the server with the settings from Kasm to get more log output from the container by copying the configuration from the Arch KDE workspace and execute it directly in the command line:

docker run -it --security-opt seccomp=unconfined --entrypoint "/kasminit" --user 1000 --env "HOME=/home/kasm-user" lscr.io/linuxserver/webtop:fedora-kde

This immediately crashes with the following logs:

WARNING: Cannot open X11 display.
ERROR: [  get_x11_output:0070] Couldn't initialize X11 output. Aborting...
/kasminit: line 78:     8 Trace/breakpoint trap   dunst
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import crypt; print(crypt.crypt('vncpassword', '$5$kasm$'));
    ^^^^^^^^^^^^
ModuleNotFoundError: No module named 'crypt'

This could explain the container not starting on Workspaces. I've tracked the /kasminit script down to this repo so I hope this is the right place to track this.

The Debian XFCE image works, the Arch KDE image doesn't, the Fedora KDE image doesn't, the Fedora i3 image doesn't. At least in my environment.

Expected Behavior

The container should start without crashing.

Steps To Reproduce

  1. Install latest version of Kasm Workspaces on a debian12 server
  2. Add the linuxserver.io registry
  3. Start an Arch KDE workspace

Environment

- OS: Debian Bookworm
- How docker service was installed: Via the Kasm Workspace install script from the current install guide

Docker creation

docker run -it --security-opt seccomp=unconfined --entrypoint "/kasminit" --user 1000 --env "HOME=/home/kasm-user" lscr.io/linuxserver/webtop:fedora-kde

Container logs

ARNING: Cannot open X11 display.
ERROR: [  get_x11_output:0070] Couldn't initialize X11 output. Aborting...
/kasminit: line 78:     8 Trace/breakpoint trap   dunst
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import crypt; print(crypt.crypt('vncpassword', '$5$kasm$'));
    ^^^^^^^^^^^^
ModuleNotFoundError: No module named 'crypt'
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@palmergw
Copy link

I'm experiencing the same issue, I believe.

Environment:

Ubuntu Server 24.04.1 LTS
Portainer docker-compose deployment of Kasm
Linuxserver.io Repository and images
Failing images: Fedora KDE, Fedora XFCE
Working image: Alpine KDE

docker creation command yields identical results to kpko's results above.

Kasm Logs:

ingest_date: 20250122154543
application: kasm_api
levelname: ERROR
kasm_user_name: [email protected]
process: client_api_server
client_ip: 172.70.38.34
user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
message
Error during Create request for Server(98754cf8-e478-4a57-9af1-ab1d1f962a8a) : (Exception creating Kasm: Traceback (most recent call last):
  File "docker/api/client.py", line 265, in _raise_for_status
  File "requests/models.py", line 1021, in raise_for_status
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http+docker://localhost/v1.47/exec/cc64f52863c53ed1390192fe4aec689ddadc84b8c9c2c8af69322339b8885a4f/start

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "__init__.py", line 574, in post
  File "provision.py", line 1944, in provision
  File "docker/models/containers.py", line 210, in exec_run
  File "docker/utils/decorators.py", line 19, in wrapped
  File "docker/api/exec_api.py", line 167, in exec_start
  File "docker/api/client.py", line 271, in _result
  File "docker/api/client.py", line 267, in _raise_for_status
  File "docker/errors.py", line 39, in create_api_error_from_http_exception
docker.errors.APIError: 500 Server Error for http+docker://localhost/v1.47/exec/cc64f52863c53ed1390192fe4aec689ddadc84b8c9c2c8af69322339b8885a4f/start: Internal Server Error ("OCI runtime exec failed: exec failed: unable to start container process: error executing setns process: exit status 1: unknown")
)

@palmergw
Copy link

palmergw commented Jan 22, 2025

This is my best attempt at being helpful, though I'm not sure how to effectively implement this in the /kasminit entrypoint.

ModuleNotFoundError: No module named 'crypt'

I haven't done enough digging to understand why some of the images experience this issue, and others do not. Alpine KDE has the same /kasminit entrypoint in the Docker Run Config Override, but it works fine.

Edit:

Docker logs from manually launching alpine-kde
<string>:1: DeprecationWarning: 'crypt' is deprecated and slated for removal in Python 3.13

So it seems like it's an image build time issue, where some of the webtop images have packaged an older version of Python that continues to function with this command.

Seems to be supported by:
alpine-kde package_versions.txt: https://github.com/linuxserver/docker-webtop/blob/c49e0e95c67dbcb79f4d715f3af2d3e23fd93d10/package_versions.txt#L1218
as compared to:
fedora-kde package_versions.txt: https://github.com/linuxserver/docker-webtop/blob/05df2d1e5a47deaff81386db08e4b264df7f62c4/package_versions.txt#L1541

@thelamer
Copy link
Member

Yeah it looks like Arch and Fedora are busted because of the bump to 3.13, will modify init to use hashlib.

@thelamer thelamer self-assigned this Jan 23, 2025
@thelamer thelamer added the work-in-progress Stale exempt label Jan 23, 2025
@thelamer
Copy link
Member

This has been resolved and the webtops have been rebuilt. Just pull the latest image to resolve.

@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work-in-progress Stale exempt
Projects
Development

No branches or pull requests

3 participants