kasmtech / workspaces-issues

19 stars 4 forks source link

Kasm & RDS black screen - session closed #603

Open gsgmcrcs opened 2 months ago

gsgmcrcs commented 2 months ago

Bug Description: When using RDS deployed in Windows Server 2022, I am getting an issue where the screen goes black after establishing connection and login in, this then terminates the session and gives the "session closed" from Windows side.

Reproducing with Kasm Steps to reproduce the behavior:

  1. Deploying a new server using RDP and port 3389
  2. Adding the connection info of "{
    "guac": { "type": "rdp", "settings": { "security": "any", "ignore-cert": true, "enable-font-smoothing": true, "enable-wallpaper": true, "enable-theming": true, "enable-full-window-drag": false, "enable-menu-animations": false, "resize-method": "display-update", "server-layout": "en-us-qwerty", "printer-name": "Kasm", "remote-app": "||Visual Studio 2022" } }, "kasm_svc": { "port": 4902 } }"

Expected behavior Visual studio normally should open inside a black screen, just the program itself.

Workspaces Version Version 1.15.0

Workspaces Installation Method Single Server

Client Browser (please complete the following information):

Tested

I have tested RDS via Microsoft Remote Desktop app on a Mac and used workspaces and this has worked fine with RDS Visual Studio Community 2022. I have tested on other browsers, in Incognito mode. I have tested on Windows and it works fine.

The only place it seems not to work is inside the kasm web portal.

