Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nothing works: error connecting to /tmp/tmux-1000/default (No such file or directory) #2377

Closed
13point5 opened this issue Sep 11, 2020 · 16 comments

Comments

@13point5
Copy link

13point5 commented Sep 11, 2020

Issue description

I tried installed tmux from apt and from source(2.5, 3.0 and 3.1) but didn't seem to work. I even reinstalled my OS(Ubuntu 18.04). Nothing seems to work.

No matter what I try to do with tmux I get the error message:
error connecting to /tmp/tmux-1000/default (No such file or directory)

Required information

  • tmux version (tmux -V). 2.6-3ubuntu0.2
  • Platform (uname -sp). Linux x86_64
  • $TERM inside and outside of tmux (echo $TERM). xterm-256color
  • Logs from tmux (tmux kill-server; tmux -vv new).
    error connecting to /tmp/tmux-1000/default (No such file or directory)
    error connecting to /tmp/tmux-1000/default (No such file or directory)
@nicm
Copy link
Member

nicm commented Sep 12, 2020

Do this:

pkill tmux
strace -fostrace.out tmux new

Then show me the strace.out file.

@13point5
Copy link
Author

13point5 commented Sep 12, 2020

Here you go, thanks for helping! .out files are not supported so made it a .txt
strace.txt

@nicm
Copy link
Member

nicm commented Sep 12, 2020 via email

@13point5
Copy link
Author

I've updated the previous comment, sorry about that

@nicm
Copy link
Member

nicm commented Sep 12, 2020

2834 writev(5, [{iov_base="zsh:1: command not found: reatta"...,

Looks like your default-command doesn't work.

@13point5
Copy link
Author

13point5 commented Sep 12, 2020

I don't understand, zsh works fine. Could you elaborate on the issue or suggest a fix? I'm new to all this so please bear with me

@krader1961
Copy link

It looks like you're still using the reattach-to-user-namespace program and zsh can't find it in your PATH. That program hasn't been needed in conjunction with tmux for at least three years.

@13point5
Copy link
Author

I removed my .tmux.conf file which had this, still no change. Also, I tried tmux in bash, it's throwing the same error

@krader1961
Copy link

I removed my .tmux.conf file which had this, still no change.

Okay, but you seem to be saying your ~/.tmux.conf file contained code that was obsolete at least three years ago. That you also think reinstalling the entire OS was an appropriate debugging step makes me question anything you say.

Also, I tried tmux in bash, it's throwing the same error

That doesn't tell us what you actually did. If you simply started tmux in a bash shell by typing bash then tmux that does not mean bash is relevant as tmux will still use zsh for external commands.

Also, looking at the strace you provided there is nothing suggesting a problem accessing /tmp/tmux-1000/default. Every single syscall that uses that path is successful (with the exception of those expected to fail). Whereas tmux does report the failure to run the reattach-to-user-space command immediately prior to terminating. So I don't trust anything you've said so far.

@nicm
Copy link
Member

nicm commented Sep 13, 2020

You probably didn't restart tmux properly after removing .tmux.conf. Run pkill tmux.

@13point5
Copy link
Author

So now when I run these commands:

pkill tmux
strace -fostrace.out tmux new

It runs tmux, but when I try to run tmux it's the same. I've attached the new strace file.

@krader1961 here are a few lines(total 13) where it suggests the problem with "/tmp/tmux-1000/default"

22599 connect(5, {sa_family=AF_UNIX, sun_path="/tmp/tmux-1000/default"}, 110) = -1 ENOENT (No such file or directory)
22599 unlink("/tmp/tmux-1000/default") = -1 ENOENT (No such file or directory)
22601 unlink("/tmp/tmux-1000/default") = -1 ENOENT (No such file or directory)
22601 bind(6, {sa_family=AF_UNIX, sun_path="/tmp/tmux-1000/default"}, 110) = 0
22601 stat("/tmp/tmux-1000/default", {st_mode=S_IFSOCK|0660, st_size=0, ...}) = 0
22601 chmod("/tmp/tmux-1000/default", 0660) = 0
22601 unlink("/tmp/tmux-1000/default.lock") = 0

strace.txt

@krader1961
Copy link

@13point5 You've misinterpreted the syscall trace. In the most recent trace pid 22602 is the interactive zsh shell launched by tmux. Line 126209 is

22602 write(10, "\33[?2004h", 8)        = 8

That's the shell enabling bracketed paste mode. It then does

22602 rt_sigprocmask(SIG_UNBLOCK, [WINCH],  <unfinished ...>
22602 <... rt_sigprocmask resumed> [WINCH], 8) = 0
22602 read(10,  <unfinished ...>
22602 <... read resumed> "\4", 1)       = 1

The \4 is Ctrl-D, EOF. At that point the shell updates ~/.zsh_history and cleanly terminates with status zero (success). There is nothing in that trace to suggest a problem with the UNIX domain socket path * /tmp/tmux-1000/default*. The syscall errors involving that path you noted in your comment are normal. You wrote

It runs tmux, but when I try to run tmux it's the same.

What do you mean "it's the same"? There is something wrong with your configuration. Whether it's the tmux, zsh, or both configs is hard to say at this point.

@13point5
Copy link
Author

I reinstalled it and used the tmux plugin in oh-my-zsh and it now works. I honestly don't know what went wrong. Thank you for your help and time; I apologize if I seemed stupid or annoyed you

@krader1961
Copy link

In my experience many oh-my-zsh extensions tend to have problems. I used zsh for many years as my interactive shell. I tried using oh-my-zsh but stopped using it because the few extensions I tried were broken or were of low quality. The most important thing you should take away from this experience is the importance of including all relevant details when reporting a problem. In this case that would include

  1. your tmux config,
  2. your zsh config,
  3. the fact you were using a oh-my-zsh tmux extension.

And vague statements like "it's the same" should be replaced by "I did X and observed Y" type statements.

@13point5
Copy link
Author

Yup, I understand that now 👍🏽

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants