Unable to connect to NICE DCV Automatic Console Session created at boot.

0

I have followed the NICE DCV documentation for "Enabling Automatic Console Sessions." I edited dcv.conf and restarted the entire EC2 Instance. I have the NICE DCV Server set to start automatically at boot.

Observed Behavior

After booting a Linux EC2 Instance, the NICE DCV Server starts as expected. systemctl status dcvserver shows active (running). The session is started as expected per dcv list-sessions. It shows the owner = the user I set it to in the dcv.conf, and type:console. When I run a remote DCV Client connection, it connects, prompts for the user and password, accepts the OS user and password combination for the user set in dcv.conf, but then sits forever on "Connecting..." A connection is never made.

Expected Behavior

I expected to be able to connect via the DCV Client after the Instance is started, since the dcvserver is set to run at boot and configured to automatically start a console session.

Workaround

Run as the user specified in the dcv.conf file:

sudo dcv close-session console
dcv create-session console

Then connecting via the DCV Client works without any problems.

Has anyone else seen this behavior? Am I missing something that is not in the documentation but is needed to setup an automatic console session at dcvserver start?

asked a year ago785 views
4 Answers
1

I'm experiencing the same issue right now - with parallel cluster HeadNode - DCV automatic console connection not working at all - no matter which user I pick. After closing console session and spinning up virtual session all works fine - can use browser to connect to dcv server - otherwise it hangs on Connecting forever.

**Config: **

[connectivity]
idle-timeout = 480

[session-management/automatic-console-session]
permissions-file = '/etc/dcv/dcv_permissions.conf'

[log]
level = 'DEBUG'

[security]
ca-file = '/etc/parallelcluster/ext-auth-certificate.pem'

[session-management]
virtual-session-source-profile = true
create-session = true

[display]
display-encoders = ['turbojpeg', 'lz4', 'ffmpeg']

[session-management/defaults]
permissions-file = '/etc/dcv/dcv_permissions.conf'

Relevant output from server.log:

