Tumi Wang created THRIFT-5771:
---------------------------------
Summary: TServerSocket caused TServer::serve() to fail in Linux
Key: THRIFT-5771
URL: https://issues.apache.org/jira/browse/THRIFT-5771
Project: Thrift
Issue Type: Bug
Components: C++ - Library
Environment: Debain 10 in docker
ubuntu 20.04 in vmare player
Reporter: Tumi Wang
sample code
{quote}int main()
{
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();
return 0;
}
{quote}
build and run, no problem.
run to failed again, after kill the last
Abnormality occurred in server->serve(), because of "Address already in use"
--
This message was sent by Atlassian Jira
(v8.20.10#820010)