Skip to content

dremio+flight connection issue #39

@snth

Description

@snth

Hi,

I'm struggling to connect to dremio running in the community edition dremio/dremio-oss docker container.

I've seen many similar issues like #11 and #23 but none of those solution seem to be working for me.

I first encountered this when trying to connect from Superset but I can reproduce it running in a simple Python script.

$ python --version
Python 3.8.10
$ pip install sqlalchemy_dremio
Requirement already satisfied: sqlalchemy_dremio in /home/tobias/.local/lib/python3.8/site-packages (3.0.3)
Requirement already satisfied: sqlalchemy>=1.3.24 in /home/tobias/.local/lib/python3.8/site-packages (from sqlalchemy_dremio) (2.0.8)
Requirement already satisfied: pyarrow>=5.0.0 in /home/tobias/.local/lib/python3.8/site-packages (from sqlalchemy_dremio) (11.0.0)
Requirement already satisfied: typing-extensions>=4.2.0 in /home/tobias/.local/lib/python3.8/site-packages (from sqlalchemy>=1.3.24->sqlalchemy_dremio) (4.5.0)
Requirement already satisfied: greenlet!=0.4.17; platform_machine == "aarch64" or (platform_machine == "ppc64le" or (platform_machine == "x86_64" or (platform_machine == "amd64" or (platform_machine == "AMD64" or (platform_machine == "win32" or platform_machine == "WIN32"))))) in /usr/lib/python3/dist-packages (from sqlalchemy>=1.3.24->sqlalchemy_dremio) (0.4.15)
Requirement already satisfied: numpy>=1.16.6 in /home/tobias/.local/lib/python3.8/site-packages (from pyarrow>=5.0.0->sqlalchemy_dremio) (1.24.2)
>>> import sqlalchemy as sa
>>> engine = sa.create_engine('dremio+flight://dremio:dremio123@localhost:31010/dremio?UseEncryption=false&disableCertificateVerification=true', echo=True)
>>> con = engine.connect()
...
 File "pyarrow/_flight.pyx", line 1398, in pyarrow._flight.FlightClient.authenticate_basic_token
  File "pyarrow/_flight.pyx", line 71, in pyarrow._flight.check_flight_status
pyarrow._flight.FlightUnavailableError: Flight returned unavailable error, with message: failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:31010: Socket closed
>>>

The relevant section of my dremio.conf looks as follows:

services: {
  coordinator.enabled: true,
  coordinator.master.enabled: true,
  executor.enabled: true,
  flight.enabled: true,
  #flight.auth.mode: "legacy.arrow.flight.auth"
  flight.auth.mode: "arrow.flight.auth2"
  #flight.use_session_service: true,
  #flight.ssl.enabled: true,
  #flight.ssl.auto-certificate.enabled: true
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions