I asked this question on the Unix/Linux stackoverflow, but a suggestion is not forthcomming and people ask if I can run commands with root access, so perhaps WebFaction-support is more relevant.

Question:I was trying to re-attach to a long-running tmux session to check up on a python web-application. However tmux attach claims that there is no running session, and ps shows a tmux process (first line), but with a question mark instead of the pts number.

What does this mean---is this tmux session permanently lost, and what could have caused it? Is there still a way to look at the current state of the python process, spawned in the tmux session and running in pts/19 (second line)?

[mhermans@web314 ~]$ ps -ef | grep mhermans
mhermans 16709     1  0 Mar04 ?        00:26:32 tmux
mhermans  8526 16710  0 Mar04 pts/19   00:20:04 python2.7 webapp.py
root      9985  6671  0 10:18 ?        00:00:00 sshd: mhermans [priv]
mhermans 10028  9985  0 10:18 ?        00:00:00 sshd: mhermans@pts/16
mhermans 10030 10028  0 10:18 pts/16   00:00:00 -bash
mhermans 16247 10030  6 10:28 pts/16   00:00:00 ps -ef
mhermans 16276 10030  0 10:28 pts/16   00:00:00 grep mhermans
mhermans 16710 16709  0 Mar04 pts/19   00:00:00 -bash
mhermans 16777 16709  0 Mar04 pts/21   00:00:00 -bash

asked 19 Jun '12, 01:32

mhermans's gravatar image

accept rate: 0%

I googled "tmux attach no session" and found this which suggested running "killall -10 tmux" to recreate your tmux socket. I tested that as your user and it seemed to work.

As to the cause, it's possible that our tmp partition filled up and was emptied, but I'm not certain. If you'd like to avoid that possiblitity, then set your TMPDIR environment variable (or whatever tmux uses to locate its socket files) to point to a directory within your home directory.

Hope that helps!

permanent link

answered 19 Jun '12, 10:33

seanf's gravatar image

seanf ♦♦
accept rate: 38%

Thanks, that did it. I'll keep the TMPDIR suggestion in mind for when I'm running more crucial processes in tmux.

(19 Jun '12, 13:46) mhermans mhermans's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 19 Jun '12, 01:32

question was seen: 1,247 times

last updated: 19 Jun '12, 13:46

Features & prices    Sign up    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
© Copyright 2003-2015 Swarma Limited - WebFaction is a service of Swarma Limited