Questions tagged with NICE DCV

Content language: English

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

NICE DCV Docker Container Ubuntu

I am trying to setup a GUI-less docker container using this guide: https://www.ni-sp.com/nice-dcv-in-containers/#nice-dcv-container-with-nvidia-gpu The container will run a vtk render window that should be streamed to the NICE DCV web-client SDK. The application we are going to run, however, requires Ubuntu 20.04 due to some dependencies and build pipelines. So I am currently trying to figure out how to get the docker container running with Ubuntu as OS with Nvidia drivers. The host OS is also Ubuntu 20.04 (running on g4dn.xlarge EC2 instance) and the provided dcv-container-build.sh script handles the setup of the host. This script has not been changed. While the DCV server itself works and I can connect to it, the XServer itself cannot find the display. Running `sudo DISPLAY=:0 XAUTHORITY=$(ps aux | grep "X.*\-auth" | grep -v grep | sed -n 's/.*-auth \([^ ]\+\).*/\1/p') xhost | grep "LOCAL:$"` returns `xhost: unable to open display ":0"` Running `xhost +` on the host results in `xhost: unable to open display ""` Nvidia-smi works and the driver 510.85.02 is installed on host and container. dcvgldiag returns: ``` ERROR (1/3) Cannot ping 'ip-10-1-2-7'. Please, check you network configuration. ERROR (2/3) Cannot find a running 3D X Server [:0] Please, make sure the X process is started. Try switching to runlevel 3 and back to runlevel 5. ERROR (3/3) Cannot start a temporary 3D X Server on display :0 Please, check the X logs for display 0. ``` The ping check does not work because ping is not is not installed, so that can be ignored for now. I have adapted the provided Dockerfile/scripts the following way: **Dockerfile:** ``` # BASE IMAGE WITH NVIDIA DRIVERS, XSERVER AND NICE DCV # =============================================================== FROM ubuntu:20.04 as dcv USER root # Prepare the container to run systemd inside ENV container docker # Install tools #RUN yum -y install tar vim firewalld file wget kmod RUN apt-get update -y&&\ apt-get install -y tar vim wget kmod software-properties-common apt-transport-https sudo pciutils kmod ca-certificates xz-utils && \ apt-get update RUN apt update && apt upgrade && apt install curl -y # install mesa RUN add-apt-repository ppa:kisak/turtle -y && \ apt update && \ apt upgrade -y RUN apt-get install -y mesa-utils # Install X server RUN apt-get -y install xauth xserver-xorg-core xserver-xorg xorg xorg openbox x11-utils xfonts-base xterm libxvmc-dev libxatracker-dev xvattr # Install Nvidia Driver, configure Xorg, install NICE DCV server ENV NVIDIA_VISIBLE_DEVICES all # ENV NVIDIA_DRIVER_CAPABILITIES compute,utility ENV NVIDIA_DRIVER_CAPABILITIES all ADD NVIDIA-installer.run /tmp/NVIDIA-installer.run # RUN wget -q http://us.download.nvidia.com/XFree86/Linux-x86_64/430.26/NVIDIA-Linux-x86_64-430.26.run -O /tmp/NVIDIA-installer.run RUN bash /tmp/NVIDIA-installer.run --accept-license \ --install-libglvnd \ --no-questions --no-kernel-module-source \ --no-nvidia-modprobe --no-kernel-module \ --disable-nouveau \ --no-backup \ --ui=none \ && rm -f /tmp/NVIDIA-installer.run \ && nvidia-xconfig --preserve-busid --enable-all-gpus -connected-monitor=DFP-0,DFP-1,DFP-2,DFP-3 RUN wget https://d1uj6qtbmh3dt5.cloudfront.net/NICE-GPG-KEY && \ gpg --import NICE-GPG-KEY # TODO remove install files RUN wget https://d1uj6qtbmh3dt5.cloudfront.net/2022.2/Servers/nice-dcv-2022.2-13907-ubuntu2004-x86_64.tgz && \ tar -xvzf nice-dcv-2022.2-13907-ubuntu2004-x86_64.tgz && cd nice-dcv-2022.2-13907-ubuntu2004-x86_64 && \ apt install ./nice-dcv-server_2022.2.13907-1_amd64.ubuntu2004.deb -y && \ apt install ./nice-dcv-web-viewer_2022.2.13907-1_amd64.ubuntu2004.deb -y && \ usermod -aG video dcv && \ apt install ./nice-xdcv_2022.2.481-1_amd64.ubuntu2004.deb -y && \ DEBIAN_FRONTEND=noninteractive apt install ./nice-dcv-gl_2022.2.983-1_amd64.ubuntu2004.deb -y && \ apt install ./nice-dcv-simple-external-authenticator_2022.2.198-1_amd64.ubuntu2004.deb -y # Define the dcvserver.service COPY dcvserver.service /usr/lib/systemd/system/dcvserver.service # Copy the NICE DCV license file COPY license.lic /etc/dcv/license.lic # Send Notification message DCV session ready COPY send_dcvsessionready_notification.sh /usr/local/bin/ # Open required port on firewall, create test user, send notification, start DCV session for the user COPY startup_script.sh /usr/local/bin # Start DCV server and initialize level 5 COPY run_script.sh /usr/local/bin/ # Append the startup script to be executed at the end of initialization and fix permissions; Ubuntu does not have a rc.local file RUN chmod +x "/usr/local/bin/run_script.sh" \ "/usr/local/bin/send_dcvsessionready_notification.sh" \ "/usr/local/bin/startup_script.sh" EXPOSE 8443 CMD ["/usr/local/bin/run_script.sh"] ``` **run_script.sh:** ``` function tailDcvLog { echo "Waiting for X and DCV Server to initialize ... " echo while [[ ! -f /var/log/dcv/server.log ]] ;do # echo -n '.' sleep 3 done # echo -n '.' sleep 3 # echo " OK" # uncomment the following line in case you want to see the DCV server log # tail -f -n500 /var/log/dcv/server.log } # Disable nouveau # if [ -f /usr/bin/nvidia-smi -a ! -f /etc/modprobe.d/blacklist.conf ] ; then # cat >> /etc/modprobe.d/blacklist.conf <<EOF # blacklist nouveau # options nouveau modeset=0 # EOF # fi # Configure the NICE DCV License ip=`curl --silent http://169.254.169.254/latest/meta-data/local-ipv4 | grep \.` if [ "$ip" == "" ] ; then # We are not on AWS and need a DCV trial license cp /etc/dcv/dcv.conf /etc/dcv/dcv.conf.org cat /etc/dcv/dcv.conf.org | awk '/#license-file/ {print "license-file = \"/etc/dcv/license.lic\""}; {print}' > /etc/dcv/dcv.conf pubip="Public_IP_or_Server_Name" else # on AWS NICE DCV please enable license access to the S3 bucket pubip=`curl --silent http://169.254.169.254/latest/meta-data/public-ipv4 | grep \.` fi # Enable the DCV service # res1=`systemctl enable dcvserver 2>&1` RED='\033[0;31m'; GREEN='\033[0;32m'; GREY='\033[0;37m'; BLUE='\034[0;37m'; NC='\033[0m' ORANGE='\033[0;33m'; BLUE='\033[0;34m'; echo echo -e "${GREEN}##########################################" echo "NICE DCV Container starting up ... " echo -e "##########################################${NC}" echo # Show DCV Server log in case tailDcvLog & # Setup user and DCV session ( sleep 5; /usr/local/bin/startup_script.sh ; RED='\033[0;31m'; GREEN='\033[0;32m'; GREY='\033[0;37m'; BLUE='\034[0;37m'; NC='\033[0m' ORANGE='\033[0;33m'; BLUE='\033[0;34m'; echo echo -e "${GREEN}###############################################" echo "Your NICE DCV Session is ready to login to ... " echo -e "###############################################${NC}" echo echo "The default user name is “user” and the password “dcv” (can be adapted in “startup_script.sh”)." echo echo "To connect to DCV you have 2 options: " echo # echo -e '\e]8;;http://example.com\aThis is a link\e]8;;\a' echo -e "Web browser: ${GREEN}\e]8;;https://${pubip}:8443\ahttps://${pubip}:8443\e]8;;\a${NC} (you can accept the security exception as there is no SSL certificate installed) – or –" echo echo -e "DCV native client for best performance: Enter “${GREEN}${pubip}${NC}” in the connection field (the portable DCV client can be downloaded here: https://download.nice-dcv.com/)" echo ) & # echo ">> Exec /usr/sbin/init" exec /usr/sbin/init 3 ``` **startup_script.sh:** ``` exec &>> /var/log/startup_script.log set -xe # ps -ef > /tmp/ps.ef # Check if we have a well configured xorg.conf and create one in case if [ ! -f /etc/X11/xorg.conf -o "`grep BusID /etc/X11/xorg.conf | grep PCI`" == "" ] ; then sleep 5 echo "Updating the X server configuration ... " sudo systemctl isolate multi-user.target sleep 1 # dcvgladmin disable nvidia-xconfig --preserve-busid --enable-all-gpus --connected-monitor=DFP-0,DFP-1,DFP-2,DFP-3 # add Option "HardDPMS" "false" sed '/^Section "Device"/a \ \ \ \ Option "HardDPMS" "false"' /etc/X11/xorg.conf > /tmp/xorg.conf mv /tmp/xorg.conf /etc/X11/xorg.conf sed '/^Section "Device"/a \ \ \ \ Option "UseDisplayDevice" "none"' /etc/X11/xorg.conf > /tmp/xorg.conf # mv /tmp/xorg.conf /etc/X11/xorg.conf sleep 1 # dcvgladmin enable sudo systemctl isolate graphical.target sleep 1 sudo systemctl enable dcvserver 2>&1 sudo systemctl restart dcvserver fi # AWS="1" _username="user" _passwd="dcv" adduser "${_username}" echo "${_username}:${_passwd}" |chpasswd /usr/bin/dcv create-session --type=virtual --storage-root=%home% --owner "${_username}" --user "${_username}" "${_username}session" ``` And here's the xorg.conf as well in the docker container: ``` Section "ServerLayout" Identifier "Layout0" Screen 0 "Screen0" InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Mouse0" "CorePointer" EndSection Section "Files" EndSection Section "InputDevice" # generated from default Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/mouse" Option "Emulate3Buttons" "no" Option "ZAxisMapping" "4 5" EndSection Section "InputDevice" # generated from default Identifier "Keyboard0" Driver "kbd" EndSection Section "Monitor" Identifier "Monitor0" VendorName "Unknown" ModelName "Unknown" Option "DPMS" EndSection Section "Device" Option "UseDisplayDevice" "none" Identifier "Device0" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "Tesla T4" BusID "PCI:0:30:0" EndSection Section "Screen" Identifier "Screen0" Device "Device0" Monitor "Monitor0" DefaultDepth 24 Option "ConnectedMonitor" "DFP-0,DFP-1,DFP-2,DFP-3" SubSection "Display" Depth 24 EndSubSection EndSection ``` Is it possible that i need additional packages/forgot some? Thanks, Julian
1
answers
0
votes
47
views
asked 15 days ago

