aurora / rmate

Remote TextMate 2 implemented as shell script

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Having problems with tunneling now?

ylluminate opened this issue · comments

I am having an odd issue wherein suddenly port forwarding stopped working in a particular scenario for me. By default I have ssh set to use the following config (my ~/.ssh/config file):

Host *
    ControlMaster auto
    ControlPath /tmp/%r@%h:%p
    ServerAliveInterval 120
    ServerAliveCountMax 3

    ForwardX11 yes
    ForwardX11Trusted yes

    RemoteForward 52698 127.0.0.1:52698

I then initiate ssh to the server (ssh username@server.tld) and query my local workstation to make sure that there are listeners for port 52698; sudo lsof -i -P | grep 52698:

AppName   40262        username   45u  IPv6 0x4b497d2de68055a1      0t0    TCP *:52698 (LISTEN)
sshd      92207        username   14u  IPv6 0x4b497d2d9e7ec4a1      0t0    TCP localhost:52698 (LISTEN)
sshd      92207        username   15u  IPv4 0x4b497d2dbb985641      0t0    TCP localhost:52698 (LISTEN)

I then likewise make sure that the port is active on the server, lsof -P | grep 52698:

sshd      16366      root    7u     IPv6             196798        0t0        TCP localhost:52698 (LISTEN)
sshd      16366      root    8u     IPv4             196799        0t0        TCP localhost:52698 (LISTEN)

I simply get hangs or effective timeouts right now when I initiate rmate.sh on the server to which I'm logged into in each case. With the rb version of rmate I'm getting the following error which leads me to believe that something is wrong with the tunnel now:

[~]# /usr/local/rvm/gems/ruby-1.9.3-p448@global/gems/rmate-1.5.5/bin/rmate:149:in `readline': end of file reached (EOFError)
    from /usr/local/rvm/gems/ruby-1.9.3-p448@global/gems/rmate-1.5.5/bin/rmate:149:in `connect_and_handle_cmds'
    from /usr/local/rvm/gems/ruby-1.9.3-p448@global/gems/rmate-1.5.5/bin/rmate:186:in `block in <top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p448@global/gems/rmate-1.5.5/bin/rmate:185:in `fork'
    from /usr/local/rvm/gems/ruby-1.9.3-p448@global/gems/rmate-1.5.5/bin/rmate:185:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p448@global/bin/rmate:19:in `load'
    from /usr/local/rvm/gems/ruby-1.9.3-p448@global/bin/rmate:19:in `<main>'
    from /usr/local/rvm/gems/ruby-1.9.3-p448@global/bin/ruby_noexec_wrapper:14:in `eval'
    from /usr/local/rvm/gems/ruby-1.9.3-p448@global/bin/ruby_noexec_wrapper:14:in `<main>'

This bash version is simply giving me no output even with the verbosity flag set.

I also did set /etc/rmate.rc to this for good measure:

port: 52698

Any ideas here as to what may be going on or any way to coax rmate.sh to offer some more insight on the connectivity issue?

Quite old, just wanted to leave a note before closing, even though this might not be relevant anymore. This must have something to do with your ssh connection, there's not much you can do to make this issue more verbose with the rmate shell script. Maybe you could try to use strace or some equivalent on your system to look what's actually happening when writing/reading the tcp socket in the shell script, but not sure if this leads to something useful ...