You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Zosimova Zhanna (Jira)" <ji...@apache.org> on 2020/11/03 01:12:00 UTC
[jira] [Updated] (ARROW-10475) [С++] Arrow Flight Server / Client cannot be initialized with Ipv6 host
[ https://issues.apache.org/jira/browse/ARROW-10475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zosimova Zhanna updated ARROW-10475:
------------------------------------
Description:
We want to support Arrow Flight compatibility protocol in [[https://github.com/ClickHouse/ClickHouse]|ClickHouse]. Our code needs Ipv6 support.
In our code I wrote:
{{std::string host = "[::]";}}
{{ int port = 9993;}}
{{ arrow::flight::Location location;}}
{{ auto status = arrow::flight::Location::ForGrpcTcp(host, port, &location);}}
{{ std::cerr << "Status=" << status.ToString() << std::endl;}}
{{ std::cerr << "Location=" << location.ToString() << std::endl;}}
The output seems to be ok:
{{Status=OK}}
{{ Location=grpc+tcp://[::]:9993}}
After that I initialized FlightServerBase using method Init(options).
In flight library I wrote next 3 lines before [[https://github.com/apache/arrow/blob/master/cpp/src/arrow/flight/server.cc#L825]|code]
{{std::cerr << "Location=" << location.ToString() << std::endl;}}
{{ std::cerr << "Host=" << location.uri_->host() << ", Port=" << location.uri_->port_text() << std::endl;}}
{{ std::cerr << "Host:Port=" << location.uri_->host() << ":" << location.uri_->port_text() << std::endl;}}
The output is:
{{Location=grpc+tcp://[::]:9993}}
{{ Host=::, Port=9993}}
{{ Host:Port=:::9993}}
{{ E1103 03:18:01.978794160 612780 server_chttp2.cc:40] \{"created":"@1604362681.978626229","description":"Name or service not known","errno":-2,"file":"../contrib/grpc/src/core/lib/iomgr/resolve_address_posix.cc","file_line":108,"os_error":"Name or service not known","syscall":"getaddrinfo","target_address":":::9993"}}}
Location returns host without square brackets that must be used in addresses with port. The problem is here:
{{std::stringstream address;}}
{{ address << location.uri_->host() << ':' << location.uri_->port_}}text();
The same issue is also observed in the client [[https://github.com/ClickHouse-Extras/arrow/blob/master/cpp/src/arrow/flight/client.cc#L845]|code]
was:
We want to support Arrow Flight compatibility protocol in [[https://github.com/ClickHouse/ClickHouse]|ClickHouse]. Our code needs Ipv6 support.
In our code I wrote:
```
std::string host = "[::]";
int port = 9993;
arrow::flight::Location location;
auto status = arrow::flight::Location::ForGrpcTcp(host, port, &location);
std::cerr << "Status=" << status.ToString() << std::endl;
std::cerr << "Location=" << location.ToString() << std::endl;
```
The output seems to be ok:
```
Status=OK
Location=grpc+tcp://[::]:9993
```
After that I initialized FlightServerBase using method Init(options).
In flight library I wrote next 3 lines before [[https://github.com/apache/arrow/blob/master/cpp/src/arrow/flight/server.cc#L825]|code]
```
std::cerr << "Location=" << location.ToString() << std::endl;
std::cerr << "Host=" << location.uri_->host() << ", Port=" << location.uri_->port_text() << std::endl;
std::cerr << "Host:Port=" << location.uri_->host() << ":" << location.uri_->port_text() << std::endl;
```
The output is:
```
Location=grpc+tcp://[::]:9993
Host=::, Port=9993
Host:Port=:::9993
E1103 03:18:01.978794160 612780 server_chttp2.cc:40] \{"created":"@1604362681.978626229","description":"Name or service not known","errno":-2,"file":"../contrib/grpc/src/core/lib/iomgr/resolve_address_posix.cc","file_line":108,"os_error":"Name or service not known","syscall":"getaddrinfo","target_address":":::9993"}
```
Location returns host without square brackets that must be used in addresses with port. The problem is here:
```
std::stringstream address;
address << location.uri_->host() << ':' << location.uri_->port_text();
```
The same issue is also observed in the client [[https://github.com/ClickHouse-Extras/arrow/blob/master/cpp/src/arrow/flight/client.cc#L845]|code]
> [С++] Arrow Flight Server / Client cannot be initialized with Ipv6 host
> -----------------------------------------------------------------------
>
> Key: ARROW-10475
> URL: https://issues.apache.org/jira/browse/ARROW-10475
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++, FlightRPC
> Reporter: Zosimova Zhanna
> Priority: Major
>
> We want to support Arrow Flight compatibility protocol in [[https://github.com/ClickHouse/ClickHouse]|ClickHouse]. Our code needs Ipv6 support.
>
> In our code I wrote:
> {{std::string host = "[::]";}}
> {{ int port = 9993;}}
> {{ arrow::flight::Location location;}}
> {{ auto status = arrow::flight::Location::ForGrpcTcp(host, port, &location);}}
> {{ std::cerr << "Status=" << status.ToString() << std::endl;}}
> {{ std::cerr << "Location=" << location.ToString() << std::endl;}}
> The output seems to be ok:
> {{Status=OK}}
> {{ Location=grpc+tcp://[::]:9993}}
> After that I initialized FlightServerBase using method Init(options).
> In flight library I wrote next 3 lines before [[https://github.com/apache/arrow/blob/master/cpp/src/arrow/flight/server.cc#L825]|code]
> {{std::cerr << "Location=" << location.ToString() << std::endl;}}
> {{ std::cerr << "Host=" << location.uri_->host() << ", Port=" << location.uri_->port_text() << std::endl;}}
> {{ std::cerr << "Host:Port=" << location.uri_->host() << ":" << location.uri_->port_text() << std::endl;}}
> The output is:
> {{Location=grpc+tcp://[::]:9993}}
> {{ Host=::, Port=9993}}
> {{ Host:Port=:::9993}}
> {{ E1103 03:18:01.978794160 612780 server_chttp2.cc:40] \{"created":"@1604362681.978626229","description":"Name or service not known","errno":-2,"file":"../contrib/grpc/src/core/lib/iomgr/resolve_address_posix.cc","file_line":108,"os_error":"Name or service not known","syscall":"getaddrinfo","target_address":":::9993"}}}
> Location returns host without square brackets that must be used in addresses with port. The problem is here:
> {{std::stringstream address;}}
> {{ address << location.uri_->host() << ':' << location.uri_->port_}}text();
> The same issue is also observed in the client [[https://github.com/ClickHouse-Extras/arrow/blob/master/cpp/src/arrow/flight/client.cc#L845]|code]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)