Rpyc connection closed by peer

I follow the rpyc tutorials on this page , but get an EOFError when this code runs

bgsrv = rpyc.BgServingThread(conn) #creates a bg thread to process incoming events

I searched a lot, but did not find a way to fix this problem. The server and client are running on the same computer. I am running a script in macbook pro. Need help fixing this error.

You can find the source code for stream.py here .

Here is the trace:

Exception in thread Thread-10:
Traceback (most recent call last):
  File"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
File "/Library/Python/2.7/site-packages/rpyc-3.3.0-py2.7.egg/rpyc/utils/helpers.py", line 204, in _bg_server
    self._conn.serve(self.SERVE_INTERVAL)
File "/Library/Python/2.7/site-packages/rpyc-3.3.0-py2.7.egg/rpyc/core/protocol.py", line 387, in serve
    data = self._recv(timeout, wait_for_lock = True)
File "/Library/Python/2.7/site-packages/rpyc-3.3.0-py2.7.egg/rpyc/core/protocol.py", line 345, in _recv
    data = self._channel.recv()
File "/Library/Python/2.7/site-packages/rpyc-3.3.0-py2.7.egg/rpyc/core/channel.py", line 50, in recv
    header = self.stream.read(self.FRAME_HEADER.size)
File "/Library/Python/2.7/site-packages/rpyc-3.3.0-py2.7.egg/rpyc/core/stream.py", line 195, in read
    raise EOFError("connection closed by peer")
EOFError: connection closed by peer
+4
source share

Source: https://habr.com/ru/post/1607327/


All Articles