On a host where I was attached to a tmux session, the connection was closed after ten minutes of inactivity:
Connection to somewhere.uk closed by remote host.
After logging back in, tmux is no longer running and I cannot reconnect,
$ ls -l /tmp/tmux-35063/default
srw-rw---- 1 gholl users 0 Nov 14 19:27 /tmp/tmux-35063/default=
$ tmux -S /tmp/tmux-35063/default attach
no sessions
$ tmux -S /tmp/tmux-35063/default ls
failed to connect to server: Connection refused
$ lsof | grep [t]mux
$ ps aux | grep [t]mux
$
It is different from the problems described here or here, because tmux is killed. It is also different from the problem described at tmux session killed when disconnecting from ssh, because when I logout regularly or kill ssh client-side, tmux is still running and I can reconnect. If I disconnect from tmux but remain logged in, tmux does not get killed when I am disconnected. It seems the problem only appears if the connection is closed by the remote host while I am connected to tmux.
What causes this and what may be the solution? May there be a setting that triggers tmux to get killed when the connection is closed by the remote host, but not when I logout gracefully or otherwise close the connection client-side?
The remote machine is a scientific analysis machine running Red Hat Enterprise Linux Server release 6.8 (Santiago) with Linux 2.6.32-642.6.2.el6.x86_64
and OpenSSH_5.3p1, OpenSSL 1.0.1e-fips
. The uptime is currently 19 days. It uses init
, not systemd
. I have no root access so my ability to test different configurations are limited (and this is a production box, so I expect the system administrators may wish to be careful as well).
uptime
on the system? Has this happened more than once? – jayhendren Nov 14 '16 at 20:43