Bug description

Following the quickstart instructions result in errors.

On https://superset.apache.org/docs/quickstart

git clone https://github.com/apache/superset

cd superset
git checkout tags/4.1.2
docker compose -f docker-compose-image-tag.yml up

This is the output:

chhenning@Mac ~/repos/superset (tags/4.1.2) % docker compose -f docker-compose-image-tag.yml up
[+] Running 49/50
 ✔ redis Pulled                                                                                                                                                                                                                                47.4s 
   ✔ 131cd3848c4e Pull complete                                                                                                                                                                                                                 2.0s 
   ✔ 981e52926922 Pull complete                                                                                                                                                                                                                 2.0s 
   ✔ 4f4fb700ef54 Pull complete                                                                                                                                                                                                                 1.5s 
   ✔ b3f2b10a31c7 Pull complete                                                                                                                                                                                                                46.7s 
   ✔ 83d76d287976 Pull complete                                                                                                                                                                                                                46.6s 
   ⠏ 34ef2a75627f Extracting  43 s                                                                                                                                                                                                             59.9s 
   ✔ bd69ad4fae42 Pull complete                                                                                                                                                                                                                46.5s 
   ✔ e2044fe96c79 Pull complete                                                                                                                                                                                                                 2.1s 
 ✔ superset-worker Pulled                                                                                                                                                                                                                      60.5s 
 ✔ superset-init Pulled                                                                                                                                                                                                                        60.5s 
   ✔ b33c8ad52797 Pull complete                                                                                                                                                                                                                55.2s 
   ✔ e6953d7ebfa9 Pull complete                                                                                                                                                                                                                45.9s 
   ✔ 41e6976443ff Pull complete                                                                                                                                                                                                                45.9s 
   ✔ 4644713e3708 Pull complete                                                                                                                                                                                                                34.3s 
   ✔ f6996e87c37c Pull complete                                                                                                                                                                                                                47.6s 
   ✔ 579a65ca7e09 Pull complete                                                                                                                                                                                                                34.3s 
   ✔ 6939e8b629d3 Pull complete                                                                                                                                                                                                                42.0s 
   ✔ b235a762a6cb Pull complete                                                                                                                                                                                                                49.6s 
   ✔ 1a64efa19327 Pull complete                                                                                                                                                                                                                45.3s 
   ✔ 618d0fc55d7d Pull complete                                                                                                                                                                                                                34.3s 
   ✔ 2628eae97f6d Pull complete                                                                                                                                                                                                                52.6s 
   ✔ 5677b269a9da Pull complete                                                                                                                                                                                                                42.3s 
   ✔ ee77b296ead9 Pull complete                                                                                                                                                                                                                53.5s 
   ✔ b0c969390c07 Pull complete                                                                                                                                                                                                                53.5s 
   ✔ 94c19a746feb Pull complete                                                                                                                                                                                                                34.3s 
   ✔ ca565fbb9a49 Pull complete                                                                                                                                                                                                                34.7s 
   ✔ 1c2c2fc5ad07 Pull complete                                                                                                                                                                                                                34.3s 
   ✔ 24a4e9dfefee Pull complete                                                                                                                                                                                                                42.5s 
   ✔ f877c39c9c87 Pull complete                                                                                                                                                                                                                34.3s 
   ✔ 9e8ecf1a3685 Pull complete                                                                                                                                                                                                                34.3s 
   ✔ 1464dda2862e Pull complete                                                                                                                                                                                                                34.3s 
   ✔ d0a86e6e9596 Pull complete                                                                                                                                                                                                                47.2s 
   ✔ 2f39babdf9a4 Pull complete                                                                                                                                                                                                                45.8s 
 ✔ db Pulled                                                                                                                                                                                                                                   48.8s 
   ✔ 5efcdcb5c7a7 Pull complete                                                                                                                                                                                                                 2.4s 
   ✔ 320a6740ddc1 Pull complete                                                                                                                                                                                                                 2.1s 
   ✔ 2fe317346973 Pull complete                                                                                                                                                                                                                46.8s 
   ✔ f8ee8ba455c4 Pull complete                                                                                                                                                                                                                 2.4s 
   ✔ 77186a76030a Pull complete                                                                                                                                                                                                                 2.4s 
   ✔ c514d4e4ea34 Pull complete                                                                                                                                                                                                                 2.4s 
   ✔ 2c5457eb3f23 Pull complete                                                                                                                                                                                                                 2.4s 
   ✔ a490481288f2 Pull complete                                                                                                                                                                                                                 2.4s 
   ✔ 4dc122681691 Pull complete                                                                                                                                                                                                                 2.0s 
   ✔ f03822f5c22e Pull complete                                                                                                                                                                                                                48.1s 
   ✔ 72cda6e94dd3 Pull complete                                                                                                                                                                                                                46.6s 
   ✔ 47a7d18f052b Pull complete                                                                                                                                                                                                                 2.4s 
   ✔ a9fab9e38e98 Pull complete                                                                                                                                                                                                                 2.4s 
 ✔ superset Pulled                                                                                                                                                                                                                             60.5s 
 ✔ superset-worker-beat Pulled                                                                                                                                                                                                                 60.5s 