2023-06-26 21:05:36,044411 [ 14895:14895 ] DEBUG channel - Channel dcv::display (4, 0xaaab0b129590) created for client <IP>:58672
2023-06-26 21:05:36,044521 [ 14895:14895 ] DEBUG DCV - Sent connection confirm to <IP>:58672
2023-06-26 21:05:36,044533 [ 14895:14895 ] INFO  channel - Channel dcv::display (4, 0xaaab0b129590) of connection 1 successfully established with client <IP>:58672
2023-06-26 21:05:36,044540 [ 14895:14895 ] DEBUG connection - Data channel dcv::display for connection 1 is ready (0xaaab0af9e5b0)
2023-06-26 21:05:36,044546 [ 14895:14895 ] DEBUG connection - Data channel dcv::display connected for client connection 1
2023-06-26 21:05:36,044551 [ 14895:14895 ] DEBUG display - Starting Display protocol
2023-06-26 21:05:36,044559 [ 14895:14895 ] DEBUG display - Channel backend display not available. Waiting backend status change...
2023-06-26 21:05:36,418151 [ 14895:14895 ] DEBUG system-resource-monitor - CPU: 0.25% (real: 5.000555 user: 0.050382 sys: 0.000000) - vmem: 717.6 MiB (752,500,736 bytes) pmem: 35.6 MiB (37,347,328 bytes)
2023-06-26 21:05:37,128797 [ 14895:14895 ] DEBUG loginmonitor - Detected systemd update
2023-06-26 21:05:37,129069 [ 14895:14895 ] DEBUG loginmonitor - Retrieved 3 systemd sessions:
2023-06-26 21:05:37,129078 [ 14895:14895 ] DEBUG loginmonitor -   session-00  Id: c15895, State: 'opening', Type: 'unspecified', Class: 'background', VTNr: 'N/A', Display: '', Desktop: '', Service: 'sudo', User-uid: 0
2023-06-26 21:05:37,129084 [ 14895:14895 ] DEBUG loginmonitor -   session-01  Id: c15876, State: 'closing', Type: 'x11', Class: 'user', VTNr: 'N/A', Display: '', Desktop: '', Service: 'runuser-l', User-uid: 1210701382
2023-06-26 21:05:37,129089 [ 14895:14895 ] DEBUG loginmonitor -   session-02  Id: 942, State: 'active', Type: 'tty', Class: 'user', VTNr: 'N/A', Display: '', Desktop: '', Service: 'sshd', User-uid: 1210701382
2023-06-26 21:05:37,129094 [ 14895:14895 ] DEBUG loginmonitor - No active session selected
2023-06-26 21:05:37,129387 [ 14895:14895 ] DEBUG loginmonitor - Detected systemd update
2023-06-26 21:05:37,129620 [ 14895:14895 ] DEBUG loginmonitor - Retrieved 3 systemd sessions:
2023-06-26 21:05:37,129628 [ 14895:14895 ] DEBUG loginmonitor -   session-00  Id: c15895, State: 'active', Type: 'unspecified', Class: 'background', VTNr: 'N/A', Display: '', Desktop: '', Service: 'sudo', User-uid: 0
2023-06-26 21:05:37,129633 [ 14895:14895 ] DEBUG loginmonitor -   session-01  Id: c15876, State: 'closing', Type: 'x11', Class: 'user', VTNr: 'N/A', Display: '', Desktop: '', Service: 'runuser-l', User-uid: 1210701382
2023-06-26 21:05:37,129638 [ 14895:14895 ] DEBUG loginmonitor -   session-02  Id: 942, State: 'active', Type: 'tty', Class: 'user', VTNr: 'N/A', Display: '', Desktop: '', Service: 'sshd', User-uid: 1210701382
2023-06-26 21:05:37,129642 [ 14895:14895 ] DEBUG loginmonitor - No active session selected
2023-06-26 21:05:37,137608 [ 14895:14895 ] DEBUG loginmonitor - Detected systemd update
2023-06-26 21:05:37,137878 [ 14895:14895 ] DEBUG loginmonitor - Retrieved 3 systemd sessions:
2023-06-26 21:05:37,137886 [ 14895:14895 ] DEBUG loginmonitor -   session-00  Id: c15895, State: 'active', Type: 'unspecified', Class: 'background', VTNr: 'N/A', Display: '', Desktop: '', Service: 'sudo', User-uid: 0
2023-06-26 21:05:37,137891 [ 14895:14895 ] DEBUG loginmonitor -   session-01  Id: c15876, State: 'closing', Type: 'x11', Class: 'user', VTNr: 'N/A', Display: '', Desktop: '', Service: 'runuser-l', User-uid: 1210701382
2023-06-26 21:05:37,137896 [ 14895:14895 ] DEBUG loginmonitor -   session-02  Id: 942, State: 'active', Type: 'tty', Class: 'user', VTNr: 'N/A', Display: '', Desktop: '', Service: 'sshd', User-uid: 1210701382
2023-06-26 21:05:37,137900 [ 14895:14895 ] DEBUG loginmonitor - No active session selected
2023-06-26 21:05:37,138643 [ 14895:14895 ] DEBUG loginmonitor - Detected systemd update
2023-06-26 21:05:37,138874 [ 14895:14895 ] DEBUG loginmonitor - Retrieved 3 systemd sessions:
2023-06-26 21:05:37,138881 [ 14895:14895 ] DEBUG loginmonitor -   session-00  Id: c15895, State: 'closing', Type: 'unspecified', Class: 'background', VTNr: 'N/A', Display: '', Desktop: '', Service: 'sudo', User-uid: 0
2023-06-26 21:05:37,138886 [ 14895:14895 ] DEBUG loginmonitor -   session-01  Id: c15876, State: 'closing', Type: 'x11', Class: 'user', VTNr: 'N/A', Display: '', Desktop: '', Service: 'runuser-l', User-uid: 1210701382
2023-06-26 21:05:37,138891 [ 14895:14895 ] DEBUG loginmonitor -   session-02  Id: 942, State: 'active', Type: 'tty', Class: 'user', VTNr: 'N/A', Display: '', Desktop: '', Service: 'sshd', User-uid: 1210701382
2023-06-26 21:05:37,138894 [ 14895:14895 ] DEBUG loginmonitor - No active session selected
2023-06-26 21:05:37,139600 [ 14895:14895 ] DEBUG loginmonitor - Detected systemd update
2023-06-26 21:05:37,139768 [ 14895:14895 ] DEBUG loginmonitor - Retrieved 2 systemd sessions:
2023-06-26 21:05:37,139774 [ 14895:14895 ] DEBUG loginmonitor -   session-00  Id: c15876, State: 'closing', Type: 'x11', Class: 'user', VTNr: 'N/A', Display: '', Desktop: '', Service: 'runuser-l', User-uid: 1210701382
2023-06-26 21:05:37,139779 [ 14895:14895 ] DEBUG loginmonitor -   session-01  Id: 942, State: 'active', Type: 'tty', Class: 'user', VTNr: 'N/A', Display: '', Desktop: '', Service: 'sshd', User-uid: 1210701382
2023-06-26 21:05:37,139783 [ 14895:14895 ] DEBUG loginmonitor - No active session selected
2023-06-26 21:05:37,139812 [ 14895:14895 ] DEBUG session - System session c15895 disconnected
2023-06-26 21:05:37,158868 [ 14895:14895 ] DEBUG loginmonitor - Detected systemd update
2023-06-26 21:05:37,159148 [ 14895:14895 ] DEBUG loginmonitor - Retrieved 3 systemd sessions:
2023-06-26 21:05:37,159159 [ 14895:14895 ] DEBUG loginmonitor -   session-00  Id: c15896, State: 'opening', Type: 'unspecified', Class: 'background', VTNr: 'N/A', Display: '', Desktop: '', Service: 'sudo', User-uid: 0
2023-06-26 21:05:37,159165 [ 14895:14895 ] DEBUG loginmonitor -   session-01  Id: c15876, State: 'closing', Type: 'x11', Class: 'user', VTNr: 'N/A', Display: '', Desktop: '', Service: 'runuser-l', User-uid: 1210701382
2023-06-26 21:05:37,159170 [ 14895:14895 ] DEBUG loginmonitor -   session-02  Id: 942, State: 'active', Type: 'tty', Class: 'user', VTNr: 'N/A', Display: '', Desktop: '', Service: 'sshd', User-uid: 1210701382
2023-06-26 21:05:37,159174 [ 14895:14895 ] DEBUG loginmonitor - No active session selected
2023-06-26 21:05:37,159753 [ 14895:14895 ] DEBUG loginmonitor - Detected systemd update
2023-06-26 21:05:37,159987 [ 14895:14895 ] DEBUG loginmonitor - Retrieved 3 systemd sessions:
2023-06-26 21:05:37,159994 [ 14895:14895 ] DEBUG loginmonitor -   session-00  Id: c15896, State: 'active', Type: 'unspecified', Class: 'background', VTNr: 'N/A', Display: '', Desktop: '', Service: 'sudo', User-uid: 0
2023-06-26 21:05:37,159999 [ 14895:14895 ] DEBUG loginmonitor -   session-01  Id: c15876, State: 'closing', Type: 'x11', Class: 'user', VTNr: 'N/A', Display: '', Desktop: '', Service: 'runuser-l', User-uid: 1210701382
2023-06-26 21:05:37,160004 [ 14895:14895 ] DEBUG loginmonitor -   session-02  Id: 942, State: 'active', Type: 'tty', Class: 'user', VTNr: 'N/A', Display: '', Desktop: '', Service: 'sshd', User-uid: 1210701382
2023-06-26 21:05:37,160013 [ 14895:14895 ] DEBUG loginmonitor - No active session selected
2023-06-26 21:05:37,167406 [ 14895:14895 ] DEBUG loginmonitor - Detected systemd update
2023-06-26 21:05:37,167665 [ 14895:14895 ] DEBUG loginmonitor - Retrieved 3 systemd sessions:
2023-06-26 21:05:37,167673 [ 14895:14895 ] DEBUG loginmonitor -   session-00  Id: c15896, State: 'active', Type: 'unspecified', Class: 'background', VTNr: 'N/A', Display: '', Desktop: '', Service: 'sudo', User-uid: 0
2023-06-26 21:05:37,167678 [ 14895:14895 ] DEBUG loginmonitor -   session-01  Id: c15876, State: 'closing', Type: 'x11', Class: 'user', VTNr: 'N/A', Display: '', Desktop: '', Service: 'runuser-l', User-uid: 1210701382
2023-06-26 21:05:37,167683 [ 14895:14895 ] DEBUG loginmonitor -   session-02  Id: 942, State: 'active', Type: 'tty', Class: 'user', VTNr: 'N/A', Display: '', Desktop: '', Service: 'sshd', User-uid: 1210701382
2023-06-26 21:05:37,167687 [ 14895:14895 ] DEBUG loginmonitor - No active session selected
2023-06-26 21:05:37,168264 [ 14895:14895 ] DEBUG loginmonitor - Detected systemd update
2023-06-26 21:05:37,168487 [ 14895:14895 ] DEBUG loginmonitor - Retrieved 3 systemd sessions:
2023-06-26 21:05:37,168494 [ 14895:14895 ] DEBUG loginmonitor -   session-00  Id: c15896, State: 'closing', Type: 'unspecified', Class: 'background', VTNr: 'N/A', Display: '', Desktop: '', Service: 'sudo', User-uid: 0
2023-06-26 21:05:37,168499 [ 14895:14895 ] DEBUG loginmonitor -   session-01  Id: c15876, State: 'closing', Type: 'x11', Class: 'user', VTNr: 'N/A', Display: '', Desktop: '', Service: 'runuser-l', User-uid: 1210701382
2023-06-26 21:05:37,168504 [ 14895:14895 ] DEBUG loginmonitor -   session-02  Id: 942, State: 'active', Type: 'tty', Class: 'user', VTNr: 'N/A', Display: '', Desktop: '', Service: 'sshd', User-uid: 1210701382

Commands:

dcv list-sessions
Session: 'console' (owner:dcv type:console)
sudo dcv list-connections console
There are no clients connected to the session.

After providing credentiaals to browsser dcv console hangs on Connecting and list-connections show connection:

sudo dcv list-connections console
Connected client for user '<user>'(ID: '1')

Few warnings that pops up:

  1. No agent connection available with extensions backend, could not send the start extensions manager request
  2. Channel backend display not available. Waiting backend status change...
  3. No active session selected

Any hints apreciated...

Lukasz
answered 10 months ago
0

Alright - after spending another few hours I got to the bottom of this. Problem is that dcv console connection is trying to use existing/running X server session. First we need to verify withps aux | grep X if the process for X is running. In my case X server was throwing error that there's no screen to attach to. I fix it following instructions here:

https://docs.aws.amazon.com/dcv/latest/adminguide/setting-up-installing-linux-prereq.html#linux-prereq-xserver

and the dummy section here:

https://docs.aws.amazon.com/dcv/latest/adminguide/setting-up-installing-linux-prereq.html#linux-prereq-nongpu

Lukasz
answered 10 months ago
  • Unfortunately, for my case I found that I had already performed the setup of the X server and Dummy configuration. The issue remains where the DCV client is stuck on "Connecting" forever. The work-around of killing the automatically created dcv session and then creating a new one is the only sequence I have found to work.

0

Zubair_M's response is not useful. It is a reposting of the documentation that was referenced in the original question and does not contribute anything to this question.

answered a year ago
-1

NICE DCV offers two types of sessions—console sessions and virtual sessions. Only one console session can be hosted on the NICE DCV server at a time. Console sessions are created and managed by the Administrator on Windows NICE DCV servers and the root user on Linux NICE DCV servers.

After saving below code to the dcv.conf file you need to stop and start the DCV server. [session-management] create-session = true

[session-management/automatic-console-session] owner="session-owner"

To stop the NICE DCV server on Linux Use the following commands: RHEL, CentOS, and SUSE Linux Enterprise 12 $ sudo systemctl stop dcvserver

To start the NICE DCV server on Linux Use the following commands: RHEL, CentOS, SUSE Linux Enterprise 12, and Ubuntu 18.x $ sudo systemctl start dcvserver

Logs need to be looked at and the config file to know the exact cause of the issue. Please create a support case with AWS to know why it is behaving like that. Without looking at those logs it hard to determine why it is causing issue.

AWS
SUPPORT ENGINEER
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions