-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't connect to Oracle DB #20371
Comments
I'm working through a similar problem now. Did you install the Oracle instant client into the Docker container or system you are running superset from? cx_oracle requires either the instant client or full Oracle client. The recently released I'm using the following in my Docker container to install the latest SQL client:
|
One additional note, in case it helps. I had to connect using a TNS formatted string instead of the easy connect format: EDIT: Updated connect string to reference the Oracle driver correctly. |
Unfortunately didn't work! I got the same issue. |
in my case helped at first install oracleclient 11.2, then remove config
and i don't know why |
in case anyone is interested, it might help: just install instantclient following this instructions: |
I tried that approach, adding those lines at the Dockerfile and running
And I used this syntax string connection: Any guesses? |
It looks like I gave you the incorrect connect string format. According to the docs, it's Here is the documentation in case you need to adjust additional options. |
Hello, I have the same issue on an Apache Superset 2.0.0 install on Ubuntu 20.04 via docker-compose. My Oracle database is on another server.
My SQL ALCHEMY URI : When I run a small python connection script, however I manage to connect to the database and get my data.
Could someone help me, please ? |
any updates? |
Unfortunately not :/ There is a long time since I tested it . I need to try it again. |
how wonderful apache is.... Example: Due to "@" the connection does not work... ----------- EDIT -------------- |
hello everyone , i got this error please can you help it anyone. |
same error for me as well. Can anybody help on this. |
Found a solution to above problem, used docker image apache/superset to build another custom container and that resolved this issue. PSB Dockerfile which is working fine. FROM apache/superset |
![]() i am added that thing but getting same error |
pip install cx_Oracle Running These commands worked for me |
Thanks this worked for me |
thanks for you , this does not worked for me , because i use oracle 11.2 , so I change the instantclient url from version 21 to 19 , it worked for me
|
this approach works for me, I entered the container and ran these commands. |
i had the same issue connecting a docker based superset to a oracle database. with this very good step by step tutorial i installed a superset instance by scratch and with the following steps (after the installation) my connection to oracle db worked:
the connection string in superset was: oracle+cx_oracle://USRER:PASSWORD@HOST:PORT/SERVICE_NAME thank you very much to |
it seems |
Following this i also sucessfully connected to my oracledb. I did have to use the long connection string from @cofin and manually install the gevent python library |
Add the below in Dockerfile Install Oracle Instant ClientRUN mkdir -p /opt/oracle Note: make sure you include wget & unzip package before oracle client. You may reuse the step RUN mkdir -p ${PYTHONPATH} superset/static requirements superset-frontend apache_superset.egg-info requirements |
See below the steps I posted |
@vranjan25 am not sure what I might be doing wrong but I have been trying this for a while now. I gave up months ago and resorted to do it directly o the container but it is not sustanable because every time I have to rebuild the container I need to manually repeat the process. Here is how my Dockerfile
docker-compose.yml
|
Use the below in the Dockerfile. You don't need any change in docker-compose.yml SQLALCHEMY:
|
Alternatively, try the new version of cx_Oracle (now called python-oracledb) since it doesn't need Instant Client. Install steps are at https://cjones-oracle.medium.com/steps-to-use-apache-superset-and-oracle-database-ae0858b4f134 |
hey @cjbj were you able to get this connected with the python-oracledb , |
[@sachin-bureau I updated this comment with my findings] To use Thin mode with mTLS and Oracle Autonomous Database (e.g ADB-S, ATP, ADW, whatever SEO acronym you know it as!), extract the
To save reading the docs: Alternatively you could use python-oracledb "Thick" mode by adding a call to Also consider changing the database to use 1-way TLS so you don't need a wallet file in the first place! |
@cjbj i was able to connect with thick client here is a quick DIY blog: |
@sachin-bureau nice work. Earlier I also appended the steps on my blog https://cjones-oracle.medium.com/steps-to-use-apache-superset-and-oracle-database-ae0858b4f134 so the info is in one place. |
@cjbj Thanks for your blog post. I followed your blog to connect Oracle 11gR2. ERROR: (builtins.NoneType) None |
@yalcinarslan Use "Thick" mode by calling oracledb.init_oracle_client() in $HOME/superset/superset_config.py For details about what parameters to pass, see https://python-oracledb.readthedocs.io/en/latest/user_guide/initialization.html#enabling-python-oracledb-thick-mode Or upgrade your database. |
For those using the Docker Compose setup and wanting to switch to the new
If your connection uses a service name, convert the connection string. For example, change: With thanks to the write up of @cjbj. |
I'm having an issue to connect to an Oracle DB. I've already followed the steps to create a
requirements-local.txt
file intodocker/
cx_Oracle
package, but still not working.How to reproduce the bug
touch ./docker/requirements-local.txt
echo "cx_Oracle" >> ./docker/requirements-local.txt
docker-compose build --force-rm
docker-compose up
Expected results
I was expecting to be able to connect into a Oracle database.
Actual results
Actually I got this error message:
ERROR: (builtins.NoneType) None (Background on this error at: http://sqlalche.me/e/13/dbapi)
Screenshots
Environment
(please complete the following information):
latest
cx_Oracle
driverChecklist
Make sure to follow these steps before submitting your issue - thank you!
Additional context
I'm using an AWS Oracle instance to test.

I've checked the logs of the superset_worker superset_worker_beat containers, and seems that the cx-Oracle lib was successfully installed.
The superset_app container log:

I'm using the following string connection:
oracle://<username>:<password>@<hostname>:<port>
from https://superset.apache.org/docs/databases/oracle/
The text was updated successfully, but these errors were encountered: