thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Abernethy <Randy.Aberne...@rx-m.com>
Subject Re: ERRPR : Read an invalid frame size of 0. Are you using TFramedTransport on the client side?
Date Mon, 27 Jan 2014 09:20:48 GMT
Hello,

Non blocking servers supply an integrated TFramedTransport. Is it possible
you are adding a second TFramedTransport to the stack on the server? The
Java
nonblocking servers also require nonblocking transports. Here's an
example nb
server:

static class RunnableServer implements Runnable {
public RunnableServer(int port) throws TTransportException {
InetSocketAddress addr = new InetSocketAddress("localhost", port);
TNonblockingServerTransport svrTransport = new
TNonblockingServerSocket(addr);
TradeHistoryHandler handler = new TradeHistoryHandler();
TradeHistory.Processor<TradeHistoryHandler> processor =
new TradeHistory.Processor<>(handler);
Args args = new Args(svrTransport).processor(processor);
args.maxReadBufferBytes = 1024 * 1024 * 1024;
m_server = new TNonblockingServer(args);
}
//Runnable
@Override
public void run() {
m_server.serve();
}
//Methods
public void stop() {
m_server.stop();
}
//Attributes
private TServer m_server;
}

Best,
Randy


On 1/26/2014 10:32 PM, mhyang@jhinno.com wrote:
> Hi all,
> What's wrong with this error?
> I use TFramedTransport and TCompactProtocol in both server and client, but this error
is logged in every call
> 2014-01-27 14:22:11,567 ERROR org.apache.thrift.server.AbstractNonblockingServer$FrameBuffer.read(AbstractNonblockingServer.java:348)
- Read an invalid frame size of 0. Are you using TFramedTransport on the client side? 
>
>
>
> mhyang@jhinno.com


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