Apache Superset error when installing locally using Docker Compose

Viewed 3096

I'm trying to install to my Ubuntu 20.04 local machine using docker-compose. When I run sudo docker-compose -f docker-compose-non-dev.yml up, I got several errors and the process keep giving errors and did not end, so I aborted. Can you please tell me what the problem is?

The errors I get during Init Step 1/4 [Starting] -- Applying DB migrations are:

  • sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) >relation "logs" does not exist

  • sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) >relation "ab_permission_view_role" does not exist

  • sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedTable) >relation "report_schedule" does not exist

enter image description here

3 Answers

I had the same same issue on Mac OS. And similar issues have been reported in the GitHub issues page as well, but it was not reproducible by everyone.

There is a possibility that something may have gone wrong in the first run.

Try running docker-compose down -v and then run docker compose up.

If the above fails, try upgrading your docker installation. Installing a new version solved my problem.

I had the same issue (Mac OS Monterey) where I had an instance of docker running Postgres for one of my apps, so when Superset started, it was looking at that instance of Postgres which obviously didn't have the appropriate databases/tables/views/etc.

So just stopping that other instance and restarting the Superset containers fixed the errors and properly started Superset. #embarrassed #oops

I experienced the same issue but these errors were at the end of a long string of cascading errors. I had this error consistently across all runs.

Looking at the first error, it seems like the initialisation script is not waiting for PostgreSQL to be ready and starts transacting right away. If the first transactions fail, many others fail subsequently. In my case the database needed a few more seconds to be ready so, I just added a sleep 60 at the beginning of docker/docker-bootstrap.sh to give time to PostgreSQL to start before other services start working.

I deleted the previously-created docker volumes and ran docker-compose -f docker-compose-non-dev.yml up again and now all works fine.

Related