Nice DCV cannot access the X server / libGL error

Hi all, while trying to setup Nice DCV on a Linux Rocky8 G4 instance, it seems like I'm running into the issue that DCV is not able to access the X server. I am following the installation guide on https://docs.aws.amazon.com/dcv/latest/adminguide/setting-up-installing-linux.html and everything works fine except when I test the post installation step ``` sudo DISPLAY=:0 XAUTHORITY=$(ps aux | grep "X.*\-auth" | grep -v grep | sed -n 's/.*-auth \([^ ]\+\).*/\1/p') xhost | grep "SI:localuser:dcv$" ``` it gives me an empty return. Since I was not able to find anything in the dcv server logs I tried to run the server anyway and created a session. The generated session log gave me the following error: ``` 2022-10-26 23:47:48,219549940 [5851] INFO session-starter - DCV-GL fallback enabled on 'session1' 2022-10-26 23:47:48,279122009 [5851] INFO session-starter - Launch Xdcv: /usr/bin/Xdcv -sessionid 'session1' -auth '/run/user/1000/dcv/session1.xauth' -displayfd 4 -logfile '/var/log/dcv/Xdcv.rocky.session1.log' -output 800x600+0+0 -output 800x600+800+0 -output 800x600+1600+0 -output 800x600+2400+0 -enabledoutputs 1 -verbose 3 -dpi 96 -nolisten tcp 2022-10-26 23:47:48,307583861 [5851] INFO session-starter - Xdcv started on display ':1' 2022-10-26 23:47:48,310070531 [5851] INFO session-starter - Use Xauthority file: /run/user/1000/dcv/session1.xauth 2022-10-26 23:47:48,342130989 [5851] INFO user-autostart - Webcam Injection: disabled (inject-device='none') 2022-10-26 23:47:48,489715652 [5851] INFO session-starter - Launch DCV agent: /usr/libexec/dcv/dcvagent --mode full --session-id session1 --display :1 --settings-path /etc/dcv/dcv.conf --log-level info --log-dir /var/log/dcv --log-max-file-rotations 10 --log-rotation-suffix 0 --log-max-file-size 0 --log-rotation-interval 0 --log-rotate-at-startup 2022-10-26 23:47:48,491441457 [5851] INFO session-starter - Launch init script: /etc/dcv/dcvsessioninit 2022-10-26 23:47:48,494010588 [5851] INFO session-starter - Using shell /bin/bash Starting session: /etc/X11/xinit/Xsession 2022-10-26 23:47:48,510666812 [5851] INFO session-starter - Init script launched with pid '5967' and sid '5967' libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast ``` Could this be the reason why I am not getting the hoped return while doing the post installation step above? Maybe someone has stumbled over this already prior and has a solution. Many thanks!
4
answers
0
votes
59
views
panc
asked a month ago

