Skip to content

ThreadPoolServer not working rpyc 4.0 #283

Closed
@AlinMH

Description

@AlinMH

Hello,

I am having some issues on using ThreadPoolServer. The client cannot connect to the server, and gives the following error.

But it happens to work on rpyc 3.4.4 really well. And I don't know if I'm using the ThreadPoolServer properly, it may be my fault.

Traceback (most recent call last):
  File "C:/.../RPyCTest/client_rpyc.py", line 3, in <module>
    con = rpyc.connect('localhost', 7777)
  File "C:\...\AppData\Local\Programs\Python\Python35\lib\site-packages\rpyc\utils\factory.py", line 93, in connect
    s = SocketStream.connect(host, port, ipv6=ipv6, keepalive=keepalive)
  File "C:\...\AppData\Local\Programs\Python\Python35\lib\site-packages\rpyc\core\stream.py", line 154, in connect
    return cls(cls._connect(host, port, **kwargs))
  File "C:\...\AppData\Local\Programs\Python\Python35\lib\site-packages\rpyc\core\stream.py", line 112, in _connect
    s.connect(sockaddr)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
Environment
  • rpyc version 4.0
  • python version 3.5
  • operating system Windows 7
Minimal example

Server:

import rpyc
import threading

class SomeService(rpyc.Service):
    def on_connect(self, conn):
        print("connected with connection %s" % conn)


server = rpyc.ThreadPoolServer(service=SomeService, port=7777)
t = threading.Thread(target=server.start)
t.start()

Client:

import rpyc

con = rpyc.connect('localhost', 7777)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions