xinyiZzz opened a new issue, #38666:
URL: https://github.com/apache/arrow/issues/38666
### Describe the usage question you have. Please include as many useful
details as possible.
I got an error when using Python ADBC to connect to the flight server
implemented in C++.
```
conn = flight_sql.connect(uri="grpc://127.0.0.1:xxx", db_kwargs={
adbc_driver_manager.DatabaseOptions.USERNAME.value: "root",
adbc_driver_manager.DatabaseOptions.PASSWORD.value: "",
})
cursor = conn.cursor()
start_time = datetime.now()
cursor.execute(sql)
arrow_data = cursor.fetchallarrow()
> adbc_driver_manager.OperationalError: IO: [FlightSQL] connection error:
desc = "transport: Error while dialing: dial tcp 127.0.0.1:9080: connectex: no
connection could be made because the target machine actively refused it."
(Unavailable; AuthenticateBasicToken)
```
I implemented flight server in C++ like this:
```
_header_middleware =
std::make_shared<NoOpHeaderAuthServerMiddlewareFactory>();
_bearer_middleware =
std::make_shared<NoOpBearerAuthServerMiddlewareFactory>();
flight_options.auth_handler =
std::make_unique<arrow::flight::NoOpAuthHandler>();
flight_options.middleware.push_back({"header-auth-server",
_header_middleware});
flight_options.middleware.push_back({"bearer-auth-server",
_bearer_middleware});
```
I'm looking for help, thanks!
### Component(s)
FlightRPC
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]