Webclient SDK Angular Integration

I am currently looking to include the NICE DCV Webclient SDK into an **angular** project but have stumbled onto a problem: With the default setup the following error is displayed in the browser: ``` DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'https://<server-url>/recon/dcv/dcvjs/dcv/broadwayh264decoder-worker.js' failed to load. ``` The same is true for the file *lz4decoder-worker.js*. It seems that the way angular generates the url-path is causing this problem and is not providing the source files in the location the dcv.js file expects them to be. The html-file that contains the dcv-viewer div component is located at 'https://<server-url>/recon/dcv/' and provided by angular. It is now working using a workaround. In the **dcv.js** there is a line where the location of the source files seems to be generated with the baseurl of the site and then appending 'dcvjs': ``` ...?e.baseUrl.replace(/^\/+|\/+$/g,""):"dcvjs",!new RegExp("^http","i")... ``` Replacing "dcvjs" with the correct url directly ("https://<server-url>/recon/assets/dcvjs" Using this, the application can now correctly locate the necessary .js files. This is, however, for obvious reasons a rather dirty solution to the problem. We would have to replace the static server-url adress manually for each environment. So now my question is, is it somehow possible to configure the project in a way where the resources are correctly provided to the application in angular? Further, I have noticed that the sample application of AWS AppStream 2.0 uses NICE DCV in an angular context. Is it possible to provide an angular plugin similar to the react component already included in the SDK? The perfect solution of course would be to be able to install the SDK using npm :) Thanks in advance, Julian
1
answers
0
votes
18
views
asked 2 months ago

What to look at for resolving Nice DCV 404 errors

I've got an EC2 instance setup with Nice DCV. I have setup port access in my security rules and created a session in nice dcv. However, whenever I try to connect to the session via the browsed, I get an HTTP ERROR 404. I can't seem to find any information in the Nice DCV docs about causes of 404 except for the session resolver which I'm not using. How can I go about resolving this issue? Below is the output from dcv list-sessions -j ``` [ { "id" : "cloud9-session", "owner" : "ubuntu", "num-of-connections" : 0, "creation-time" : "2022-09-23T12:58:40.919860Z", "last-disconnection-time" : "", "licenses" : [ { "product" : "dcv", "status" : "licensed", "check-timestamp" : "2022-09-23T12:58:42.540422Z", "expiration-date" : "" }, { "product" : "dcv-gl", "status" : "licensed", "check-timestamp" : "2022-09-23T12:58:42.540422Z", "expiration-date" : "" } ], "licensing-mode" : "EC2", "storage-root" : "", "type" : "virtual", "status" : "running", "x11-display" : ":0", "x11-authority" : "/run/user/1000/dcv/cloud9-session.xauth", "display-layout" : [ { "width" : 800, "height" : 600, "x" : 0, "y" : 0 } ] } ] ``` This is the output from dcv get-config ``` [connectivity] web-use-https = false web-port = 8080 web-extra-http-headers = [('test-header', 'test-value')] [security] authentication = 'none' ``` This is the output from systemctl status dcvserver ``` ● dcvserver.service - NICE DCV server daemon Loaded: loaded (/lib/systemd/system/dcvserver.service; enabled; vendor preset: enable> Active: active (running) since Fri 2022-09-23 12:58:40 UTC; 18min ago Main PID: 715 (dcvserver) Tasks: 6 (limit: 76196) Memory: 39.9M CGroup: /system.slice/dcvserver.service ├─715 /bin/bash /usr/bin/dcvserver -d --service └─724 /usr/lib/x86_64-linux-gnu/dcv/dcvserver --service Sep 23 12:58:40 ip-10-0-0-115 systemd[1]: Starting NICE DCV server daemon... Sep 23 12:58:40 ip-10-0-0-115 systemd[1]: Started NICE DCV server daemon. ``` I'm trying to access the page with http://<public ip>:8080 I've also tried including the #session_id part in the url and using the windows client with no luck. My operating system is Ubuntu 20.04 with a custom AMI running in a g4dn.4xlarge machine.
0
answers
0
votes
35
views
asked 2 months ago