rydeng opened a new issue, #1115:
URL: https://github.com/apache/arrow-adbc/issues/1115

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   ```python
   import time
   import adbc_driver_flightsql.dbapi as flight_sql
   
   db_kwargs = {
       "username": "flight_username",
       "password": "1234567",
   }
   st = time.time()
   with flight_sql.connect(uri="grpc://localhost:31337", db_kwargs=db_kwargs, 
autocommit=True) as conn:
       with conn.cursor() as cur:
           cur.execute("select 1")
           x = cur.fetch_arrow_table()
           print(x.to_pandas())
   print(time.time() - st)
   ```
   My flight sql server use basic auth, and the password is "123456". When 
running the code above with password "1234567", I got error as follows:
   ```python
   cur.execute("select 1")
     File 
"/home/ubuntu/.local/lib/python3.10/site-packages/adbc_driver_manager/dbapi.py",
 line 621, in execute
       self._prepare_execute(operation, parameters)
     File 
"/home/ubuntu/.local/lib/python3.10/site-packages/adbc_driver_manager/dbapi.py",
 line 590, in _prepare_execute
       self._stmt.prepare()
     File "adbc_driver_manager/_lib.pyx", line 1090, in 
adbc_driver_manager._lib.AdbcStatement.prepare
     File "adbc_driver_manager/_lib.pyx", line 385, in 
adbc_driver_manager._lib.check_error
   adbc_driver_manager._lib.ProgrammingError: ADBC_STATUS_UNAUTHENTICATED (13): 
[FlightSQL] [FlightSQL] Invalid credentials. Detail: Unauthenticated 
(Unauthenticated; Prepare)
   ```
   When I change the password to the right "123456", I still got error like 
this:
   ```python
   with flight_sql.connect(uri="grpc://localhost:31337", db_kwargs=db_kwargs, 
autocommit=True) as conn:
     File 
"/home/ubuntu/.local/lib/python3.10/site-packages/adbc_driver_flightsql/dbapi.py",
 line 120, in connect
       conn = adbc_driver_manager.AdbcConnection(db, **(conn_kwargs or {}))
     File "adbc_driver_manager/_lib.pyx", line 644, in 
adbc_driver_manager._lib.AdbcConnection.__init__
     File "adbc_driver_manager/_lib.pyx", line 385, in 
adbc_driver_manager._lib.check_error
   adbc_driver_manager._lib.ProgrammingError: ADBC_STATUS_UNAUTHENTICATED (13): 
[FlightSQL] rpc error: code = Unauthenticated desc = Invalid credentials. 
Detail: Unauthenticated
   ```
   I add some log to server, I found the request is not sended to the server. 
And I restart the server, it got authenticated successfully.
   
   The current situation is that once I enter the wrong password for the first 
time, even if I change the password to the correct one afterwards, it cannot 
pass the verification unless I restart the server.
   
   
   ### Component(s)
   
   Python


-- 
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]

Reply via email to