thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tenghuan He <tenghua...@gmail.com>
Subject Thrift TThreadSelectorServer java.io.StreamCorruptedException: invalid stream header: 80010001
Date Wed, 20 Apr 2016 16:35:44 GMT
​Hi, everyone

I am using TThreadSelectorServer as the server, however when the client
send requests to the server, I got the exceptions and server end and client
end

The server I defined is as following where the types of parameter and
return are both binary which is BinaryBuffer in Java.

service RPCQueryProcessor {
    binary getDataPoint(1: binary params)

}


The server end
java.io.StreamCorruptedException: invalid stream header: 80010001
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:806)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:299)
at
com.corp.tsdb.common.utils.ObjectByteBufferConverter.byteBufferToObject(ObjectByteBufferConverter.java:48)
at
com.corp.tsdb.common.rpc.RPCQueryProcessorHandler.getDataPoint(RPCQueryProcessorHandler.java:39)
at
com.corp.tsdb.common.rpc.RPCQueryProcessor$Processor$getDataPoint.getResult(RPCQueryProcessor.java:1260)
at
com.corp.tsdb.common.rpc.RPCQueryProcessor$Processor$getDataPoint.getResult(RPCQueryProcessor.java:1244)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
at
org.apache.thrift.server.AbstractNonblockingServer$FrameBuffer.invoke(AbstractNonblockingServer.java:518)
at org.apache.thrift.server.Invocation.run(Invocation.java:18)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
5413 [pool-1-thread-1] ERROR
org.apache.thrift.server.AbstractNonblockingServer$FrameBuffer  -
Unexpected throwable while invoking!
java.lang.NullPointerException
at
com.corp.tsdb.common.rpc.RPCQueryProcessorHandler.getDataPoint(RPCQueryProcessorHandler.java:40)
at
com.corp.tsdb.common.rpc.RPCQueryProcessor$Processor$getDataPoint.getResult(RPCQueryProcessor.java:1260)
at
com.corp.tsdb.common.rpc.RPCQueryProcessor$Processor$getDataPoint.getResult(RPCQueryProcessor.java:1244)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
at
org.apache.thrift.server.AbstractNonblockingServer$FrameBuffer.invoke(AbstractNonblockingServer.java:518)
at org.apache.thrift.server.Invocation.run(Invocation.java:18)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)


and the client end

org.apache.thrift.transport.TTransportException
at
org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
at
org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:129)
at
org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:86)
at
org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:429)
at
org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:318)
at
org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:219)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:77)
at
com.corp.tsdb.common.rpc.RPCQueryProcessor$Client.recv_getDataPoint(RPCQueryProcessor.java:135)
at
com.corp.tsdb.common.rpc.RPCQueryProcessor$Client.getDataPoint(RPCQueryProcessor.java:124)
at
com.corp.tsdb.common.rpc.RPCQueryProcessorFramedClient.getDataPoint(RPCQueryProcessorFramedClient.java:63)
at com.corp.tsdb.common.rpc.RPCFramedTest.main(RPCFramedTest.java:17)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Exception in thread "main" java.lang.NullPointerException
at com.corp.tsdb.common.rpc.RPCFramedTest.main(RPCFramedTest.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)

Can anyone help me?

Thanks very much

Tenghuan He

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