superset: database test does not exist,and image 404

I used docker-compose to deploy the superset, which is version v1.0.0, Test database does not exist during initialization Unable to open it after login.

superset_app             | INFO:superset.utils.logging_configurator:logging was configured successfully
superset_app             | INFO:superset.utils.logging_configurator:logging was configured successfully
superset_worker          | INFO:superset.utils.logging_configurator:logging was configured successfully
superset_tests_worker    | INFO:superset.utils.logging_configurator:logging was configured successfully
superset_db              | 2021-01-25 02:51:53.376 UTC [31] FATAL:  database "test" does not exist
superset_tests_worker    | /usr/local/lib/python3.7/site-packages/flask_caching/__init__.py:192: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
superset_tests_worker    |   "Flask-Caching: CACHE_TYPE is set to null, "
superset_tests_worker    | ERROR:flask_appbuilder.security.sqla.manager:DB Creation and initialization failed: (psycopg2.OperationalError) FATAL:  database "test" does not exist
superset_tests_worker    | 
superset_tests_worker    | (Background on this error at: http://sqlalche.me/e/13/e3q8)
superset_tests_worker    | Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
superset_tests_worker exited with code 1
superset_init            | INFO:superset.utils.logging_configurator:logging was configured successfully
superset_init            | /usr/local/lib/python3.7/site-packages/flask_caching/__init__.py:192: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
superset_init            |   "Flask-Caching: CACHE_TYPE is set to null, "
superset_init            | INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
superset_init            | INFO  [alembic.runtime.migration] Will assume transactional DDL.
superset_init            | Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
superset_worker          | /usr/local/lib/python3.7/site-packages/flask_caching/__init__.py:192: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
superset_worker          |   "Flask-Caching: CACHE_TYPE is set to null, "
superset_worker          | /usr/local/lib/python3.7/site-packages/celery/platforms.py:801: RuntimeWarning: You're running the worker with superuser privileges: this is
superset_worker          | absolutely not recommended!

......

superset_init            | INFO:superset.models.helpers:Updating table_columns yt_other
superset_init            | INFO:superset.models.helpers:Updating table_columns gender
superset_init            | INFO:superset.datasets.commands.importers.v1.utils:Loading data inside the import transaction
Exception in thread Thread-22:
Traceback (most recent call last):
  File "site-packages/urllib3/connectionpool.py", line 384, in _make_request
  File "<string>", line 2, in raise_from
  File "site-packages/urllib3/connectionpool.py", line 380, in _make_request
  File "http/client.py", line 1331, in getresponse
  File "http/client.py", line 297, in begin
  File "http/client.py", line 258, in _read_status
  File "socket.py", line 586, in readinto
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "site-packages/requests/adapters.py", line 449, in send
  File "site-packages/urllib3/connectionpool.py", line 638, in urlopen
  File "site-packages/urllib3/util/retry.py", line 368, in increment
  File "site-packages/urllib3/packages/six.py", line 686, in reraise
  File "site-packages/urllib3/connectionpool.py", line 600, in urlopen
  File "site-packages/urllib3/connectionpool.py", line 386, in _make_request
  File "site-packages/urllib3/connectionpool.py", line 306, in _raise_timeout
urllib3.exceptions.ReadTimeoutError: UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "threading.py", line 916, in _bootstrap_inner
  File "threading.py", line 864, in run
  File "compose/cli/log_printer.py", line 214, in watch_events
  File "compose/project.py", line 493, in yield_loop
  File "compose/project.py", line 461, in build_container_event
  File "compose/container.py", line 48, in from_id
  File "site-packages/docker/utils/decorators.py", line 19, in wrapped
  File "site-packages/docker/api/container.py", line 755, in inspect_container
  File "site-packages/docker/utils/decorators.py", line 46, in inner
  File "site-packages/docker/api/client.py", line 230, in _get
  File "site-packages/requests/sessions.py", line 537, in get
  File "site-packages/requests/sessions.py", line 524, in request
  File "site-packages/requests/sessions.py", line 637, in send
  File "site-packages/requests/adapters.py", line 529, in send
requests.exceptions.ReadTimeout: UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)

