I am using SSH to access to Openshift VM, i'm running a simple java program (java -jar ....) that takes a while a to complete, and do some heavy work. But the execution always gets terminated, along with the SSH session. Using putty, i get a

Server unexpectedly closed network connection

I have tried to set the TMOUT variable to a higher value, and enabled the TCP keepalives from putty. It works when idle, but when i run the java program it get excluded once again after like 5min.

So are there any restriction or limits set by openshift? any other configuration i can do to fix this? and how can i can the last exiting error in java or the ssh session?

EDIT: I alos tried lunching it with: nohup java -jar name.jar &

and it also died after several minutes (i checked using ftp logs)

closed as off-topic by Jenny D, womble Jul 16 '16 at 23:39

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow." – Jenny D, womble
If this question can be reworded to fit the rules in the help center, please edit the question.

  • What Do The Logs Say? – Jenny D Jul 16 '16 at 17:37
  • @JennyD if ur talking about the ftp logs, im just looking at the last modified date of the nohup.out file, other than that, i dont know which logs i should be looking at – Ouerghi Yassine Jul 16 '16 at 17:45
  • Maybe it's getting killed because the machines runs out of memory...? – gf_ Jul 16 '16 at 18:18
  • Whyever would ftp logs be relevant to a process dying and an SSH session getting closed down? You need to check the server's system logs. – Jenny D Jul 16 '16 at 19:53
  • @JennyD cuz when i use nohup, the process continue working even if the ssh session is terminated? and im using openshift, its a shared environment, i dont know where i can find the logs, or if i have access to them. – Ouerghi Yassine Jul 16 '16 at 20:23

You should not be relying on keeping an SSH connection active for successful execution of a long-running process. Instead of doing is as you are, start up a tmux or GNU screen session first and run your process within that. This way, the process will continue running if your SSH connection dies.

  • ...and if the connection dies because reasons, there might be remnants in the screen/tmux session that tell you what happened. – a CVn Jul 16 '16 at 16:43
  • yes, sorry forgot to mention i even tried "nohup java -jar name.jar &" it died after some mins (checked through ftp logs) – Ouerghi Yassine Jul 16 '16 at 16:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.