login community faq

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)?

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
[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 Jun 19 '12 at 01:32

mhermans's gravatar image

mhermans
31


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!

answered Jun 19 '12 at 10:33

seanf's gravatar image

seanf ♦♦
56291220

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

(Jun 19 '12 at 13:46) mhermans mhermans's gravatar image
Your answer
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Tags:

×7
×2
×1

Asked: Jun 19 '12 at 01:32

Seen: 304 times

Last updated: Jun 19 '12 at 13:46

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited