superset
superset copied to clipboard
flask_appbuilder.security.sqla.manager:DB Creation and initialization failed: (psycopg2.OperationalError) could not translate host name "db" to address:
A clear and concise description of what the bug is.
How to reproduce the bug
- Environment 'Windows 10 64'
- Go to 'superset master branch'
- Run 'docker-compose pull' and 'docker-compose up'
- Scroll down in logs
- See error
superset_worker_beat | 2022-04-28 18:26:06,338:ERROR:flask_appbuilder.security.sqla.manager:DB Creation and initialization failed: (psycopg2.OperationalError) could not translate host name "db" to address: Temporary failure in name resolution
when running localhost:8088
Expected results
what you expected to happen.
Actual results
what actually happens.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment
(please complete the following information):
- browser type and version:
- superset version:
superset version
- python version:
python --version
- node.js version:
node -v
- any feature flags active:
Checklist
Make sure to follow these steps before submitting your issue - thank you!
- [ ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [ ] I have reproduced the issue with at least the latest released version of superset.
- [ ] I have checked the issue tracker for the same issue and I haven't found one similar.
Additional context
Add any other context about the problem here.
+1
+1
Im with the same issue
same,i wanna too
Hi I am also facing the same issue, looks like "db" is considered as a host, please let me know, ho can I fix, so that I can run superset.
Thanks Nagaraj M M
Hi All
This issue resolved automatically, when I install the Superset in Ubuntu machine and run Superset with below command. docker-compose -f docker-compose.yml up It will take long time to setup, around one hour or more.
Thanks Nagaraj M M
Encountered same problem. This seems to be caused by the db service was not able to start by the time superset_app try to connect to it. The root cause for db service failure need to be addressed first. In my case, I found the root cause for db service failure by bringing up only db service
# Bring down everything first
docker-compose down
# Bring up only db service
docker-compose up db
The problem in my case was
db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
db_1 |
db_1 | 2023-01-08 04:16:00.303 UTC [1] FATAL: database files are incompatible with server
db_1 | 2023-01-08 04:16:00.303 UTC [1] DETAIL: The data directory was initialized by PostgreSQL version 14, which is not compatible with this version 10.21 (Debian 10.21-1.pgdg90+1).
so my previous docker-compose up runs have created a database and the database is not at the right version. The old database is saved in superset_db_home volume. So what I had to do was remove this volume
docker volume rm superset_db_home
Then rerun docker-compose up
Thank you @huankimtran Your method worked for me also
@huankimtran ,it works! thanks!
Can anyone please suggest a way without deleting superset_db_home docker volume?
Is anyone still considering this a bug? I.e. is there a PR to open around this, or can we call it case-closed? A documentation contribution would be fantastic if you think the advice on the thread will help others in the future.