PyCharm remote interpreter problem ConnectionRefusedError: [Errno 111] Connection refused

Answered

I have correctly configured deployment and remote interpreter via ssh. But when I run a python script, I got a error:

ssh://imed@192.168.208.224:22/usr/bin/python3 /home/imed/.pycharm_helpers/pydev/pydev_run_in_console.py 0 0 /Users/peng/workspace/PycharmProjects/vgg/mnist.py
Traceback (most recent call last):
File "/home/imed/.pycharm_helpers/pydev/pydev_run_in_console.py", line 86, in <module>
interpreter.ShowConsole()
File "/home/imed/.pycharm_helpers/pydev/_pydev_bundle/pydev_console_utils.py", line 449, in ShowConsole
server.ShowConsole()
File "/usr/lib/python3.5/xmlrpc/client.py", line 1092, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python3.5/xmlrpc/client.py", line 1432, in __request
verbose=self.__verbose
File "/usr/lib/python3.5/xmlrpc/client.py", line 1134, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python3.5/xmlrpc/client.py", line 1146, in single_request
http_conn = self.send_request(host, handler, request_body, verbose)
File "/usr/lib/python3.5/xmlrpc/client.py", line 1259, in send_request
self.send_content(connection, request_body)
File "/usr/lib/python3.5/xmlrpc/client.py", line 1289, in send_content
connection.endheaders(request_body)
File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
File "/usr/lib/python3.5/http/client.py", line 877, in send
self.connect()
File "/usr/lib/python3.5/http/client.py", line 849, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/lib/python3.5/socket.py", line 711, in create_connection
raise err
File "/usr/lib/python3.5/socket.py", line 702, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

I have set the path mapping like this:

The deployment works well and I can log in the remote server via ssh in terminal.

By the way, it seems that the command is wrong :

ssh://imed@192.168.208.224:22/usr/bin/python3 /home/imed/.pycharm_helpers/pydev/pydev_run_in_console.py 0 0 /Users/peng/workspace/PycharmProjects/vgg/mnist.py

This command use my local path instead of the remote path, but I have set the path mapping. That very confusing.

My PyCharm version and my OS here:

PyCharm 2017.3 (Professional Edition)
Build #PY-173.3727.137, built on November 29, 2017
JRE: 1.8.0_152-release-1024-b6 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.13.2

Could someone help me?

 

2
2 comments
Avatar
Permanently deleted user

Same issue

0

Please check the problem with the latest Pycharm 2017.3.1 where https://youtrack.jetbrains.com/issue/PY-23974 should be fixed.

0

Please sign in to leave a comment.