Joustie's blog

Jan 11, 2022 - 4 minute read

Playing around with NICE DCV Part 3

In part 1 I could get the DCV Session manager to answer with a list of sessions (which was empty at first). In part 2 I installed the DCV connection gateway. In this part of the series, I will use the DCV client on my desktop to make a connection to a Linux DCV server through a DCV connection gateway.

Before we dive into creating sessions and connecting with the DCV client I must admit I sort of also did a “Playing around with NICE DCV Part 2.5”, I installed persistence for the session manager as described in the documentation. Now certain runtime settings are saved across restarts. It all works, I chose to use dynamodb as the backing store.

More interesting is the next part, creating sessions.

I tried with the NICE DCV Session Manager CLI from my workstation:

./dcvsm create-session --name mysession --owner joost --type Console
DEBUG : https://joustie1.auth.eu-west-1.amazoncognito.com/oauth2/
WARNING : Validation of SSL certificates is disabled
status code: 200
DEBUG : Response: {"access_token":"xxxxxx","expires_in":3600,"token_type":"Bearer"}
DEBUG : Configuration loaded.
DEBUG : ConfigurationParameter.BROKER_URL : https://3.250.99.230:8443/
DEBUG : ConfigurationParameter.OUTPUT_FORMAT : json
DEBUG : ConfigurationParameter.DEBUG : True
DEBUG : ConfigurationParameter.NO_VERIFY_SSL : True
DEBUG : ConfigurationParameter.CA_BUNDLE : None
DEBUG : ConfigurationParameter.AUTH_SERVER : https://joustie1.auth.eu-west-1.amazoncognito.com/oauth2/
DEBUG : ConfigurationParameter.CLIENT_ID : xxxxx
DEBUG : ConfigurationParameter.CLIENT_PASSWORD : **********
DEBUG : ConfigurationParameter.OAUTH2_TOKEN : **********
DEBUG : Create Sessions Request: [{'autorun_file': None,
 'autorun_file_arguments': [],
 'dcv_gl_enabled': None,
 'disable_retry_on_failure': None,
 'enqueue_request': None,
 'init_file': None,
 'init_file_path': None,
 'max_concurrent_clients': None,
 'name': 'mysession',
 'owner': 'joost',
 'permissions_file': None,
 'requirements': None,
 'storage_root': None,
 'type': 'Console'}]
{
    "request_id": "94c061c2-6ded-405a-8c32-ffe94e142ad6",
    "successful_list": [
        {
            "id": "66c34163-7d54-45a1-8e0e-2bdc4e524e1b",
            "name": "mysession",
            "owner": "joost",
            "type": "Console",
            "state": "CREATING"
        }
    ],
    "unsuccessful_list": []
}

That seems to have done something!

Double checked by calling describe-sessions:

#./dcvsm  describe-sessions
DEBUG : https://joustie1.auth.eu-west-1.amazoncognito.com/oauth2/
WARNING : Validation of SSL certificates is disabled
status code: 200
DEBUG : Response: {"access_token":"xxxxxx","expires_in":3600,"token_type":"Bearer"}
DEBUG : Configuration loaded.
DEBUG : ConfigurationParameter.BROKER_URL : https://3.250.99.230:8443/
DEBUG : ConfigurationParameter.OUTPUT_FORMAT : json
DEBUG : ConfigurationParameter.DEBUG : True
DEBUG : ConfigurationParameter.NO_VERIFY_SSL : True
DEBUG : ConfigurationParameter.CA_BUNDLE : None
DEBUG : ConfigurationParameter.AUTH_SERVER : https://joustie1.auth.eu-west-1.amazoncognito.com/oauth2/
DEBUG : ConfigurationParameter.CLIENT_ID : xxxx
DEBUG : ConfigurationParameter.CLIENT_PASSWORD : **********
DEBUG : ConfigurationParameter.OAUTH2_TOKEN : **********
DEBUG : Describe Sessions Request: {'filters': [], 'max_results': None, 'next_token': None, 'session_ids': []}
{
    "request_id": "e38ec8de-f0b7-4ebd-9c32-75c642d63f35",
    "sessions": [
        {
            "id": "66c34163-7d54-45a1-8e0e-2bdc4e524e1b",
            "name": "mysession",
            "owner": "joost",
            "server": {
                "id": "aXAtMTcyLTE2LTEtMTI0LmV1LXdlc3QtMS5jb21wdXRlLmludGVybmFsLTE3Mi4xNi4xLjEyNC04MGVjMzEzZWVkZDk0ZjJmYmNjOTVmOWM5MDdmYjYwYw==",
                "ip": "172.16.1.124",
                "hostname": "ip-172-16-1-124.eu-west-1.compute.internal",
                "port": "8443",
                "endpoints": [
                    {
                        "port": 8443,
                        "web_url_path": "/",
                        "protocol": "HTTP"
                    }
                ],
                "web_url_path": "/",
                "version": "2021.2.11445",
                "session_manager_agent_version": "2021.3.453",
                "availability": "UNAVAILABLE",
                "unavailability_reason": "SERVER_FULL",
                "console_session_count": 1,
                "virtual_session_count": 0,
                "tags": [
                    {
                        "key": "dcv:os-family",
                        "value": "linux"
                    },
                    {
                        "key": "dcv:max-virtual-sessions",
                        "value": "-1"
                    },
                    {
                        "key": "dcv:max-concurrent-sessions-per-user",
                        "value": "1"
                    }
                ]
            },
            "type": "CONSOLE",
            "state": "READY",
            "creation_time": "2022-01-11T20:10:20.813000+00:00",
            "num_of_connections": 0,
            "storage_root": ""
        }
    ]
}

And when I check on the Linux DCV server itself:

# dcv list-sessions
Session: '66c34163-7d54-45a1-8e0e-2bdc4e524e1b' (owner:joost type:console name:mysession)

Seems everything is ready to make a connection.

So I would think I can make a connection through the connection gateway to this DCV server right?

DCV client connection

Unfortunately this fails…

Below is the log file of the DCV connection gateway. The broker and the DCV server itself log nothing about the connection attempt.

Jan 11 21:04:43.289  INFO HTTP: New incoming connection from 45.83.235.76:59652 | Splicer Connection ID: 2
Jan 11 21:04:43.318 DEBUG HTTP:Splicer Connection{id=2}: Rejecting websocket request relative_path=auth.
Jan 11 21:04:43.318  WARN HTTP:Splicer Connection{id=2}: Error occurred while notifying for HTTP request ready: no available capacity
Jan 11 21:04:43.319  INFO HTTP:Splicer Connection{id=2}:WebResources: Serving request GET /auth
Jan 11 21:04:43.319 DEBUG HTTP:Splicer Connection{id=2}:WebResources: Extracted relative_path=auth from full path=/auth
Jan 11 21:04:43.319  INFO HTTP:Splicer Connection{id=2}:WebResources: Routing request to http://172.16.1.60:8449/auth.
Jan 11 21:04:43.319 DEBUG HTTP:Splicer Connection{id=2}:WebResources: Sending GET request /auth.
Jan 11 21:04:43.320  INFO HTTP:Splicer Connection{id=2}:WebResources: Unable to connect: error sending request for url ([obfuscated] http://172.16.1.60:8449/auth): error trying to connect: tcp connect error: Connection refused (os error 111)

So it really does need this web resource server (remember the former post)? And why look for ‘/auth’? I just like to use the NICE DCV client to pass through the gateway?

Also tried to connect with hostname#session_id as stated on the client documentation but that made no difference.

I really want this to work, so I will continue, maybe ask for support in forums, etc.

Hopefully, I can create a ‘Playing around with DCV Part 4’ soon to show you success!