henrikpersson / rsub

Use rmate with Sublime Text.
458 stars 70 forks source link

add info to repo homepage on how to "shutdown" #40

Open skilfullycurled opened 9 years ago

skilfullycurled commented 9 years ago

Hi,

Thanks so much for this wonderful plug in!

I'm using rsub on a local machine running OSX 10.7 and a remote server running Ubuntu 12.04.5

One thing that I've noticed is that there is practically no information about how to "shutdown" rsub should you lose your connection with the server you are working on remotely (or some other reason). Of course, the better thing for me to do is to use this with something like tmux which would keep it running. However, recently I haven't been using it and naturally, after a while the pipe breaks. If this happens, after you log back in to the remote server, rsub won't open the file, instead you just get something like this:

user@server: rsub yourfile.html
[]  

And you have to ctrl-c to get back to the shell.

Or, you'll get something like this:

/usr/local/bin/rsub: line 301: /dev/tcp/localhost/52698: Connection refused
Unable to connect to TextMate on localhost:52698

I've googled up and down about it (and of course restarted ST2), and surprisingly while there are tutorials on how to use rsub, no one mentions what to do if it stops working. There's a post on SO that recommends killing the process by searching using netstat:

sudo netstat -antpl -p  | grep 52698
sudo kill -9 xxxx

http://stackoverflow.com/questions/11818131/warning-remote-port-forwarding-failed-for-listen-port-52698

But this only works about half the time.

Any advice you have on this would be great.

Thanks again,

Benjamin

skilfullycurled commented 9 years ago

update, following the instructions here has helped. haven't had an opportunity to repeat the conditions of the bug to see if it solves the whole thing because I'm pumped to get working again, but there you have it.

http://stackoverflow.com/questions/18938950/rsub-with-sublime-and-ssh-connection-refusual

Still, it would be great to know how to gracefully shut it down.

KES777 commented 8 years ago

You can try supplied patch

If connection to remote host were broken. it allow you to open again remote file for editing. Now plug-in checks all views for broken session. If it found such view it restore connection and force-save local modification to remote file

skilfullycurled commented 8 years ago

Oh, hey! Funny. I was just dealing with this problem again a few weeks ago actually. Awesome. I'll check it out and let you know.