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

TServerSocket caused TServer::serve() to fail in Linux

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • C++ - Library
    • None
    • Debain 10 in docker

      ubuntu 20.04 in vmare player

    Description

      sample code

      std::srting path = "/tmp/mytest";
      // TPipeServer is same of TServerSocket in Linux
      std::shared_ptr<apache::thrift::transport::TServerTransport> transport(new apache::thrift::transport::TPipeServer(path));

      // processor is an instance of apache::thrift::TProcessor
      // factory1 is an instance of subclass apache::thrift::transport::TTransportFactory
      //   such as apache::thrift::transport::TBufferedTransportFactory
      // factory2 is an instance of subclass apache::thrift::transport::TProtocolFactory
      //   such as apache::thrift::protocol::TBinaryProtocolFactory
      std::shared_ptr<apache::thrift::server::TServer> server(processor, transport, factory1, factory2);
      server->serve();

      build and run,  no problem.

      run to failed again, after kill the last

      Abnormality occurred in server->serve(), because of "Address already in use"

      Attachments

        Activity

          People

            Unassigned Unassigned
            tumiwang Tumi Wang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: