tmuxinator: tmuxinator won't run untill another tmux session exists

Tmuxinator can’t connect to tmux server (create new sessions) unless at least one session exists already.

When I have no sessions live and try to run tmuxinator project:

~  tmux list-sessions
no server running on /private/tmp/tmux-501/default
~  tmuxinator project_name
no server running on /private/tmp/tmux-501/default
lost server
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no sessions

(the /private/tmp/tmux-501/default exists and is empty)

But when I create new tmux sessions (and at least one still exists):

~  tmux list-sessions
0: 1 windows (created Tue Jun  6 11:22:21 2017) [134x32] (attached)

all works fine, tmuxinator run tmux session and all commands are executed correctly.

I’m using tmux 2.5 (OS X 10.12) installed via homebrew.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 6
  • Comments: 32 (8 by maintainers)

Commits related to this issue

Most upvoted comments

UPDATE: the bug in tmux that was causing this issue has been fixed in master and will become part of that tool’s 2.6 release. Unfortunately, the fix won’t be back-ported to 2.5. If you really must have tmux 2.5 and use it with tmuxinator, you can pull the 2.5 branch from Github, apply the patch in the linked issue (also here) and be on your merry way. However, I would recommend simply sticking with 2.4 and jumping to 2.6 when it is released.

Install formula from specific revision (I belive it’s how it’s called in git):

brew install https://raw.githubusercontent.com/Homebrew/brew/2d2034afc6e4dfab0a1c48f5edd2c5478576293b/Formula/tmux.rb

I have tmux 2.7 and tmuxinator 0.11.1 installed and this problem affected me. The problem disappeared when I removed all of my tmux config files, which enabled me to identify the cause: the option status-utf8 was removed from tmux, but I still had this line in my config:

set -g status-utf8 on

Removing this line, as described in this comment above, fixed the problem. For more info, see https://github.com/tmux/tmux/issues/230.

FWIW, I landed on this issue after running into the same, initially described issue. Turned out my tmux.conf was a few years old and tmux had changed how it wants you to specify style; updating these style-related settings got me up and running. For example:

# I used to have this
set -g status-fg white
set -g status-bg black

# But I changed to this
set -g status-style fg=white,bg=black

You can see more about what I ran into over here: https://github.com/tmux/tmux/issues/1689

I still run into this issue in 2.6 . Adding the following to my ~/.zshrc did the trick. Of course, this could be bundled up in a script or alias, but I wanted it to be run any time my shell starts and no tmux sessions are found.

DUMMY='dummy'
PROJECT='monit'
tmux list-sessions || ( tmux new -d -s $DUMMY && tmuxinator start $PROJECT )

It seems there are some wrong configs in my .tmux.conf, use tmux to start tmux session will show the errors/warings. When fixed, mux [project] works again.

For me the line set-option -g status-utf8 on was causing the issue (the status-utf8 option is obsolete). I really would have expected a more visible error message and it was very strange that starting tmux directly worked, but everything was peachy after I removed that line.

My issue was that I updated tmux to version 3.0a and that broke on the backslashes in my conf file. I needed to change

bind \ split-window -h -c '#{pane_current_path}'
bind -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"

to

bind \\ split-window -h -c '#{pane_current_path}'
bind -n C-\\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"

It seems that tmux changed some of its behavior that has to do with the .tmux.conf. For me it was the line:

bind r source-file ~/.tmux.conf ; display-message "Config reloaded.."

that caused the trouble. It always worked until I upgraded to the latest version of tmux. After removing this line from my .tmux.conf I was able to run mux start [project] again without any problems.

@danshumaker I was having the same issue.

Take a look at your tmux config. I am using the same config as my co-worker who is a bit more savvy than I with tmux and 2.4 broke a number of things in his config.

Once I updated my config the problem went away. I don’t know which specific issues were causing the problem; my co-worker had made numerous changes since I first copied it over.

This must be the change in the tmux 2.5. Reverting back to tmux 2.4 works fine (brew switch tmux 2.4).

@episage I’m not seeing where tmuxinator fits in here. Assuming you are using tmuxinator, we should start a new issue for this as yours involves tmux-cssh, which may or may not affect what’s going on. If you do decide to create an issue, please include the tmuxinator debug output. Just FYI, tho, this is the first time I personally have heard of tmux-cssh, so there’s no guarantee we’ll be able to get it working, but we’ll see what we can figure out.

I didn’t use to have this problem, but I get it now that I switched to fish as my shell. In zsh it works fine, but in fish it does not. In both cases I have the same tmux configuration.

This is the output that I get when I run tmuxinator my-project:

lost server
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default
no server running on /private/tmp/tmux-501/default

Again, the above only happens under the fish shell, not under zsh.

tmuxinator debug my-project

In case it is helpful to figure out the problem, this is the output of tuxminator debug my-project

#!/usr/local/bin/fish

# Clear rbenv variables before starting tmux
unset RBENV_VERSION
unset RBENV_DIR

tmux start-server;

cd /Users/ernesto/code/gob/getonbrd

# Run on_project_start command.



  # Run pre command.


  # Run on_project_first_start command.


  # Create the session and the first window. Manually switch to root
  # directory if required to support tmux < 1.9
  TMUX= tmux new-session -d -s getonbrd -n shell
  tmux send-keys -t getonbrd:0 cd\ /Users/ernesto/code/gob/getonbrd C-m


  # Create other windows.
  tmux new-window -c /Users/ernesto/code/gob/getonbrd -t getonbrd:1 -n server


  # Window "shell"
  tmux send-keys -t getonbrd:0.0 git\ status C-m

  tmux splitw -c /Users/ernesto/code/gob/getonbrd -t getonbrd:0
  tmux select-layout -t getonbrd:0 tiled
  tmux send-keys -t getonbrd:0.1 yarn\ test C-m

  tmux select-layout -t getonbrd:0 tiled

  tmux select-layout -t getonbrd:0 even-horizontal
  tmux select-pane -t getonbrd:0.0


  # Window "server"
  tmux send-keys -t getonbrd:1.0 make\ dev C-m

  tmux splitw -c /Users/ernesto/code/gob/getonbrd -t getonbrd:1
  tmux select-layout -t getonbrd:1 tiled
  tmux send-keys -t getonbrd:1.1 yarn\ start C-m

  tmux select-layout -t getonbrd:1 tiled

  tmux select-layout -t getonbrd:1 even-horizontal
  tmux select-pane -t getonbrd:1.0


  tmux select-window -t getonbrd:0
  tmux select-pane -t getonbrd:0.0




# Run on_project_exit command.

fish shell version 2.7.1 tmux version 2.7 tmuxinator version 0.12.0

@adamstrickland Sorry for the late response, I do not have this issue anymore. Woot woot!

Upgraded to sierra last night and started getting this error. But, just tried compiling 2.6-rc on tmux and checked the contents of cmd-find.c to be sure the patch was included, and it is. Linked my compiled version to the /usr/local/bin dir and re-ran tmuxinator without a previously running tmux and I still get the error… bummer. I must be doing something wrong. rc3 For now I’ll just start dummy tmux session to use tmuxinator so it has something to start with. Anyone else try tmux 2.6? (tried with tmuxinator 0.9.0)