Errors I get via Kasm:

  1. Error calling Kasm Service API (screenshot?width=1000&height=1000) for kasm_id (360d98a9-0961-49ab-9e42-c347bf149ea9) : Request (https://proxy:443/guac_connect/api/screenshot?width=1000&height=1000) returned code (403) : (Screenshots are disabled for this user)

  2. Closing connection with code: 1000

  3. Authenticated request missing required username or token values from (10.88.1.12)

No errors on Windows Events, just says Successful connection.

Have gone through and checked cookies, and tokens, no issues found there.

Any help would be appreicated.

gsgmcrcs commented 2 months ago

Have looked at what happens in the logs of kasm and this has came out.

2024-08-13 05:53:06,165 [DEBUG] client_api_server: Unauthenticated user made authorized API call to (healthcheck) from IP address (172.18.0.3). 2024-08-13 05:53:06,173 [INFO] cherrypy.access.140066493357744: 172.18.0.9 - - [13/Aug/2024:05:53:06] "GET /api/__healthcheck HTTP/1.1" 200 12 "" "axios/1.6.7" 2024-08-13 05:53:06,195 [DEBUG] client_api_server: Successfully authenticated request (guac_auth) for user (gong) at (172.18.0.3) 2024-08-13 05:53:06,205 [DEBUG] client_api_server: SSO credential passthrough completed for gong. 2024-08-13 05:53:06,206 [DEBUG] client_api_server: Setting user timezone: Australia/Melbourne 2024-08-13 05:53:06,207 [DEBUG] client_api_server: Setting user locale: en_US.UTF-8 2024-08-13 05:53:06,292 [ERROR] client_api_server: Session recording is configured but not licensed. Will not enable. 2024-08-13 05:53:06,297 [INFO] cherrypy.access.140066493357744: 172.18.0.9 - - [13/Aug/2024:05:53:06] "POST /api/guac_auth HTTP/1.1" 200 1505 "" "axios/1.6.7" 2024-08-13 05:53:09,305 [DEBUG] client_api_server: Unauthenticated user made authorized API call to (healthcheck) from IP address (127.0.0.1). 2024-08-13 05:53:09,309 [INFO] cherrypy.access.140066493357744: 127.0.0.1 - - [13/Aug/2024:05:53:09] "GET /api/__healthcheck HTTP/1.1" 200 12 "" "curl/7.68.0" 2024-08-13 05:53:32,111 [DEBUG] client_api_server: Unauthenticated user made authorized API call to (healthcheck) from IP address (172.18.0.3). 2024-08-13 05:53:32,120 [INFO] cherrypy.access.140066493357744: 172.18.0.9 - - [13/Aug/2024:05:53:32] "GET /api/__healthcheck HTTP/1.1" 200 12 "" "axios/1.6.7" 2024-08-13 05:53:32,155 [INFO] cherrypy.access.140066493357744: 172.18.0.9 - - [13/Aug/2024:05:53:32] "POST /api/guac_get_managers HTTP/1.1" 200 23 "" "axios/1.6.7" 2024-08-13 05:53:59,274 [DEBUG] client_api_server: Unauthenticated user made authorized API call to (healthcheck) from IP address (172.18.0.3). 2024-08-13 05:53:59,283 [INFO] cherrypy.access.140066493357744: 172.18.0.9 - - [13/Aug/2024:05:53:59] "GET /api/__healthcheck HTTP/1.1" 200 12 "" "axios/1.6.7" 2024-08-13 05:53:59,315 [INFO] cherrypy.access.140066493357744: 172.18.0.9 - - [13/Aug/2024:05:53:59] "POST /api/guac_get_deleted_kasms HTTP/1.1" 200 76 "" "axios/1.6.7" 2024-08-13 05:54:02,111 [DEBUG] client_api_server: Unauthenticated user made authorized API call to (healthcheck) from IP address (172.18.0.3). 2024-08-13 05:54:02,119 [INFO] cherrypy.access.140066493357744: 172.18.0.9 - - [13/Aug/2024:05:54:02] "GET /api/__healthcheck HTTP/1.1" 200 12 "" "axios/1.6.7" 2024-08-13 05:54:02,149 [INFO] cherrypy.access.140066493357744: 172.18.0.9 - - [13/Aug/2024:05:54:02] "POST /api/guac_get_managers HTTP/1.1" 200 23 "" "axios/1.6.7" 2024-08-13 05:54:09,421 [DEBUG] client_api_server: Unauthenticated user made authorized API call to (healthcheck) from IP address (127.0.0.1). 2024-08-13 05:54:09,429 [INFO] cherrypy.access.140066493357744: 127.0.0.1 - - [13/Aug/2024:05:54:09] "GET /api/__healthcheck HTTP/1.1" 200 12 "" "curl/7.68.0"

mmcclaskey commented 2 months ago

The issue may be indicated here...

[ERROR] client_api_server: Session recording is configured but not licensed. Will not enable.

Disable session recording in the group settings and try again. Session recording is programmed to fail secure, meaning that if recording is enabled but it fails to start for any reason, the RDP session will be terminated. Lets start with that and see if that corrects the issue.

gsgmcrcs commented 2 months ago

I have disabled session recording, still having the issue, that error isn't there anymore though.

Errors in Kasm portal:

https://registry.kasmweb.com/ - A valid url needs to be entered

Error calling Kasm Service API (screenshot?width=1000&height=1000) for kasm_id (65c556a1-18e9-4a2a-8870-2a03c80be740) : Request (https://proxy:443/guac_connect/api/screenshot?width=1000&height=1000) returned code (403) : (Screenshots are disabled for this user)

[65c556a118e94a2a88702a03c80be740] gong | Closing connection with code: 1000

mmcclaskey commented 2 months ago

Using an RDP client, you are able to launch the Visual Studio remoteApp?

Are you able to create an additional Server in Kasm that points to the same RDS deployment and is configured exactly the same, except the remoteapp configuration and then try to connect to it? I would like to confirm that a normal desktop connection is working as there is not really a lot to go on based on the logs. The Windows event logs are not really straight forward with respect to terminal server sessions.

gsgmcrcs commented 2 months ago

In regard to using an RDP client, this works fine, and I have no issues to launch the Visual Studio remoteApp.

I have tried what you have suggested in the past and again today, RDP session works as a normal remote desktop connection.

Yes, the Windows events logs don't really give me what I'm after.

mmcclaskey commented 2 months ago

We are currently in the middle of heavily refactoring the way remoteapps are handled, both in the UI and in the backend. If you can wait a few weeks, 1.16 will be out. You can try our developer preview now, but know that we are actively changing remoteapp stuff as we speak, so if you try it now, things will change by the time we release.

In the developer preview (and in 1.16 when it is released) you define remoteApp settings on the Workspace, not the server. The Workspaces has setting specific to remoteApp, so no editing JSON.

https://kasmweb-build-artifacts.s3.amazonaws.com/kasm_backend/branches/develop/kasm_workspaces_develop.tar.gz

gsgmcrcs commented 2 months ago

Sounds like a better approach to using remoteApp, I can use RDP until 1.16 official release and will be happy to test it out and provide feedback accordingly.

Really appreciate the prompt responses and assistance.