I don't know how common this issue is, but I run into an issue occasionally on sdf.org where I have a tmux server instance running (as evidenced by the process list) however the server's socket in /tmp is gone/deleted/missing so I'm unable to attach a tmux client to it.
When attempting to re-attach to the session using tmux a, you get an error stating there are no sessions:
$ tmux a
no sessionsWhen viewing the process list, you can see that there is a session process running:
$ ps aux | grep ^tydel.*tmux
tydel 19445 0.0 0.0 33464 4184 ? Ss 18May25 21:48.43 tmux: server (/tmp/tmux-57611/default) (tmux)But the referenced socket location is not present:
$ ls -l /tmp/tmux-57611/default
ls: /tmp/tmux-57611/default: No such file or directoryThis will force the process to re-write it's socket file and you can go about re-attaching as you do normally!
`$ ps aux | grep tydel.*tmux`
tydel 19445 0.0 0.0 33404 4176 ? Ss 18May25 21:48.57 tmux: server (/tmp/tmux-57611/default) (tmux)We identified that the PID is 19445, so send the signal:
$ kill -USR1 19445Now we can re-attach the session:
$ tmux a