I followed the example from https://thrift.apache.org/tutorial/py.html

started server, then started client, but the client stops at the line where
it did the first add() RPC:
"    sum_ = client.add(1, 1)"


on the server side, I gave it a ctrl-C, it printed out the stack it was on
(always this stack position):

^C----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 55714)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 293, in
_handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 655, in __init__
    self.handle()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 310, in
handle_one_request
    self.raw_requestline = self.rfile.readline(65537)
  File "/usr/lib/python2.7/socket.py", line 480, in readline
    data = self._sock.recv(self._rbufsize)
KeyboardInterrupt
----------------------------------------


so it seems that the client is not flushing its socket and server it still
reading (not seeing a NEWLINE) ?

do anyone see the tutorial code working at all? I'm running both server and
client locally on a ubuntu 18 laptop.

Reply via email to