superset_init            | /app/docker/docker-init.sh: line 79:    36 Killed                  superset load_examples
superset_db              | 2021-01-25 02:56:12.771 UTC [39] LOG:  unexpected EOF on client connection with an open transaction
superset_app             | /usr/local/lib/python3.7/site-packages/flask_caching/__init__.py:192: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
superset_app             |   "Flask-Caching: CACHE_TYPE is set to null, "
superset_app             | 192.168.20.46 - - [25/Jan/2021 02:56:12] "GET / HTTP/1.1" 302 -

.....
superset_app             | 192.168.20.46 - - [25/Jan/2021 02:57:00] "GET /superset/welcome HTTP/1.1" 200 -
superset_app             | INFO:werkzeug:192.168.20.46 - - [25/Jan/2021 02:57:00] "GET /superset/welcome HTTP/1.1" 200 -
superset_app             | 192.168.20.46 - - [25/Jan/2021 02:57:00] "GET /static/assets/images/loading.gif HTTP/1.1" 404 -
superset_app             | INFO:werkzeug:192.168.20.46 - - [25/Jan/2021 02:57:00] "GET /static/assets/images/loading.gif HTTP/1.1" 404 -
superset_app             | DEBUG:superset.stats_logger:[stats_logger] (incr) welcome
superset_app             | 192.168.20.46 - - [25/Jan/2021 02:57:01] "GET /superset/welcome HTTP/1.1" 200 -
superset_app             | INFO:werkzeug:192.168.20.46 - - [25/Jan/2021 02:57:01] "GET /superset/welcome HTTP/1.1" 200 -
superset_app             | 192.168.20.46 - - [25/Jan/2021 02:57:01] "GET /static/assets/images/loading.gif HTTP/1.1" 404 -
superset_app             | INFO:werkzeug:192.168.20.46 - - [25/Jan/2021 02:57:01] "GET /static/assets/images/loading.gif HTTP/1.1" 404 -

image

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 5
  • Comments: 15 (2 by maintainers)

Most upvoted comments

Yeah, I have the same issue too. How to fix it?

Try increasing the RAM to 7-8gb and restarting docker, fixed it for me

I have the same issue when running docker-compose up from a Mac running latest Docker Desktop. There’s no evidence of network errors in the startup logs, but I have flask_appbuilder errors. And the end result is the same - a blank page with broken image links and buttons.

db_1                     | CREATE DATABASE
db_1                     |
db_1                     |
db_1                     | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
db_1                     |
db_1                     | 2021-01-25 18:27:34.546 UTC [48] LOG:  received fast shutdown request
db_1                     | waiting for server to shut down....2021-01-25 18:27:34.547 UTC [48] LOG:  aborting any active transactions
db_1                     | 2021-01-25 18:27:34.549 UTC [48] LOG:  worker process: logical replication launcher (PID 55) exited with exit code 1
db_1                     | 2021-01-25 18:27:34.551 UTC [50] LOG:  shutting down
db_1                     | 2021-01-25 18:27:34.563 UTC [48] LOG:  database system is shut down
db_1                     |  done
db_1                     | server stopped
db_1                     |
db_1                     | PostgreSQL init process complete; ready for start up.
db_1                     |
db_1                     | 2021-01-25 18:27:34.659 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
db_1                     | 2021-01-25 18:27:34.659 UTC [1] LOG:  listening on IPv6 address "::", port 5432
db_1                     | 2021-01-25 18:27:34.661 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1                     | 2021-01-25 18:27:34.672 UTC [76] LOG:  database system was shut down at 2021-01-25 18:27:34 UTC
db_1                     | 2021-01-25 18:27:34.677 UTC [1] LOG:  database system is ready to accept connections
superset_node            | npm WARN using --force I sure hope you know what you are doing.
superset_app             |  * Serving Flask app "superset.app:create_app()" (lazy loading)
superset_app             |  * Environment: development
superset_app             |  * Debug mode: on
superset_app             |  * Running on http://0.0.0.0:8088/ (Press CTRL+C to quit)
superset_app             |  * Restarting with stat
superset_tests_worker    | INFO:superset.utils.logging_configurator:logging was configured successfully
db_1                     | 2021-01-25 18:27:38.783 UTC [83] FATAL:  database "test" does not exist
superset_tests_worker    | /usr/local/lib/python3.7/site-packages/flask_caching/__init__.py:192: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
superset_tests_worker    |   "Flask-Caching: CACHE_TYPE is set to null, "
superset_tests_worker    | ERROR:flask_appbuilder.security.sqla.manager:DB Creation and initialization failed: (psycopg2.OperationalError) FATAL:  database "test" does not exist
superset_tests_worker    |
superset_tests_worker    | (Background on this error at: http://sqlalche.me/e/13/e3q8)

I just tried again on the latest master. Mac os, 9gb ram in my docker setup. Not fixed afaict. still blank page after the login.

I could run the frontend manually in the host, after the superset-node container crashed, by cd’ing into the frontend folder, installing the deps via npm i and then npm run dev.

I have the same issue when running docker-compose up from a Mac running latest Docker Desktop. There’s no evidence of network errors in the startup logs, but I have flask_appbuilder errors. And the end result is the same - a blank page with broken image links and buttons.

db_1                     | CREATE DATABASE
db_1                     |
db_1                     |
db_1                     | /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
db_1                     |
db_1                     | 2021-01-25 18:27:34.546 UTC [48] LOG:  received fast shutdown request
db_1                     | waiting for server to shut down....2021-01-25 18:27:34.547 UTC [48] LOG:  aborting any active transactions
db_1                     | 2021-01-25 18:27:34.549 UTC [48] LOG:  worker process: logical replication launcher (PID 55) exited with exit code 1
db_1                     | 2021-01-25 18:27:34.551 UTC [50] LOG:  shutting down
db_1                     | 2021-01-25 18:27:34.563 UTC [48] LOG:  database system is shut down
db_1                     |  done
db_1                     | server stopped
db_1                     |
db_1                     | PostgreSQL init process complete; ready for start up.
db_1                     |
db_1                     | 2021-01-25 18:27:34.659 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
db_1                     | 2021-01-25 18:27:34.659 UTC [1] LOG:  listening on IPv6 address "::", port 5432
db_1                     | 2021-01-25 18:27:34.661 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
db_1                     | 2021-01-25 18:27:34.672 UTC [76] LOG:  database system was shut down at 2021-01-25 18:27:34 UTC
db_1                     | 2021-01-25 18:27:34.677 UTC [1] LOG:  database system is ready to accept connections
superset_node            | npm WARN using --force I sure hope you know what you are doing.
superset_app             |  * Serving Flask app "superset.app:create_app()" (lazy loading)
superset_app             |  * Environment: development
superset_app             |  * Debug mode: on
superset_app             |  * Running on http://0.0.0.0:8088/ (Press CTRL+C to quit)
superset_app             |  * Restarting with stat
superset_tests_worker    | INFO:superset.utils.logging_configurator:logging was configured successfully
db_1                     | 2021-01-25 18:27:38.783 UTC [83] FATAL:  database "test" does not exist
superset_tests_worker    | /usr/local/lib/python3.7/site-packages/flask_caching/__init__.py:192: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
superset_tests_worker    |   "Flask-Caching: CACHE_TYPE is set to null, "
superset_tests_worker    | ERROR:flask_appbuilder.security.sqla.manager:DB Creation and initialization failed: (psycopg2.OperationalError) FATAL:  database "test" does not exist
superset_tests_worker    |
superset_tests_worker    | (Background on this error at: http://sqlalche.me/e/13/e3q8)

After changing to the CentOS environment with RAM 8G, everything is well done, fixed it for me, you can try it

seems like a internet connection problem:

superset_init            | INFO:superset.datasets.commands.importers.v1.utils:Loading data inside the import transaction
Exception in thread Thread-22:
Traceback (most recent call last):
  File "site-packages/urllib3/connectionpool.py", line 384, in _make_request
  File "<string>", line 2, in raise_from
  File "site-packages/urllib3/connectionpool.py", line 380, in _make_request
  File "http/client.py", line 1331, in getresponse
  File "http/client.py", line 297, in begin
  File "http/client.py", line 258, in _read_status
  File "socket.py", line 586, in readinto
socket.timeout: timed out

I can guarantee that my network is good