[+] Running 7/7
 ✔ Network superset_default        Created                                                                                                                                                                                                      0.0s 
 ✔ Container superset_db           Created                                                                                                                                                                                                      1.1s 
 ✔ Container superset_cache        Created                                                                                                                                                                                                      1.1s 
 ✔ Container superset_worker_beat  Created                                                                                                                                                                                                      0.1s 
 ✔ Container superset_app          Created                                                                                                                                                                                                      0.1s 
 ✔ Container superset_worker       Created                                                                                                                                                                                                      0.1s 
 ✔ Container superset_init         Created                                                                                                                                                                                                      0.1s 
Attaching to superset_app, superset_cache, superset_db, superset_init, superset_worker, superset_worker_beat
superset_cache        | 1:C 19 Jun 2025 02:25:52.589 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
superset_cache        | 1:C 19 Jun 2025 02:25:52.589 * Redis version=7.4.4, bits=64, commit=00000000, modified=0, pid=1, just started
superset_cache        | 1:C 19 Jun 2025 02:25:52.589 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
superset_cache        | 1:M 19 Jun 2025 02:25:52.590 * monotonic clock: POSIX clock_gettime
superset_cache        | 1:M 19 Jun 2025 02:25:52.590 * Running mode=standalone, port=6379.
superset_cache        | 1:M 19 Jun 2025 02:25:52.590 * Server initialized
superset_cache        | 1:M 19 Jun 2025 02:25:52.590 * Loading RDB produced by version 7.4.4
superset_cache        | 1:M 19 Jun 2025 02:25:52.591 * RDB age 384 seconds
superset_cache        | 1:M 19 Jun 2025 02:25:52.591 * RDB memory usage when created 0.93 Mb
superset_cache        | 1:M 19 Jun 2025 02:25:52.591 * Done loading RDB, keys loaded: 3, keys expired: 0.
superset_cache        | 1:M 19 Jun 2025 02:25:52.591 * DB loaded from disk: 0.000 seconds
superset_cache        | 1:M 19 Jun 2025 02:25:52.591 * Ready to accept connections tcp
superset_db           | 
superset_db           | PostgreSQL Database directory appears to contain a database; Skipping initialization
superset_db           | 
superset_db           | 2025-06-19 02:25:52.606 UTC [1] FATAL:  database files are incompatible with server
superset_db           | 2025-06-19 02:25:52.606 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 16, which is not compatible with this version 15.13 (Debian 15.13-1.pgdg120+1).
superset_db exited with code 1
superset_worker_beat  | Skipping local overrides
superset_worker_beat  | Starting Celery beat...
superset_init         | Skipping local overrides
superset_init         | Unknown Operation!!!
superset_init         | 
superset_init         | ######################################################################
superset_init         | 
superset_app          | Skipping local overrides
superset_init         | 
superset_worker       | Skipping local overrides
superset_app          | Starting web app...
superset_init         | Init Step 1/4 [Starting] -- Applying DB migrations
superset_worker       | Starting Celery worker...
superset_init         | 
superset_init         | 
superset_init         | ######################################################################
superset_init         | 
superset_app          | [2025-06-19 02:25:52 +0000] [8] [INFO] Starting gunicorn 22.0.0
superset_app          | [2025-06-19 02:25:52 +0000] [8] [INFO] Listening at: http://0.0.0.0:8088 (8)
superset_app          | [2025-06-19 02:25:52 +0000] [8] [INFO] Using worker: gthread
superset_app          | [2025-06-19 02:25:52 +0000] [9] [INFO] Booting worker with pid: 9
superset_db           | 
superset_db           | PostgreSQL Database directory appears to contain a database; Skipping initialization
superset_db           | 
superset_db           | 2025-06-19 02:25:52.808 UTC [1] FATAL:  database files are incompatible with server
superset_db           | 2025-06-19 02:25:52.808 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 16, which is not compatible with this version 15.13 (Debian 15.13-1.pgdg120+1).
superset_db exited with code 1
superset_db           | 
superset_db           | PostgreSQL Database directory appears to contain a database; Skipping initialization
superset_db           | 
superset_db           | 2025-06-19 02:25:53.190 UTC [1] FATAL:  database files are incompatible with server
superset_db           | 2025-06-19 02:25:53.190 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 16, which is not compatible with this version 15.13 (Debian 15.13-1.pgdg120+1).
superset_db exited with code 1
superset_app          | /app/superset/config.py:42: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
superset_app          |   import pkg_resources
superset_init         | /app/superset/config.py:42: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
superset_init         |   import pkg_resources
superset_app          | Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
superset_app          | 2025-06-19 02:25:53,561:DEBUG:superset.utils.logging_configurator:logging was configured successfully
superset_app          | 2025-06-19 02:25:53,563:DEBUG:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
superset_app          | 2025-06-19 02:25:53,565:INFO:superset.initialization:Setting database isolation level to READ COMMITTED
superset_app          | 2025-06-19 02:25:53,569:ERROR:flask_appbuilder.security.sqla.manager:DB Creation and initialization failed: (psycopg2.OperationalError) could not translate host name "db" to address: Name or service not known
superset_app          | 
superset_app          | (Background on this error at: https://sqlalche.me/e/14/e3q8)
superset_app          | [2025-06-19 02:25:53 +0000] [9] [INFO] Worker exiting (pid: 9)
superset_init         | Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
superset_worker       | /app/superset/config.py:42: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
superset_worker       |   import pkg_resources
superset_worker_beat  | /app/superset/config.py:42: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
superset_worker_beat  |   import pkg_resources
superset_worker       | Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
superset_worker       | 2025-06-19 02:25:53,631:DEBUG:superset.utils.logging_configurator:logging was configured successfully
superset_worker       | 2025-06-19 02:25:53,632:DEBUG:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
superset_worker       | 2025-06-19 02:25:53,635:INFO:superset.initialization:Setting database isolation level to READ COMMITTED
superset_worker       | 2025-06-19 02:25:53,640:ERROR:flask_appbuilder.security.sqla.manager:DB Creation and initialization failed: (psycopg2.OperationalError) could not translate host name "db" to address: Name or service not known
superset_worker       | 
superset_worker       | (Background on this error at: https://sqlalche.me/e/14/e3q8)
superset_worker_beat  | Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
superset_init         | 2025-06-19 02:25:53,658:DEBUG:superset.utils.logging_configurator:logging was configured successfully
superset_worker_beat  | 2025-06-19 02:25:53,658:DEBUG:superset.utils.logging_configurator:logging was configured successfully
superset_worker_beat  | 2025-06-19 02:25:53,659:DEBUG:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
superset_init         | 2025-06-19 02:25:53,661:DEBUG:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
superset_worker_beat  | 2025-06-19 02:25:53,662:INFO:superset.initialization:Setting database isolation level to READ COMMITTED
superset_worker_beat  | 2025-06-19 02:25:53,663:ERROR:flask_appbuilder.security.sqla.manager:DB Creation and initialization failed: (psycopg2.OperationalError) connection to server at "db" (172.18.0.7), port 5432 failed: Connection refused
superset_worker_beat  |     Is the server running on that host and accepting TCP/IP connections?
superset_worker_beat  | 
superset_worker_beat  | (Background on this error at: https://sqlalche.me/e/14/e3q8)
superset_init         | 2025-06-19 02:25:53,664:INFO:superset.initialization:Setting database isolation level to READ COMMITTED
superset_init         | 2025-06-19 02:25:53,666:ERROR:flask_appbuilder.security.sqla.manager:DB Creation and initialization failed: (psycopg2.OperationalError) connection to server at "db" (172.18.0.7), port 5432 failed: Connection refused
superset_init         |     Is the server running on that host and accepting TCP/IP connections?
superset_init         | 
superset_init         | (Background on this error at: https://sqlalche.me/e/14/e3q8)
superset_db           | 
superset_db           | PostgreSQL Database directory appears to contain a database; Skipping initialization
superset_db           | 
superset_db           | 2025-06-19 02:25:53.691 UTC [1] FATAL:  database files are incompatible with server
superset_db           | 2025-06-19 02:25:53.691 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 16, which is not compatible with this version 15.13 (Debian 15.13-1.pgdg120+1).
superset_app          | [2025-06-19 02:25:53 +0000] [8] [ERROR] Worker (pid:9) exited with code 1
superset_app          | [2025-06-19 02:25:53 +0000] [8] [ERROR] Worker (pid:9) exited with code 1.
superset_app          | [2025-06-19 02:25:53 +0000] [34] [INFO] Booting worker with pid: 34
superset_db exited with code 1
superset_worker exited with code 0
superset_init exited with code 1
superset_worker_beat exited with code 0
superset_app          | /app/superset/config.py:42: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
superset_app          |   import pkg_resources
superset_app          | Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
superset_app          | 2025-06-19 02:25:54,392:DEBUG:superset.utils.logging_configurator:logging was configured successfully
superset_app          | 2025-06-19 02:25:54,394:DEBUG:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
superset_app          | 2025-06-19 02:25:54,396:INFO:superset.initialization:Setting database isolation level to READ COMMITTED
superset_app          | 2025-06-19 02:25:54,400:ERROR:flask_appbuilder.security.sqla.manager:DB Creation and initialization failed: (psycopg2.OperationalError) could not translate host name "db" to address: Name or service not known
superset_app          | 
superset_app          | (Background on this error at: https://sqlalche.me/e/14/e3q8)
superset_app          | [2025-06-19 02:25:54 +0000] [34] [INFO] Worker exiting (pid: 34)
superset_app          | [2025-06-19 02:25:54 +0000] [8] [ERROR] Worker (pid:34) exited with code 1
superset_app          | [2025-06-19 02:25:54 +0000] [8] [ERROR] Worker (pid:34) exited with code 1.
superset_app          | [2025-06-19 02:25:54 +0000] [59] [INFO] Booting worker with pid: 59
superset_db           | 
superset_db           | PostgreSQL Database directory appears to contain a database; Skipping initialization
superset_db           | 
superset_db           | 2025-06-19 02:25:54.707 UTC [1] FATAL:  database files are incompatible with server
superset_db           | 2025-06-19 02:25:54.707 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 16, which is not compatible with this version 15.13 (Debian 15.13-1.pgdg120+1).
superset_db exited with code 1
superset_worker       | /app/superset/config.py:42: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
superset_worker       |   import pkg_resources
superset_worker       | Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
superset_worker       | 2025-06-19 02:25:54,830:DEBUG:superset.utils.logging_configurator:logging was configured successfully
superset_worker       | 2025-06-19 02:25:54,831:DEBUG:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
superset_worker       | 2025-06-19 02:25:54,832:INFO:superset.initialization:Setting database isolation level to READ COMMITTED
superset_worker       | 2025-06-19 02:25:54,837:ERROR:flask_appbuilder.security.sqla.manager:DB Creation and initialization failed: (psycopg2.OperationalError) could not translate host name "db" to address: Name or service not known
superset_worker       | 
superset_worker       | (Background on this error at: https://sqlalche.me/e/14/e3q8)
superset_worker_beat  | /app/superset/config.py:42: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
superset_worker_beat  |   import pkg_resources
superset_worker_beat  | Loaded your LOCAL configuration at [/app/docker/pythonpath_dev/superset_config.py]
superset_worker_beat  | 2025-06-19 02:25:54,903:DEBUG:superset.utils.logging_configurator:logging was configured successfully
superset_worker_beat  | 2025-06-19 02:25:54,903:DEBUG:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
superset_worker_beat  | 2025-06-19 02:25:54,905:INFO:superset.initialization:Setting database isolation level to READ COMMITTED
superset_worker_beat  | 2025-06-19 02:25:54,913:ERROR:flask_appbuilder.security.sqla.manager:DB Creation and initialization failed: (psycopg2.OperationalError) could not translate host name "db" to address: Name or service not known
superset_worker_beat  | 
superset_worker_beat  | (Background on this error at: https://sqlalche.me/e/14/e3q8)
superset_worker exited with code 1
superset_app          | /app/superset/config.py:42: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
superset_app          |   import pkg_resources
superset_worker_beat exited with code 1

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Comment From: dosubot[bot]

Hi @chhenning! I'm Dosu and I’m helping the superset team.

The errors you’re seeing are due to a PostgreSQL version mismatch and leftover Docker volumes. The quickstart instructions use a Docker Compose file that pulls the latest PostgreSQL 16 image, but if you have an existing Docker volume from a previous run (for example, with PostgreSQL 15), the data directory will be incompatible and the container will fail to start. This is a common issue and is discussed in several threads, including this one.

To fix this, you need to remove the old Docker volume so that a fresh, compatible database is initialized. Run:

docker compose -f docker-compose-image-tag.yml down -v

Then try starting again:

docker compose -f docker-compose-image-tag.yml up

This will delete the old database volume and allow PostgreSQL 16 to initialize a new, compatible data directory.

If you see errors about the hostname db not being resolved, it’s usually a symptom of the database container failing to start (as above), so fixing the volume issue should resolve this as well.

Also, if you cloned the repo with --depth=1, you may not have all tags available for checkout. Use:

git fetch --tags

before checking out a specific tag like 4.1.2 reference.

Let me know if you still hit issues after trying these steps!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X