thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nishant Sthalekar <nishant06...@gmail.com>
Subject Problems calling thrift server in python from thrift client in javascript
Date Wed, 25 Mar 2015 22:34:57 GMT
Hi all,
   I am trying to connect to python thrift server from a javacript thrift
client. Currently I am just using a tutorial code on which I will build
later. When I connect I get the following error on server.


D:\Game Component
Integration\Project\thriftPyTest\pythonImpl>pythonServer.pyStarting
python server...
ERROR:thrift.server.TServer:Traceback (most recent call last):File
"build\bdist.win32\egg\thrift\server\TServer.py", line 88, in serve
self.processor.process(iprot, oprot)File
"../gen-py\helloworld\HelloWorld.py", line 133, in process (name,
type, seqid) = iprot.readMessageBegin()File
"build\bdist.win32\egg\thrift\protocol\TBinaryProtocol.py", line 140,
in readMessageBegin
name = self.trans.readAll(sz)File
"build\bdist.win32\egg\thrift\transport\TTransport.py", line 58, in
readAll
chunk = self.read(sz - have)File
"build\bdist.win32\egg\thrift\transport\TTransport.py", line 159, in
read
self.__rbuf = StringIO(self.__trans.read(max(sz,
self.__rbuf_size)))File
"build\bdist.win32\egg\thrift\transport\TSocket.py", line 105, in read
buff = self.handle.recv(sz)MemoryError


Client code is as follows

  thriftCall:function() {

    var transport = new
Thrift.Transport("http://localhost:30303/pythonImpl/pythonServer");
    var protocol  = new Thrift.Protocol(transport);
    var client    = new HelloWorldClient(protocol);



    try {
        result = client.ping();
        cc.log(result);

        result = client.sayHello();
        cc.log(result);

        result = client.sayMsg(HELLO_IN_KOREAN);
        cc.log(result);
    }catch(ouch){
        cc.log("Problem!!!");
    }}


and server code can be found on this link
http://tkang.blogspot.ca/2010/07/thrift-server-client-in-python.html

If I try to connect the server using python client, then it works fine.
Please help me out with this.
Thanks

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message