DCV Session Manager Installation: Broker and Agent

The DCV Session Manager is a set of software packages (broker and agent) and an application programming interface (API) that makes it easy for developers and independent software vendors (ISVs) to build front-end applications that create and manage the lifecycle of NICE DCV sessions.

Installing the DCV Session Manager Broker and Agent on CentOS 8.2

The installation overview below shows the broker installation on CentOS 8.2. Other OS are similar (more details can be found here). We install the DCV Session Manager Broker with the following steps:

sudo rpm --import https://d1uj6qtbmh3dt5.cloudfront.net/NICE-GPG-KEY
wget https://d1uj6qtbmh3dt5.cloudfront.net/2020.2/SessionManagerBrokers/nice-dcv-session-manager-broker-2020.2.78-1.el8.noarch.rpm
sudo yum install -y nice-dcv-session-manager-broker-2020.2.78-1.el8.noarch.rpm
# ... the SM broker package installs the following packages:
# Installed:
#  alsa-lib-1.2.1.2-3.el8.x86_64
#  atk-2.28.1-1.el8.x86_64
#  copy-jdk-configs-3.7-1.el8.noarch
#  gdk-pixbuf2-modules-2.36.12-5.el8.x86_64
#  giflib-5.1.4-3.el8.x86_64
#  gtk-update-icon-cache-3.22.30-5.el8.x86_64
#  gtk2-2.24.32-4.el8.x86_64
#  hicolor-icon-theme-0.17-2.el8.noarch
#  jasper-libs-2.0.14-4.el8.x86_64
#  java-1.8.0-openjdk-1:1.8.0.272.b10-1.el8_2.x86_64
#  java-1.8.0-openjdk-headless-1:1.8.0.272.b10-1.el8_2.x86_64
#  javapackages-filesystem-5.3.0-1.module_el8.0.0+11+5b8c10bd.noarch
#  jbigkit-libs-2.1-14.el8.x86_64
#  libXcomposite-0.4.4-14.el8.x86_64
#  libXcursor-1.1.15-3.el8.x86_64
#  libXdamage-1.1.4-14.el8.x86_64
#  libXfixes-5.0.3-7.el8.x86_64
#  libXi-1.7.9-7.el8.x86_64
#  libXinerama-1.1.4-1.el8.x86_64
#  libXrandr-1.5.1-7.el8.x86_64
#  libXtst-1.2.3-7.el8.x86_64
#  libfontenc-1.1.3-8.el8.x86_64
#  libjpeg-turbo-1.5.3-10.el8.x86_64
#  libtiff-4.0.9-17.el8.x86_64
#  lksctp-tools-1.0.18-3.el8.x86_64
#  nice-dcv-session-manager-broker-2020.2.78-1.el8.noarch
#  ttmkfdir-3.0.9-54.el8.x86_64
#  tzdata-java-2020d-1.el8.noarch
#  xorg-x11-font-utils-1:7.5-40.el8.x86_64
#  xorg-x11-fonts-Type1-7.5-19.el8.noarch
sudo systemctl enable dcv-session-manager-broker
sudo systemctl start dcv-session-manager-broker
# we can check if the SM Broker started correctly with
journalctl -xe
# The incoming port 8445 (default) should be open
sudo iptables-save
sudo firewall-cmd --zone=public --add-port=8445/tcp --permanent
sudo firewall-cmd --reload
sudo firewall-cmd --list-all
sudo iptables-save | grep 8445
# copy the broker certificate 
sudo cp /var/lib/dcvsmbroker/security/dcvsmbroker_ca.pem $HOME

After having started the broker we can start the agent e.g. for testing on the same machine:

# Download the Session Manager Agent
wget https://d1uj6qtbmh3dt5.cloudfront.net/2020.2/SessionManagerAgents/nice-dcv-session-manager-agent-2020.2.183-1.el8.x86_64.rpm
sudo yum install -y nice-dcv-session-manager-agent-2020.2.183-1.el8.x86_64.rpm
cp dcvsmbroker_ca.pem /etc/dcv-session-manager-agent/
# append the configuration to the agent.conf file 
echo "
broker_host = '$HOSTNAME'
ca_file = '/etc/dcv-session-manager-agent/dcvsmbroker_ca.pem'
" >> /etc/dcv-session-manager-agent/agent.conf 
sudo systemctl start dcv-session-manager-agent

With DCV Session Manager agents running you can query the session broker to show the registered agents:

