4 Replies Latest reply on May 18, 2012 4:28 PM by 938095

    Exporting X display for interactive jobs (qsh, qrsh) doesn't work!

    938095
      Hi,

      I can't get qsh or qrsh working. When I run the following command:

      qrsh xterm -q interactive.q@server2 -display server1:1007.0

      I get the following error:

      xterm Xt error: Can't open display: server1:1007.0

      I have tried running 'xhost + server2' from server1 with no success.

      I am remotely connected to server1 through an NX session. The DISPLAY variable is set to :1007 on server1.

      Anyone knows how I can fix this?

      Edited by: 935092 on May 17, 2012 12:41 PM

      Edited by: 935092 on May 17, 2012 12:42 PM
        • 1. Re: Exporting X display for interactive jobs (qsh, qrsh) doesn't work!
          828481
          Hello,
          this sounds more like it is a problem with the environment and not gridengine.
          Can you please first try to run xterm by itself (not through gridengine) and see if it is working successfully.

          You say you are remotely connected to server1, so on which host is your current display? That is the host that you should be exporting the display variable as. Or did I understand wrongly?
          On which host are you running the qrsh command?

          Regards,

          Michael
          • 2. Re: Exporting X display for interactive jobs (qsh, qrsh) doesn't work!
            938095
            Hi mpospisil ,

            I can ssh from server1 to server2 by running 'ssh -X server2' and run xterm. The '-X' option exports X display to server2.

            The server that hosts my X session is server1. Value of $DISPLAY on server1 is :1007. I want to submit an interactive job from server1 to server2 (a grid execution host). However neither qsh nor qrsh seem to export the X display properly to the execution host (server2).

            When I run 'qsh -q interactive.q -display server1:1007.0', no terminal pops up and the interactive job is immediately finished.

            Thanks,
            Mak

            Edited by: 935092 on May 17, 2012 4:09 PM
            • 3. Re: Exporting X display for interactive jobs (qsh, qrsh) doesn't work!
              883291
              It may be down to the commands used by q[r]sh, qlogin, etc. to log into the queue instance. The following is an excerpt from our configuration (qconf -sconf):

              qlogin_command builtin
              qlogin_daemon builtin
              rlogin_command /usr/bin/ssh -X
              rlogin_daemon /usr/sbin/sshd -i
              rsh_command /usr/bin/ssh -X
              rsh_daemon /usr/sbin/sshd -i

              The "int" queue also has the following property set:

              complex_values interactive=true

              As you can see, we don't use qsh, but we do use qrsh a lot (if the variables are set to "builtin", telnet will be used and we do not have telnet on our cluster). With the above setup, we can submit interactive jobs to the cluster using qrsh, using SSH to manage the display. The following example shows how the 2 commands differ in their behaviour:

              [mcowe@login ~]$ qsh -q int
              Your job 685317 ("INTERACTIVE") has been submitted
              waiting for interactive job to be scheduled ...

              Your "qsh" request could not be scheduled, try again later.
              [mcowe@login ~]$ qrsh -q int
              Last login: Thu May 17 23:36:57 2012 from solar1-ib.bom.gov.au
              [mcowe@n480 ~]$ echo $DISPLAY
              localhost:10.0

              The qsh command fails, but the qrsh command succeeds. Since we are invoking ssh -X, there is no need to set the display explicitly.
              • 4. Re: Exporting X display for interactive jobs (qsh, qrsh) doesn't work!
                938095
                user12693389 wrote:
                It may be down to the commands used by q[r]sh, qlogin, etc. to log into the queue instance. The following is an excerpt from our configuration (qconf -sconf):

                qlogin_command builtin
                qlogin_daemon builtin
                rlogin_command /usr/bin/ssh -X
                rlogin_daemon /usr/sbin/sshd -i
                rsh_command /usr/bin/ssh -X
                rsh_daemon /usr/sbin/sshd -i
                Yes, Thank you! that fixed it. I changed rsh_command and rsh_daemon values to the ones you suggested and 'ssh -X' is used when qrsh is called. Though seems like to use this method, users need to setup password-less ssh login for their accounts to skip the password prompt when launching an interactive job, is that how you have it set up on your side?

                Thanks,

                Edited by: mak007 on May 18, 2012 7:55 AM

                Edited by: mak007 on May 18, 2012 8:00 AM

                Edited by: mak007 on May 18, 2012 9:27 AM