[
https://issues.apache.org/jira/browse/THRIFT-3846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jens Geyer updated THRIFT-3846:
-------------------------------
Component/s: Java - Library
> thriftClient connect some thriftServers cause IOException.
> ----------------------------------------------------------
>
> Key: THRIFT-3846
> URL: https://issues.apache.org/jira/browse/THRIFT-3846
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> 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)