2

I am running my node server on a cluster by remotely connecting to the server using Putty windows interface.

I am running my node process as nohup .. & so that it runs in background and does not get killed even after logging out of the session

If I exit the session by typing 'exit' in the command prompt, things work as expected, but if I close the putty session by closing the interface, the nohup process is immediately killed.

Why might this be happening?

PS: It is not happening on every cluster, on some clusters the process is killed, and on others it continues to run.

7
  • unix.stackexchange.com/questions/89483/… maybe some details to help here. Feb 12, 2016 at 8:59
  • What about using screen?
    – Wobbly
    Feb 12, 2016 at 9:44
  • i have seen other answers suggesting screen or forever in case of node specifically... but i am more interested in knowing why this happens?
    – gaurav5430
    Feb 12, 2016 at 9:51
  • 1
    When you are logged into your remote host on Putty you have started an SSH linux process and all commands typed from that SSH session will be executed as children of said process. The problem is that when you close Putty you are exiting the SSH session which kills that process and any active child processes. This could be why it is closing the process if you play with the process at all restart it or anything to do with it while in putty this could close the process. Feb 13, 2016 at 8:10
  • 1
    Ohk... But when I give the exit command on putty , the nohup process keeps on running. Its just when I press the close button (sometimes when I lose the network connection before I can exit)
    – gaurav5430
    Feb 13, 2016 at 9:12

0

You must log in to answer this question.

Browse other questions tagged .