[slurm-users] Failed to forward X11 with a remote scheduler

301 views
Skip to first unread message

Jeremy Fix

unread,
Dec 7, 2021, 9:05:56 AM12/7/21
to slurm...@lists.schedmd.com

Hi,

I'm unsuccessful in running an X11 application with a remote SlurmctldHost. Let us call myfrontalnode the node from which the user is running the slurm commands that is different from the host SlurmctldHost.

What fails is the following :

ssh -X myfrontalnode

srun --x11 xclock

which returns a "Can't open display: localhost:56.0"

If I run the xclock with a ssh -X on the compute node (even the same allocated by slurm with the above srun), it works. Namely, the following works :

ssh -X myfrontalnode

ssh -X mycomputenode xclock

The xclock is correctly displayed on my local host;

Also, If I connect to the SlurmctldHost and then srun --x11 it works as well. I believe there is something I did not configure correctly on the myfrontalnode.

Thank you for your help;

Jeremy.

Stuart MacLachlan

unread,
Dec 13, 2021, 3:45:19 AM12/13/21
to Jerem...@centralesupelec.fr, Slurm User Community List

HI Jeremy,

 

I have just gone through setting this up with exactly the same issues.  Not sure what your settings are or what you may have so far tried, but hopefully this will help…

  1. Make usre Slurm > V17.11 (looks like when X forwarding was brought in instead of using SPANK plugin)
  2. Make sure Slurm is compiled with libssh2-dev libraries available – not sure if this is the right dependency or if it is required, but I read it somewhere (which I now can’t find the link)…
  3. Add “x11” to the PrologFlags line in slurm.conf – my line looks like “PrologFlags=x11”
  4. Add a new line in slurm.conf – “X11Parameters=home_xauthority”
  5. Update your slurm cluster and restart.

 

Steps 3&4 seemed to be the key ones I originally missed – especially 4 (https://slurm.schedmd.com/slurm.conf.html#OPT_X11Parameters)

 

Hope that helps and good luck!

 

Regards,

Stuart

 

From: slurm-users <slurm-use...@lists.schedmd.com> On Behalf Of Jeremy Fix
Sent: 07 December 2021 14:05
To: slurm...@lists.schedmd.com
Subject: [slurm-users] Failed to forward X11 with a remote scheduler

 

[EXTERNAL SENDER]

Jeremy Fix

unread,
Dec 17, 2021, 1:40:24 PM12/17/21
to Stuart MacLachlan, Slurm User Community List
Hi, thank you for your feedback;

Actually, I transferred your suggestion to our admin who applied your suggestion but it does not seem to fix the issue. Below are the X11 flags for both the gateway and the slurm host (and the slurm.conf is propagated on the nodes) :
mygateway:/etc/slurm:myuser$ grep X11 *
slurm.conf:PrologFlags=Contain,X11
slurm.conf:# X11 CONFIG
slurm.conf:X11Parameters=home_xauthority
slurmhost:/etc/slurm:myuser$ grep X11 *
slurm.conf:PrologFlags=Contain,X11
slurm.conf:# X11 CONFIG
slurm.conf:X11Parameters=home_xauthority

But I still fail to run a process that requires X11. Namely, with one liners, the following fails :

    ssh -X myuser@mygateway "srun --x11 xclock"

but the following works :

    ssh -o "ProxyCommand=ssh -W %h:%p myuser@mygateway" -X slurmhost "srun --x11 xclock"

Also, I forgot to mention we are running "slurm 20.02.3" on a ubuntu 20.04 slurmhost   and ubunut 18.04 gateway.

Best;

Jeremy.
-- 
Jérémy Fix (PhD)
Assistant Professor 

CentraleSupélec
2 rue Edouard Belin
57070 Metz, France

Tél: +33(0)387 76 47 70 
Fax: +33(0)387764700 
Email: Jerem...@centralesupelec.fr
Homepage : http://malis.metz.supelec.fr/~fix_jer
Reply all
Reply to author
Forward
0 new messages