You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "tft_yh (JIRA)" <ji...@apache.org> on 2016/06/01 14:19:00 UTC

[jira] [Updated] (THRIFT-3846) thriftClient connect some thriftServers cause IOException.

     [ https://issues.apache.org/jira/browse/THRIFT-3846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

tft_yh updated THRIFT-3846:
---------------------------
    Attachment: QQ截图20160601184710.jpg
                QQ截图20160601180516.jpg

> thriftClient connect some thriftServers cause IOException.
> ----------------------------------------------------------
>
>                 Key: THRIFT-3846
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3846
>             Project: Thrift
>          Issue Type: Bug
>    Affects Versions: 0.9.3
>         Environment: Windows, Linux, Csharp, Java
>            Reporter: tft_yh
>         Attachments: QQ截图20160601180516.jpg, QQ截图20160601184710.jpg
>
>
> In our environment, there are one client (thriftClient) and several servers (thriftServer) which IP addresses are not the same. 
> When a few of servers, such as 3 ~ 4, the client connect to the server can work normally.
> But when the server reaches more than 8, when the client connect to the server, the client will be terminated immediately, the exception location as follows:
> Public string recv_login ()
> {
> TMessage MSG = iprot_. ReadMessageBegin (); // here - Cannot read. Remote side has closed.
> ......
> }
> To find out the reason, use Wireshark to trace the problem, find some server which report error exception, send the RST state to client. Then I use client (thriftClient) directly connect error server, it is successed.
> client (thriftClient) and server (thriftServer) codes as follows:
> On the client side:
> transport = new TSocket(serverIP, 7911);
> TProtocol protocol = new TBinaryProtocol(transport);
> client = new TestService.Client(protocol);
> transport.Open();
> client.login(.....);
> On the server side:
> TServerSocket serverTransport = new TServerSocket(port, 0, false);
> TestService.Processor processor = new TestService.Processor(new TestServicesImpl());
> TServer server = new TThreadedServer(processor, serverTransport);
> server.Serve();
> How should I do?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)