10/21/2023 0 Comments Tmux exit sessionSome init systems including systemd provide a feature to kill all processes belonging to the service. I'll need to spend some time troubleshooting this to figure out why, but I thought I would update my question since the strace suggestion was useful. So the root cause appears to be that the tmux process is being terminated when I close the ssh session. I compared this with a different system where tmux works properly and on that system the tmux process continues running even after I exit. Here's a snippet of the final part of the strace output. It looks like when I exit my ssh session (by typing exit or with ctrl-d) that the tmux process is being killed. In response to one of the comments I used strace to see what systems calls the tmux server process makes. ![]() What doesn't make sense to me is why it gets killed in step 4 when I disconnect from the ssh session. This makes sense because the serve is not running. reconnect with ssh and run tmux attach and I get the message no sessions and running tmux ls returns failed to connect to server: Connection refused.close ssh session (at this point the tmux session is killed, I've been able to observe this when I'm logged in as root in a different terminal).ctrl-B D to detach (at this point I could reattach with tmux attach.The precise steps that lead to the problem are: I thought I'd ask to see if anyone has seen a similar problem and knows of a possible solution. I doubt that the kernel version is the source of the problem though, that's just one difference I noticed. ![]() The system that has a problem (that I have root access for) has a Linux kernel version of 3.17.4-1 and the system that works correct has kernel version 3.16.4-1-ARCH (I don't have root on that system). The system that has a problem and the one that works correctly have very similar configurations so I'm not sure what to check. I know this is not the normal behavior because I have other system where the tmux session continues running even if the ssh session is ended and I can attach to the tmux session after establishing a new ssh connection. But if I end my ssh session then the tmux session gets killed. ![]() When I start a tmux session I can detach from it and then attach again while the ssh session is active. I have tmux installed on an Arch Linux system. Summary: I'm trying to figure out why my tmux session dies when I disconnect from ssh
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |