# Unable to connect to Dremio from Superset

**URL:** https://community.dremio.com/t/unable-to-connect-to-dremio-from-superset/7235
**Category:** Uncategorized
**Created:** [April 4, 2021, 2:56am UTC](https://community.dremio.com/t/unable-to-connect-to-dremio-from-superset/7235 "2021-04-04T02:56:24Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![jeffpower](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@jeffpower](https://community.dremio.com/u/jeffpower)
#### Post date: [April 4, 2021, 2:56am UTC](https://community.dremio.com/t/unable-to-connect-to-dremio-from-superset/7235/1 "2021-04-04T02:56:24Z")

</div>

am running superset and Dremio [image: dremio/dremio-oss:4.9] on docker containers…  
Have installed all dependencies and drivers on superset docker  
unixodbc-dev   
unixodbc-bin   
unixodbc  
RUN pip install pyodbc  
RUN pip install sqlalchemy\_dremio

Dremio is having  
“ExposedPorts”: {  
“31010/tcp”: {},  
“45678/tcp”: {},  
“9047/tcp”: {}

However, not able to connect to dremio using  
dremio://xxx:xx@localhost:31010/dremio

**Its says able to connect to this localhost… but port is closed.**

But able to able to connect over JDBC

import matplotlib.pyplot as plt; plt.rcdefaults()  
import pyodbc  
import pandas  
host = ‘localhost’  
port = 31010  
uid = ‘jgeorgek’  
pwd = ‘Passw0rd’  
driver = “/Library/Dremio/ODBC/lib/libdrillodbc\_sbu.dylib”  
cnxn=pyodbc.connect(“Driver={};ConnectionType=Direct;HOST={};PORT={};AuthenticationType=Plain;UID={};PWD={}”.format(driver,host,port,uid,pwd),autocommit=True)  
sql = ‘’‘SELECT \* FROM Vehicle\_curatedData’’’  
data = pandas.read\_sql(sql,cnxn)

I do not see any error on the docker logs on superset as well. How to debug ? please advice thanks

---

<div class="post-metadata">

### Author: ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)
#### Post date: [April 4, 2021, 7:05am UTC](https://community.dremio.com/t/unable-to-connect-to-dremio-from-superset/7235/2 "2021-04-04T07:05:06Z")

</div>

@jeffpower

Have you checked the Dremio logs? In case of Docker, it should go to stdout

---

<div class="post-metadata">

### Author: ![jeffpower](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@jeffpower](https://community.dremio.com/u/jeffpower)
#### Post date: [April 5, 2021, 12:30am UTC](https://community.dremio.com/t/unable-to-connect-to-dremio-from-superset/7235/3 "2021-04-05T00:30:12Z")

</div>

hi Balaji,

thanks for the response.

i changed to use host name and please. note now flight is fine - dremio+flight://xx:xx@dremio:32010/dremio …however dremio://xxx:XXXXXXXXXX@localhost:31010/dremio is still issue

now from the UI below is the error  
ERROR: Connection failed, please check your connection settings

From superset docker logs

2021-04-05 00:27:52,036 [UserServer-1] INFO c.d.sabot.rpc.user.UserRPCServer - [USER]: Channel closed /172.25.0.5:31010 \<–\> /172.25.0.2:56174 (user client)  
2021-04-05 00:27:52,036 [UserServer-1] WARN c.d.e.s.o.SessionOptionManagerFactoryImpl - Could not find session with sessionId d84b6cc6-cca0-456e-8290-5431c5cf4daa.  
2021-04-05 00:27:52,036 [UserServer-1] INFO com.dremio.ConnectionLog - [d84b6cc6-cca0-456e-8290-5431c5cf4daa] Connection Closed

from dremio  
`2021-04-05 00:29:09,130 [UserServer-1] INFO c.d.sabot.rpc.user.UserRPCServer - [USER]: Channel closed /172.25.0.5:31010 <--> /172.25.0.2:56190 (user client)`

`2021-04-05 00:29:09,131 [UserServer-1] WARN c.d.e.s.o.SessionOptionManagerFactoryImpl - Could not find session with sessionId 4d189d0e-825c-43e9-8c93-fb26a0da349b.`

`2021-04-05 00:29:09,132 [UserServer-1] INFO com.dremio.ConnectionLog - [4d189d0e-825c-43e9-8c93-fb26a0da349b] Connection Closed`

`172.25.0.1 - - [05/Apr/2021:00:29:18 +0000] "GET /apiv2/socket HTTP/1.1" 403 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.3 Safari/605.1.15"`

---

<div class="post-metadata">

### Author: ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)
#### Post date: [April 5, 2021, 7:38am UTC](https://community.dremio.com/t/unable-to-connect-to-dremio-from-superset/7235/4 "2021-04-05T07:38:16Z")

</div>

@jeffpower

Instead of Superset, if you try a different ODBC tool, does it work?

---

<div class="post-metadata">

### Author: ![jeffpower](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@jeffpower](https://community.dremio.com/u/jeffpower)
#### Post date: [April 5, 2021, 7:47am UTC](https://community.dremio.com/t/unable-to-connect-to-dremio-from-superset/7235/5 "2021-04-05T07:47:32Z")

</div>

Yes with pyodbc, its fine …able to connect …[quote=“jeffpower, post:1, topic:7235”]  
import matplotlib.pyplot as plt; plt.rcdefaults()  
import pyodbc  
import pandas  
host = ‘localhost’  
port = 31010  
uid = ‘xx’  
pwd = ‘xxxx’  
driver = “/Library/Dremio/ODBC/lib/libdrillodbc\_sbu.dylib”  
cnxn=pyodbc.connect(“Driver={};ConnectionType=Direct;HOST={};PORT={};AuthenticationType=Plain;UID={};PWD={}”.format(driver,host,port,uid,pwd),autocommit=True)  
sql = ‘’‘SELECT \* FROM Vehicle\_curatedData’’’  
data = pandas.read\_sql(sql,cnxn)  
[/quote]

---

<div class="post-metadata">

### Author: ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)
#### Post date: [April 6, 2021, 6:45am UTC](https://community.dremio.com/t/unable-to-connect-to-dremio-from-superset/7235/6 "2021-04-06T06:45:35Z")

</div>

@jeffpower Would this Tutorial help?

> **[Visualizing Azure Data Lake with Apache Superset and Dremio](https://www.dremio.com/tutorials/adls-dremio-supserset/)**
>
> Tutorial that helps users learn how to gain insights from data stored ADLS using Dremio and Superset.

---

<div class="post-metadata">

### Author: ![jeffpower](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@jeffpower](https://community.dremio.com/u/jeffpower)
#### Post date: [April 6, 2021, 10:35am UTC](https://community.dremio.com/t/unable-to-connect-to-dremio-from-superset/7235/7 "2021-04-06T10:35:43Z")

</div>

Thanks Balaji for the response. Would like to know : what is the recommended approach for the connectivity? Flght is better than ODBC right? and we do not need both.right?

---

<div class="post-metadata">

### Author: ![balaji.ramaswamy](https://sea2.discourse-cdn.com/flex020/user_avatar/community.dremio.com/balaji.ramaswamy/32/843_2.png) [@balaji.ramaswamy](https://community.dremio.com/u/balaji.ramaswamy)
#### Post date: [April 7, 2021, 7:18am UTC](https://community.dremio.com/t/unable-to-connect-to-dremio-from-superset/7235/8 "2021-04-07T07:18:12Z")

</div>

@jeffpower

If flight is possible over JDBC, use flight
