Hello,
Interactive Desktop (XFCE) sessions launch through Slurm, and Xvnc and websockify start, but xfce4-session exits immediately with “cannot open display”. vncserver run manually on the compute node works.
Environment
- AWS ParallelCluster 3.16.1, Slurm 25.11.8
- OS: Ubuntu 22.04.5 LTS
- Open OnDemand 4.2.4, on a dedicated host
- TurboVNC 3.3.1,
/usr/local/turbovnc/bin/vncserver - Compute node
dftq-dy-dnode-1is not resolvable by name from the OOD host, so IP addresses must be used.
Configuration
/etc/ood/config/apps/bc_desktop/testcluster.yml
title: "HPC Slurm Cluster"
cluster: "my_slurm_cluster"
attributes:
desktop: "xfce"
bc_queue: null
bc_num_slots: 1
bc_account: null
/var/www/ood/apps/sys/bc_desktop/submit.yml.erb
script:
copy_environment: true
batch_connect:
template: "vnc"
script_wrapper: |
export PATH="/usr/local/turbovnc/bin:$PATH"
export WEBSOCKIFY_CMD="/usr/local/python3/bin/websockify"
%s
Modifications made
- In
vncserver, so the node is reachable by IP:
chop($host = \uname -n`);changed tochop($host = `hostname -i`);` - In
vncserver, the startup message:
warn "\nDesktop '$desktopName' started on display $host:$displayNumber\n";changed towarn "\nDesktop '$host' started on display $host:$displayNumber\n"; - In
template/desktops/xfce.sh, commented out the two lines below to work aroundFailed to init libxfconf: Could not connect: No such file or directory:
xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false
xfconf-query -c xfce4-session -p /startup/gpg-agent/enabled -n -t bool -s false
Running /usr/local/turbovnc/bin/vncserver -wm xfce -verbose manually on the compute node works as expected.
xauth list output
deftq-dy-node-1.testcluster.pcluster:1 MIT-MAGIC-COOKIE-1 0614abe0a
192.168.1.6:1 MIT-MAGIC-COOKIE-1 0614abe0a
output.log
Setting VNC password...
Starting VNC server...
Desktop '192.168.1.6' started on display 192.168.1.6:1
Successfully started VNC server on 192.168.1.6:5901...
[websockify]: pid: 17117 (proxying 55635 ==> localhost:5901)
[websockify]: log file: ./websockify.log
[websockify]: waiting ...
No protocol specified
xfce4-session: cannot open display: .
Type 'xfce4-session --help' for usage.
Desktop 'xfce' ended with 1 status...
[websockify]: started successfully (proxying 55635 ==> localhost:5901)
Scanning VNC log file for user authentications...
Generating connection YAML file...
Cleaning up...
Killing Xvnc process ID 29438
Questions
-
Where does the OOD VNC template set
DISPLAYbeforexfce.shruns, and what value should it have? The error shows.. -
Could changing
$hostto an IP invncservercause the “No protocol specified” error, because the xauth cookie is keyed by IP while the client looks up the real hostname? If so, what is the supported way to use IPs for compute nodes without patchingvncserver? -
Is
copy_environment: trueappropriate for bc_desktop, or can it leakDBUS_SESSION_BUS_ADDRESSfrom the OOD host and cause the libxfconf error? -
For websockify, how to change from
proxying 55635 ==> localhost:5901
to
proxying 55635 ==> 192.168.1.6:5901