Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-5161

Can not combine C++ server with netstd client for binary protocol

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.13.0
    • None
    • None

    Description

      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
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              emmenlau Mario Emmenlauer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: