I have an application that requires a single shared centos 7 instance that hosts several user accounts. Various users will remotely log into their respective accounts (sometimes concurrently) using system authentication (their linux passwords) to do work through niceDCV. I have setup a script that will automatically launch several niceDCV sessions for each user that follows this format:
sudo dcv create-session --owner <username1> --user <username1> <username1>-session
sudo dcv create-session --owner <username2> --user <username2> <username2>-session
After running this script, if I run: "sudo dcv list-sessions", I get confirmation that there is a session for both users. If I try connecting with nicedcv client, only one is successful. They other reports the following: "Unable to connect. Check the hostname/address and try again or contact the administrator".
Other interesting points:
- Using "sudo dcv describe-session" I can get extra information about the sessions. The session I can connect to is the one with lowest X display number.
- This remains true even if a third dcv session is established (only the one with the lowest X display number connects)
- I can establish two connections in parallel if I follow these steps. :
- launch one dcv session for the user with the higher X display number
- connect through nicedcv to the user with the higher X display number
- launch another dcv session for the user with the lower X display number
- connect through nicedcv to the user with the lower X display number
- On a failed connect, the dcv log gets updated (as shown in the anonymized sample below). In this example, when username1 attempts to login, a warning is thrown because it cannot create a connection to username2's session
<timestamp> INFO authenticator - Received authentication request from client <IP>
<timestamp> INFO authenticator - Sending authentication result OK to <IP> for user <username1> (2 sessions)
<timestamp> INFO authenticator - Cannot authenticate client <IP> Error reading data from TLS socket: error:00000005:lib(0):func(0):DH lib
<timestamp> INFO authenticator - Requesting token authentication for session <username2>-session using 'system' method
<timestamp> WARN frontend-handler - Cannot create connection from client <IP> to session '<username2>-session': User '<username>' not authorized on any channel
Is there a way to correct this behaviour so that when multiple dcv sessions are running they can all be connected to?