You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Mario Emmenlauer (Jira)" <ji...@apache.org> on 2020/04/02 15:06:00 UTC
[jira] [Created] (THRIFT-5161) Can not combine C++ server with
netstd client for binary protocol
Mario Emmenlauer created THRIFT-5161:
----------------------------------------
Summary: Can not combine C++ server with netstd client for binary protocol
Key: THRIFT-5161
URL: https://issues.apache.org/jira/browse/THRIFT-5161
Project: Thrift
Issue Type: Improvement
Components: netstd - Library
Affects Versions: 0.13.0
Reporter: Mario Emmenlauer
I fail to use a netstd client on a C++ server with the binary protocol, plain socket (no ssl). The connection is established successfully, and I can call a first method, but then the connection breaks.
In more detail, this is what I get:
For a one-way method, I can call send twice, and I receive a successful send on the client side, but nothing is received on the server. When attempting a third send, I get client exception
{{ThriftClient::test01(): System.IO.IOException: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine..}}
{{ ---> System.Net.Sockets.SocketException (10053): An established connection was aborted by the software in your host machine.}}
{{ --- End of inner exception stack trace ---}}
{{ at Thrift.Transport.Client.TStreamTransport.WriteAsync(Byte[] buffer, Int32 offset, Int32 length, CancellationToken cancellationToken) in C:\thrift\lib\netstd\Thrift\Transport\Client\TStreamTransport.cs:line 96}}
{{ at Thrift.Transport.TBufferedTransport.FlushAsync(CancellationToken cancellationToken) in C:\thrift\lib\netstd\Thrift\Transport\Layered\TBufferedTransport.cs:line 168}}
{{ at InternalCppAPI.InternalCppAPI.Client.test01Async(CancellationToken cancellationToken) in C:\BDAImAcquireWPFGui\CppNetBinding\src\gen-netstd\InternalCppAPI\InternalCppAPI.cs:line 92}}
{{ at InternalCppAPI.ThriftClient.test01(CancellationToken cancellationToken) in C:\BDAImAcquireWPFGui\CppNetBinding\src\ThriftClient.cs:line 129}}
For a two-way method, I can call send successfully once, and the method gets the correct server response. On the second attempt, I get client exception
{{ThriftClient::ping(): System.IO.IOException: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine..}}
{{ ---> System.Net.Sockets.SocketException (10053): An established connection was aborted by the software in your host machine.}}
{{ --- End of inner exception stack trace ---}}
{{ at Thrift.Transport.Client.TStreamTransport.ReadAsync(Byte[] buffer, Int32 offset, Int32 length, CancellationToken cancellationToken) in C:\thrift\lib\netstd\Thrift\Transport\Client\TStreamTransport.cs:line 85}}
{{ at Thrift.Transport.TBufferedTransport.ReadAsync(Byte[] buffer, Int32 offset, Int32 length, CancellationToken cancellationToken) in C:\thrift\lib\netstd\Thrift\Transport\Layered\TBufferedTransport.cs:line 115}}
{{ at Thrift.Transport.TTransport.ReadAllAsync(Byte[] buffer, Int32 offset, Int32 length, CancellationToken cancellationToken) in C:\thrift\lib\netstd\Thrift\Transport\TTransport.cs:line 149}}
{{ at Thrift.Protocol.TBinaryProtocol.ReadI32Async(CancellationToken cancellationToken) in C:\thrift\lib\netstd\Thrift\Protocol\TBinaryProtocol.cs:line 473}}
{{ at Thrift.Protocol.TBinaryProtocol.ReadMessageBeginAsync(CancellationToken cancellationToken) in C:\thrift\lib\netstd\Thrift\Protocol\TBinaryProtocol.cs:line 279}}
{{ at InternalCppAPI.InternalCppAPI.Client.pingAsync(Int32 aTestValue, CancellationToken cancellationToken) in C:\BDAImAcquireWPFGui\CppNetBinding\src\gen-netstd\InternalCppAPI\InternalCppAPI.cs:line 62}}
{{ at InternalCppAPI.ThriftClient.ping(Int32 aTestValue, CancellationToken cancellationToken) in C:\BDAImAcquireWPFGui\CppNetBinding\src\ThriftClient.cs:line 110}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)