1

I have used both screen and tmux to be able to resume my work in the server. I have encountered this problem with both tmux and screen where the active sessions disappear when I lose the internet connection abruptly or when I just log off and log back in even after having safely detached the sessions. Something that I have noticed is that another disruption in the connection, either closing the internet connection and reconnecting, logging off or closing the terminal can most of the times magically bring the sessions alive. I know that these sessions are still running because the processes running in the sessions are still producing output. However, sometimes I cannot use the disruption trick to bring the sessions back alive and they reappear days after.

I am running these sessions in ssh so do not have root privilege. So running "killall -10 tmux" gives the error "Operation not permitted". Do you have any suggestions how to handle this?

1

This is very strange indeed. (Speaking about tmux. I haven't used pure screen for a long time now)

Are your steps to open a tmux session like these?

  • You SSH into the server machine
  • Create a session with tmux new-session -s <session name>

When you find this strange situation, what is the output of tmux list-sessions ? Usually it shows your detached sessions and you can later attach to them again with tmux attach -t <session name>.

And what do you mean by "magically bring the sessions alive"? When you SSH into the server the session is restored and you are magically at it?

  • Yes, the steps are ssh into the server, and creating a new tmux session or attaching to a detached session. The output of tmux ls and screen -ls is "failed to connect to server: Connection refused" and "No Sockets found in /var/run/screen/S-adev" respectively. Basically the output you get when you have no detached sessions. By "magically bring the sessions alive" I mean they are listed (tmux ls) as detached screen. – user12011 Oct 13 '17 at 20:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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