Error with PyCharm WSL ssh connection
I am a newbie in both pycharm and WSL, I try to follow the instruction of this tutorial https://www.jetbrains.com/help/pycharm/2016.2/configuring-remote-interpreters-via-wsl.html
I can use putty to connect to wsl and open python3 just fine. Though there is this message pop up in putty: ''debug1: Unable to open session: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory''
However, when I try to set up the remote interpreter in pycharm, it always stuck on 'Attemp x fail to connect' where x is a number. Sometimes after a long period of time, the remote interpretor will actually get set-up. However when I try to open a python console, I will find that the connection is not there at all with the following error message:
''
PyDev console: starting.
import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['C:\\Users\\fish\\PycharmProjects\\remote-test'])
Python 3.4.3 (default, Sep 14 2016, 12:36:27)
[GCC 4.8.4] on linux
Traceback (most recent call last):
File "/root/.pycharm_helpers/pydev/_pydev_bundle/pydev_console_utils.py", line 251, in add_exec
self.finish_exec(more)
File "/root/.pycharm_helpers/pydev/_pydev_bundle/pydev_console_utils.py", line 444, in finish_exec
return server.NotifyFinished(more)
File "/usr/lib/python3.4/xmlrpc/client.py", line 1098, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python3.4/xmlrpc/client.py", line 1437, in __request
verbose=self.__verbose
File "/usr/lib/python3.4/xmlrpc/client.py", line 1140, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python3.4/xmlrpc/client.py", line 1152, in single_request
http_conn = self.send_request(host, handler, request_body, verbose)
File "/usr/lib/python3.4/xmlrpc/client.py", line 1264, in send_request
self.send_content(connection, request_body)
File "/usr/lib/python3.4/xmlrpc/client.py", line 1294, in send_content
connection.endheaders(request_body)
File "/usr/lib/python3.4/http/client.py", line 1084, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.4/http/client.py", line 922, in _send_output
self.send(msg)
File "/usr/lib/python3.4/http/client.py", line 857, in send
self.connect()
File "/usr/lib/python3.4/http/client.py", line 834, in connect
self.timeout, self.source_address)
File "/usr/lib/python3.4/socket.py", line 512, in create_connection
raise err
File "/usr/lib/python3.4/socket.py", line 503, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
''
An additional info on WSL side is when it get stuck, it is often stuck at the debug message:
''
debug1: server_input_global_request: rtype keepalive@jcraft.com want_reply 1
''
So what should I do?
Thanks in advance!
请先登录再写评论。
Hi!
Please follow the comments in the issue https://youtrack.jetbrains.com/issue/PY-21431. We need some debug information to track down the problem.