[ 
https://issues.apache.org/jira/browse/THRIFT-2622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14058605#comment-14058605
 ] 

Jens Geyer commented on THRIFT-2622:
------------------------------------

In most cases this indicates a mismatch between protocol/transport stacks on 
one of the both ends.
- Are you sure the other side uses framed transport? 
- Is that client or server side? If client, what server implementation 
(TSimpleServer, TThreadedServer, etc) does the server use?
- About what language are we talking? We have plenty of them :-)

> Expecting > 4 bytes, found only 2
> ---------------------------------
>
>                 Key: THRIFT-2622
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2622
>             Project: Thrift
>          Issue Type: Bug
>    Affects Versions: 0.9.1
>         Environment: v0.10.26
>            Reporter: my_program
>
> When I deploy my application in production Environment, it always generate 
> error "Expecting > 4 bytes, found only 2"  every one or two minutes。
> Source code is:
>  // framed transport
>     while (data.length) {
>       if (frameLeft === 0) {
>         // TODO assumes we have all 4 bytes
>         if (data.length < 4) {
>           console.log("Expecting > 4 bytes, found only " + data.length);
>           residual = data;
>           break;
>           //throw Error("Expecting > 4 bytes, found only " + data.length);
>         }
>         frameLeft = binary.readI32(data, 0);
>         frame = new Buffer(frameLeft);
>         framePos = 0;
>         data = data.slice(4, data.length);
>       }
> I don't know why? Can anybody help me?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to