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

tmux echo loops in several panes -> in rtail stream mixed output from several panes #110

Open
ghost opened this issue Feb 1, 2016 · 11 comments
Assignees
Labels
Milestone

Comments

@ghost
Copy link

ghost commented Feb 1, 2016

After clicking at stream link output becomes mixed (from other tmux panes).

@kilianc
Copy link
Owner

kilianc commented Feb 1, 2016

Hey @a93ushakov do you mind providing the exact steps to reproduce this?

@kilianc kilianc added the bug label Feb 1, 2016
@kilianc kilianc self-assigned this Feb 1, 2016
@kilianc kilianc added this to the v0.3.0 milestone Feb 1, 2016
@ghost
Copy link
Author

ghost commented Feb 1, 2016

rtail-server --web-port 8081
tmux kill-server
#!/bin/bash
SESSION=test

tmux -2 new-session -d -s $SESSION

tmux new-window -t $SESSION:1 -n 'test0'
tmux send-keys "while true; do echo test0 && sleep 3; done | rtail --id test0" C-m

tmux new-window -t $SESSION:2 -n 'test1' 
tmux send-keys "while true; do echo test1 && sleep 3; done | rtail --id test1" C-m

# Attach to session
tmux -2 attach-session -t $SESSION

@ghost
Copy link
Author

ghost commented Feb 1, 2016

2016-02-01-185820_1600x900_scrot

@kilianc
Copy link
Owner

kilianc commented Feb 1, 2016

On paper this should work, but I never used tmux so I need to dig into the issue to understand why this is happening. rtail is so stupid simple that it seems almost impossible this could happen, really weird.

Thanks for reporting @a93ushakov !

@ghost
Copy link
Author

ghost commented Feb 1, 2016

Thank you for reply - on github developer's quick response is rarity.

Maybe this help.

docker run -ti debian /bin/bash -c "apt-get update && apt-get install -y --no-install-recommends tmux"

@mfornasa
Copy link

Same issue here. @kilianc please let me know if you can't reproduce.

@mfornasa
Copy link

Problem is here: https://github.com/kilianc/rtail/blob/develop/cli/rtail-server.js#L111.
The server fails to leave the rooms.

For example, after:

  • Selecting stream a
  • Selecting stream b
  • Selecting stream a

socket.rooms is:

{ '/#64bZvp1LYpHSMusqAAAB': '/#64bZvp1LYpHSMusqAAAB',
  a: 'a',
  b: 'b' }

I'm not sure what the /#64bZvp1LYpHSMusqAAAB blurb is, but socket.leave(socket.rooms[0]) acts on it instead of acting on a or b.

@mfornasa
Copy link

Changing line 111 with:

    Object.keys(socket.rooms).forEach(function(key) {
      socket.leave(socket.rooms[key])
    });

solves this for me.

mfornasa added a commit to mfornasa/rtail that referenced this issue Mar 25, 2016
mfornasa added a commit to mfornasa/rtail that referenced this issue Mar 25, 2016
@mfornasa
Copy link

PR: #114

@shamasis
Copy link

shamasis commented Sep 9, 2017

@kilianc this is an amazing project. great work. :-)

I am facing the same issue.

This is easy to reproduce... simply rtail two files with separate id where data is getting continuously appended. You'll notice that the output is getting mixed across streams when you switch streams in UI.

I am on latest Ubuntu and latest production rtail. Hope this helps. :-)

I would love if we can release a 0.2.x with this fix instead of waiting for 0.3 since this makes rtail UI unusable with multiple files streaming in.

@nestoru
Copy link

nestoru commented Oct 16, 2017

Thanks @mfornasa for https://github.com/kilianc/rtail/pull/114/files which IMO should be merged. In the meantime here is a hack:

sudo cp /usr/local/lib/node_modules/rtail/cli/rtail-server.js /usr/local/lib/node_modules/rtail/cli/rtail-server.js.old
sudo curl https://raw.githubusercontent.com/mfornasa/rtail/ed16d9e54d19c36ff2b76e68092cb3188664719f/cli/rtail-server.js -o /usr/local/lib/node_modules/rtail/cli/rtail-server.js
ps -ef | grep rtail-server | grep -v grep | awk '{print $2}' | xargs kill
diff /usr/local/lib/node_modules/rtail/cli/rtail-server.js /usr/local/lib/node_modules/rtail/cli/rtail-server.js.old

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants