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

Jeremy Fix Jeremy.Fix at centralesupelec.fr
Fri Dec 17 18:39:49 UTC 2021


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 at mygateway "srun --x11 xclock"

but the following works :

    ssh -o "ProxyCommand=ssh -W %h:%p myuser at 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.

On 13/12/2021 09:44, Stuart MacLachlan wrote:
>
> 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
> <https://slurm.schedmd.com/slurm.conf.html#OPT_X11Parameters>)
>
>  
>
> Hope that helps and good luck!
>
>  
>
> Regards,
>
> Stuart
>
>  
>
> *From:*slurm-users <slurm-users-bounces at lists.schedmd.com> *On Behalf
> Of *Jeremy Fix
> *Sent:* 07 December 2021 14:05
> *To:* slurm-users at lists.schedmd.com
> *Subject:* [slurm-users] Failed to forward X11 with a remote scheduler
>
>  
>
>
> 	
>
> You don't often get email from jeremy.fix at centralesupelec.fr
> <mailto:jeremy.fix at centralesupelec.fr>. Learn why this is important
> <http://aka.ms/LearnAboutSenderIdentification>
>
> 	
>
> [EXTERNAL SENDER]
>
>  
>
> 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.
>

-- 
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: Jeremy.Fix at centralesupelec.fr
Homepage : http://malis.metz.supelec.fr/~fix_jer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20211217/20e5a907/attachment.htm>


More information about the slurm-users mailing list