Open ghost opened 3 years ago
Hey, I faced the same issue today. Suddenly the plugin was no longer working and I couldn't edit any files over ssh. I started debugging:
Long story short, run this in cmd as administrator
net stop hns
net start hns
I ran my usual ssh command but with -v
option to check if the port forwarding was successful
.........SNIP.........
debug1: remote forward success for: listen 52698, connect 127.0.0.1:52698
debug1: All remote forwarding requests processed
.........SNIP.........
I checked that the server is listening on port 52698:
user@53rv3r:~$ sudo lsof -i TCP:52698
[sudo] password for silver:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sshd 655793 user 10u IPv6 248089764 0t0 TCP ip6-localhost:52698 (LISTEN)
sshd 655793 user 11u IPv4 248089765 0t0 TCP localhost:52698 (LISTEN)
then I checked if the client (Sublime Text) is listening on 52698 and it wasn't ðŸ˜
PS C:\Users\user> netstat -on | Select-String 52698
PS C:\Users\user>
reinstalling ssh client/server on windows didn't help so I started debugging the plugin python script and ran the following simple code and it caused the same error mentioned in this issue
from threading import Thread
import socketserver
class ConnectionHandler(socketserver.BaseRequestHandler):
def handle(self):
self.data = self.request.recv(1024).strip()
print("{} wrote:".format(self.client_address[0]))
r = ConnectionHandler(self.data, False)
class TCPServer(socketserver.ThreadingTCPServer):
allow_reuse_address = True
server = TCPServer(("localhost", 52698), ConnectionHandler)
Thread(target=server.serve_forever, args=[]).start()
The issue was from Host Network Service
from windows which didn't allow RemoteSubl to listen on 52698 (I hate windows)
Run these commands on cmd as administrator and it should solve the issue
net stop hns
net start hns
@randy3k Maybe this workaround should be added in troubleshooting section
Hello :)
Is it possible to fix this error somehow?
Thanks, Ihor