> dcv-session-manager-broker  describe-agent-clients
 Session manager agent clients
 [ {
   "active" : true,
   "id" : "daeaf3e8-a59f-445a-8194-9e65a8d7dddc",
   "softwareStatement" : "ewogICJpZCIgOiAiMzQxOTUzMmMtNWU3Yy00ZTdhLWI2MWUtZmFjODQ5NjJmYzc5IiwKICAiaXNzdWVkQXQiIDogMTU5OTQ5NTcwMi4wMDAwMDAwMDAsCiAgImNsaWVudE5hbWUiIDogIkRDViBTZXNzaW9uIE1hbmFnZXIgQWdlbnQiLAogICJjbGllbnRWZXJzaW9uIiA6ICIyMDIwLjIiCn0=",
   "name" : "dcv-sm-agent"
 } ]

Installing the DCV Session Manager Agent on Windows

The DCV SM agent packages can be found at https://download.nice-dcv.com/ in the agent section. Executing the MSI installer guides through the installation process:

Then accept the EULA and proceed to:

and the installation is finished:

Copy the dcvsmbroker_ca.pem certificate from the SM broker host to C:\Program Files\NICE\DCVSessionManagerAgent\conf\dcvsmbroker_ca.pem and adapt the agent.conf similar to the following configuration as admin user adapting the broker host according to your setup:

# ......
# hostname or IP of the broker. This parameter is mandatory.
broker_host = 'centos8'
# CA used to validate the certificate of the broker.
ca_file = 'C:\Program Files\NICE\DCVSessionManagerAgent\conf\dcvsmbroker_ca.pem'
# ......

Open a Windows command shell (cmd) as Admin user and execute the following commands to reread the configuration:

sc stop DcvSessionManagerAgentService
sc start DcvSessionManagerAgentService

To inspect the logfiles we can have a look at the files in C:\ProgramData\NICE\DcvSessionManagerAgent\log per default. If the agent can connect to the broker on port 8445 by default you should see an output in agent.log.* similar to this (in case you have turned on debugging):

2020-11-27 13:53:35,429060 DEBUG ThreadId(11) dcvsessionmanageragent::dcv::cli:Executing command Command { std: "C:\\Program Files\\NICE\\DCV\\Server\\bin\\dcv" "list-endpoints", kill_on_drop: false }
2020-11-27 13:53:35,482422 DEBUG ThreadId(11) dcvsessionmanageragent::dcv::cli:Endpoints: EndpointList { endpoints: [Endpoint { ip: None, hostname: None, port: Some(8443), web_url_path: Some("/"), protocol: Some("http") }] }
2020-11-27 13:53:35,484032 DEBUG ThreadId(11) dcvsessionmanageragent::utils:Network interface: Ifv4Addr { ip: 192.168.178.116, netmask: 255.255.255.0, broadcast: Some(192.168.178.255) }
2020-11-27 13:53:35,484075 DEBUG ThreadId(11) dcvsessionmanageragent::dcv::cli:Executing command Command { std: "C:\\Program Files\\NICE\\DCV\\Server\\bin\\dcv" "list-sessions" "--json", kill_on_drop: false }
2020-11-27 13:53:35,527578 DEBUG ThreadId(11) dcvsessionmanageragent::dcv::cli:Session List SessionList { sessions: [Session { id: "console", name: None, owner: "Administrator", x11_display: None, x11_authority: None, num_of_connections: 1, creation_time: Some("1606483351000"), last_disconnection_time: Some("1606483443000"), licensing_mode: Some("demo"), licenses: Some([License { product: "dcv", status: "licensed", check_timestamp: Some("1606485151000") }]), display_layout: Some([DisplayLayout { width: 1920, height: 1080, x: 0, y: 0 }]), storage_root: Some(""), session_type: Some("CONSOLE") }] }
2020-11-27 13:53:35,527862 DEBUG ThreadId(11) dcvsessionmanageragent::tags:Failed to read tags from directory: Cannot find path. (os error 3)
2020-11-27 13:53:35,572258  INFO ThreadId(11) dcvsessionmanageragent::agent:Processing broker message "{\n  \"sessionsUpdateResponse\" : {\n    \"requestId\" : \"bcd3403041fb425cabc868308cf81441\",\n    \"result\" : {\n      \"success\" : true\n    }\n  }\n}"
2020-11-27 13:53:35,572299  INFO ThreadId(11) dcvsessionmanageragent::agent:Received sessions update response

With tags you can categorize your agents and DCV servers. Configure the tagfolder in the agent.conf file e.g. like this:
tags_folder = 'C:\Program Files\NICE\DCVSessionManagerAgent\conf\tags' and create a file tags.txt in that directory configuring the tags with e.g. the content:

gpu = "G4"
dcv_version = "2020.2"
disk = "500"

The DCV Session Manager is integrated with the EnginFrame Views Session Management Portal. Any questions just let us know.