Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • xstata pauzes on linux server when disconnecting SSH tunnel

    I have Stata MP installed on a linux server, which I access through a ssh tunnel and X2go (and X11 forwarding on a Mac client). I can run Stata in GUI using xstata-mp, but when I disconnect the SSH tunnel (e.g. due to loss of internet connection or due to moving from place to place with my laptop (client)), xstata pauzes, and only resumes calculations when re-connecting.
    At first I thought this was a platform issue with disconnecting from SSH (see here: https://askubuntu.com/questions/8653...ng-ssh-session).
    However, when using Python (Spyder) in the same setting, Python simply continues.
    Any idea if this issue is due to Stata, Linux or the cocktail of platforms?

  • #2
    TheLinux "nohup" command will address this issue. Try:

    nohup xstata

    however althought the job will continue to run, you won't be able to reconnect to the terminal.
    For that you could use the "screens" command. That will certainly keep a text stata session alive, I am not sure
    about a GUI session. If you have control of the server, you might implement xrdp and use mstsc as the client.
    That does maintain the GUI session.

    Daniel Feenberg

    Comment


    • #3
      Thank you, I tried "nohup xstata-mp &" in terminal, but the same issue persists. When I log in after a break, X2go (which is NX) resumes the GUI, but the calculations have paused.

      Comment


      • #4
        A nohup'ed process may pause at terminal I/O, perhasp run the stata process in batch mode?

        Code:
        nohup statamp -b "do dofile" &
        Daniel Feenberg

        Comment


        • #5
          Hi Glenn,

          I would suggest you try the "screen" command on Linux. (But I am not sure whether it works for your case). This will create an interface that is separated from your SSH connection. Therefore, programs attached to that screen will not be paused when you disconnect from SSH. You can go back to the screen you created whenever you re-connect.

          Best,
          Wenzhi

          Comment

          Working...
          X