3

I am trying to connect machine using the RPyC but it always says that connection refused.

I did on the python shell

import rpyc
rpyc.connect("hostname", port)

but it says connection refused. checked the firewall for the port. firewall allow this port.

hjpotter92
  • 78,589
  • 36
  • 144
  • 183
Sagar
  • 2,315
  • 7
  • 25
  • 34
  • Is the server running? – BlackBear Feb 05 '14 at 11:20
  • Yes.it is running. why it says connection refused almost for evey machine for which I am trying. – Sagar Feb 05 '14 at 11:25
  • 1
    `every machine` you mean servers or clients. If a server process is running on `hostname` then probably `port` is blocked by a firewall or you are using the wrong port number. Even `hostname` is not reachable on the network. – PeterMmm Feb 05 '14 at 11:45
  • or perhaps you have a variable named `hostname` but you accidentally pass the string `"hostname"` instead of the value of the variable? – shx2 Feb 05 '14 at 17:35

3 Answers3

1

Try using the exact same versions of both python and rpyc on client and server !

0

This means that you are not runnin the server side for rpyc you need to donwload the source code for rpyc from here

https://github.com/tomerfiliba-org/rpyc/releases

then run:

python bin/rpyc_classic.py

where bin is in the source code folder

Once you have that running, you should be able to run the python code without any issues

I hope it works

0

default server binds to localhost, but the client needs to have hostname 'None' to do this correctly:

rpyc.connect(None, port)