This is an automated email from the ASF dual-hosted git repository.
zouxinyi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 96d614fc2ed [fix](arrow-flight-sql) Fix return result from FE Arrow
Flight server error `0.0.0.0:xxx, connection refused` (#40002)
96d614fc2ed is described below
commit 96d614fc2ed6cf8cda6bd6804951413366813085
Author: Xinyi Zou <[email protected]>
AuthorDate: Sun Sep 1 22:29:57 2024 +0800
[fix](arrow-flight-sql) Fix return result from FE Arrow Flight server error
`0.0.0.0:xxx, connection refused` (#40002)
Fix: #36340
Introduced in: #34850
```
adbc_driver_manager.OperationalError: IO: [FlightSQL] connection error:
desc = "transport: Error while dialing: dial tcp 0.0.0.0:8029: connect:
connection refused" (Unavailable; DoGet: endpoint 0:
[uri:"grpc+tcp://0.0.0.0:8029"])
```
When query results are returned from FE Arrow Flight server, and Doris
FE and ADBC Client are not on the same machine, such as `show
tables;`, `show databases;`, the IP in FlightInfo returned by FE to the
client is wrong, and `0.0.0.0` is returned instead of the real IP of FE.
The client fails to pull the results from `0.0.0.0`.
No problem when query results are returned from BE Arrow Flight server,
such as the normal query statement `select * from xxx`.
---
.../apache/doris/service/arrowflight/DorisFlightSqlService.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/DorisFlightSqlService.java
b/fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/DorisFlightSqlService.java
index df9099c6816..b83936dab3b 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/DorisFlightSqlService.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/service/arrowflight/DorisFlightSqlService.java
@@ -18,6 +18,7 @@
package org.apache.doris.service.arrowflight;
import org.apache.doris.common.Config;
+import org.apache.doris.service.FrontendOptions;
import
org.apache.doris.service.arrowflight.auth2.FlightBearerTokenAuthenticator;
import org.apache.doris.service.arrowflight.sessions.FlightSessionsManager;
import
org.apache.doris.service.arrowflight.sessions.FlightSessionsWithTokenManager;
@@ -45,7 +46,6 @@ public class DorisFlightSqlService {
public DorisFlightSqlService(int port) {
BufferAllocator allocator = new RootAllocator();
- Location location = Location.forGrpcInsecure("0.0.0.0", port);
// arrow_flight_token_cache_size less than qe_max_connection to avoid
`Reach limit of connections`.
// arrow flight sql is a stateless protocol, connection is usually not
actively disconnected.
// bearer token is evict from the cache will unregister ConnectContext.
@@ -54,8 +54,9 @@ public class DorisFlightSqlService {
Config.arrow_flight_token_alive_time);
this.flightSessionsManager = new
FlightSessionsWithTokenManager(flightTokenManager);
- DorisFlightSqlProducer producer = new DorisFlightSqlProducer(location,
flightSessionsManager);
- flightServer = FlightServer.builder(allocator, location, producer)
+ DorisFlightSqlProducer producer = new DorisFlightSqlProducer(
+
Location.forGrpcInsecure(FrontendOptions.getLocalHostAddress(), port),
flightSessionsManager);
+ flightServer = FlightServer.builder(allocator,
Location.forGrpcInsecure("0.0.0.0", port), producer)
.headerAuthenticator(new
FlightBearerTokenAuthenticator(flightTokenManager)).build();
LOG.info("Arrow Flight SQL service is created, port: {},
token_cache_size: {}"
+ ", qe_max_connection: {}, token_alive_time: {}",
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]