You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Tumi Wang (Jira)" <ji...@apache.org> on 2024/03/26 06:33:00 UTC
[jira] [Updated] (THRIFT-5771) TServerSocket caused TServer::serve() to fail in Linux
[ https://issues.apache.org/jira/browse/THRIFT-5771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tumi Wang updated THRIFT-5771:
------------------------------
Description:
sample code
{quote}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"
was:
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"
> 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
> Priority: Major
>
> sample code
> {quote}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)